ClojureScript

cljs.js-deps/goog-resource doesn't get the correct classloader when running under immutant

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    Java 1.8.0_05, Clojure 1.6.0, clojurescript 0.0-2202, immutant 1.1.1

Description

When attempting to call cljs.closure/build when running under immutant, cljs.js-deps/goog-dependencies* fails, because the classloader goog-resources uses doesn't seem to be correct: In a repl, I can see that ClassLoader/getSystemClassLoader doesn't find goog/deps.js, but using (.getContextClassLoader (Thread/currentThread)) (as in clojure.java.io/resource) works:

user=> (enumeration-seq (.getResources (ClassLoader/getSystemClassLoader) "goog/deps.js"))
nil
user=> (enumeration-seq (.getResources (.getContextClassLoader (Thread/currentThread)) "goog/deps.js"))
(#<URL vfs:/Users/james/Work/LeanPixel/Next36/blocks/tmp_mounts/blocks.clj/google-closure-library-third-party-0.0-20140226-71326067.jar/goog/deps.js> #<URL vfs:/Users/james/Work/LeanPixel/Next36/blocks/tmp_mounts/blocks.clj/google-closure-library-0.0-20140226-71326067.jar/goog/deps.js>)

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: