Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

With JDK 11:

$ clj -m cljs.main -re nashorn -r Warning: Nashorn engine is planned to be removed from a future JDK release Warning: Nashorn engine is planned to be removed from a future JDK release ClojureScript 1.10.339 cljs.user=>

While this is perhaps a useful warning, the fact that it appears twice and the fact that it could conceivably break scripts that are using Nashorn, makes me think we should suppress this warning.

This can be suppressed per https://bugs.openjdk.java.net/browse/JDK-8210140 by ensuring that {{"--no-deprecation-warning"}} is in the {{args}} vector https://github.com/clojure/clojurescript/blob/6eedd0a08c49f7b0d4dcb30977b2fb38c90577bd/src/main/clojure/cljs/repl/nashorn.clj#L32

If this is added, we should test that adding this argument doesn't break things on, say JDK 8.

7 Answers

0 votes
by

Comment made by: eugenek

The patch work on JDKs 8-11. Checking JDK version is added to avoid IllegalArgumentException on pre-11 JDKs.

0 votes
by

Comment made by: mfikes

For Eugene's CA status see CLJS-2729.

0 votes
by
_Comment made by: mfikes_

CLJS-2927.patch LGTM and passes in CI.

Another place where this patch is needed is if you start a server REPL. For example, you will see this if you start one and then connect to port 5555.


$ clj -R:clj/next -J-Dclojure.server.repl="{:port 5555 :accept cljs.server.nashorn/repl}"
Clojure 1.10.0-RC1
user=> Warning: Nashorn engine is planned to be removed from a future JDK release


With the patch, this output is eliminated.
0 votes
by

Comment made by: mfikes

Eugene, one minor improvement that could be made to the patch is to simply use a vector instead of a set for the list of JDK versions.

0 votes
by

Comment made by: eugenek

Thanks, Mike. The patch is updated.

0 votes
by

Comment made by: mfikes

CLJS-2927-2.patch passes CI (/)

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2927 (reported by mfikes)
...