ClojureScript

load-file in REPL improperly qualifies current-namespace ::keywords

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code

Description

This can be seen by opening a REPL and:

(load-file "cljs/ns_test/foo.cljs")

The ::foo keyword in that file is resolved improperly:

ClojureScript:cljs.user> cljs.ns-test.foo/kw
:user/foo

cljs.repl/load-stream needs to force *ns* to track *cljs-ns* so that the Clojure reader will properly resolve auto-namespacing keywords. A patch is attached that does this, ensuring that any Clojure namespaces created solely for this purpose are removed.

Activity

Hide
Chas Emerick added a comment -

Note that there are two other places where the Clojure reader is used in ClojureScript — one in the analyzer, one in the compiler — where a similar fix may be required. Perhaps cljs.compiler/forms-seq should be the sole place where the Clojure reader is used with *ns* properly tracked therein...

Show
Chas Emerick added a comment - Note that there are two other places where the Clojure reader is used in ClojureScript — one in the analyzer, one in the compiler — where a similar fix may be required. Perhaps cljs.compiler/forms-seq should be the sole place where the Clojure reader is used with *ns* properly tracked therein...
Hide
David Nolen added a comment -

Is this fixed in master?

Show
David Nolen added a comment - Is this fixed in master?

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: