Details
-
Type:
Defect
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
The following example does not work as expected when run form a ClojureScript REPL:
(ns test.color (:require [goog.color :as c]))
(c/parse "#000000")
The parse function is undefined.
The problem is that goog.color depends on goog.color.names. goog.color.names is loaded first and goog.color is never loaded because the current implementation assumes that if goog.color is not undefined then it has already been loaded.
Come up with a different strategy for determining if a namespace is loaded.
This patch removes the browser check for loaded namespaces which can return a false positive. This fixes the problem. With this change, namespaces which are loaded by the browser may be re-loaded from the REPL one time. From the REPLs perspective each namespace is loaded only once.