Skip to content
This repository was archived by the owner on Jun 19, 2018. It is now read-only.

Jetty code run during compilation #22

Open
yogthos opened this issue Jul 10, 2015 · 8 comments
Open

Jetty code run during compilation #22

yogthos opened this issue Jul 10, 2015 · 8 comments

Comments

@yogthos
Copy link

yogthos commented Jul 10, 2015

When the uberjar is compiled with Jet the following output ends up in the console:

lein uberjar
Compiling myapp.core
2015-07-10 17:48:43.082:INFO::main: Logging initialized @8147ms
...

The message comes from jetty as seen here. This indicates that some jetty code is being being run during the compilation step. I didn't notice jet itself calling anything explicitly, so perhaps it's something in jetty config that runs.

It doesn't affect the functionality as the uberjar will still compile, just a bit of a curiosity as it technically shouldn't happen at compile time.

@mpenet
Copy link
Owner

mpenet commented Jul 11, 2015

Hi,

I think this might be triggered by this, I will change it to be more lazy.

(ns qbits.jet.client.ssl
  (:import (org.eclipse.jetty.util.ssl SslContextFactory)))

(def ^SslContextFactory insecure-ssl-context-factory
  (SslContextFactory. true))

@mpenet
Copy link
Owner

mpenet commented Jul 11, 2015

This should be fixed by a9f435a

@mpenet mpenet closed this as completed Jul 11, 2015
@mpenet
Copy link
Owner

mpenet commented Jul 11, 2015

I ll cut a release shortly (I want to get rid of some reflection that was introduced by a recent PR before).

@mpenet
Copy link
Owner

mpenet commented Jul 11, 2015

Available as [cc.qbits/jet "0.6.6"]

Thanks for the report!

@yogthos
Copy link
Author

yogthos commented Jul 11, 2015

nice! 👍

@yogthos
Copy link
Author

yogthos commented Jul 11, 2015

Hmm unfortunately, just tested with the latest and still see the logging initialized message during compile. Possibly another place somewhere that triggers it?

@mpenet
Copy link
Owner

mpenet commented Jul 12, 2015

I think this could be something in clojure itself, I just tried to comment everything and find the source and it seems it's triggered when importing some jetty ns as well.
It could be related to http://dev.clojure.org/jira/browse/CLJ-1315 maybe. Anyway, I ll leave this open and try to find a solution but this is fairly harmless for now.

@mpenet mpenet reopened this Jul 12, 2015
@yogthos
Copy link
Author

yogthos commented Jul 12, 2015

I agree, it does seem completely harmless but would be nice to figure out what's causing it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants