ClojureScript

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

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • 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

Chas Emerick made changes -
Field Original Value New Value
Patch Code [ 10001 ]
Description This can be seen by opening a REPL and:

{code}
(load-file "cljs/ns_test/foo.cljs")
{code}

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

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

{{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.
This can be seen by opening a REPL and:

{code}
(load-file "cljs/ns_test/foo.cljs")
{code}

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

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

{{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.
Attachment CLJS-479.diff [ 11882 ]
Chas Emerick made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: