jet icon indicating copy to clipboard operation
jet copied to clipboard

Jetty code run during compilation

Open yogthos opened this issue 10 years ago • 8 comments
trafficstars

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.

yogthos avatar Jul 10 '15 22:07 yogthos

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 avatar Jul 11 '15 06:07 mpenet

This should be fixed by https://github.com/mpenet/jet/commit/a9f435a9de6c608c2a086d07aa91b2cde97534e0

mpenet avatar Jul 11 '15 07:07 mpenet

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

mpenet avatar Jul 11 '15 07:07 mpenet

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

Thanks for the report!

mpenet avatar Jul 11 '15 07:07 mpenet

nice! :+1:

yogthos avatar Jul 11 '15 15:07 yogthos

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

yogthos avatar Jul 11 '15 15:07 yogthos

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 avatar Jul 12 '15 08:07 mpenet

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

yogthos avatar Jul 12 '15 12:07 yogthos