Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClojureScript expects populated java.class.path on Java 9 and newer in order to use externs #197

Open
svdm opened this issue Jan 3, 2020 · 0 comments

Comments

@svdm
Copy link

svdm commented Jan 3, 2020

This is essentially the issue that was reported on clojurescript itself as CLJS-2529: https://clojure.atlassian.net/projects/CLJS/issues/CLJS-2529
And subsequently fixed in clojure/clojurescript@8670cc4

However, that fix expects java.class.path to contain all relevant resources including extern JS files (when on Java 9+). That's not true for boot, where it only contains the boot executable. As a result externs remain ignored on Java 9+ when compiling as part of a boot build.

I'm not entirely sure how to best fix this. I've experimented with a hack that comes down to doing (System/setProperty "java.class.path" (get-env :fake-class-path)) before running the cljs task. This appears to work (externs are used etc) but I'm not sure what side effects it might have on other consumers of that classpath property. If this step was performed inside boot-cljs its scope could be restricted to the cljs build more easily.

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

No branches or pull requests

1 participant