8000 ClojureScript expects populated java.class.path on Java 9 and newer in order to use externs · Issue #197 · boot-clj/boot-cljs · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ClojureScript expects populated java.class.path on Java 9 and newer in order to use externs #197
Open
@svdm

Description

@svdm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0