Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

In a Clojure REPL, it is possible to declare the same namespace again, without existing namespaces aliases being altered or removed:

`
user=> (ns my-test-ns.core (:require [clojure.string :as string]))
nil
my-test-ns.core=> (def a string/blank?)

'my-test-ns.core/a

my-test-ns.core=> (ns my-test-ns.core)
nil
my-test-ns.core=> (def a string/blank?)

'my-test-ns.core/a

my-test-ns.core=>
`

ClojureScript REPLs do not behave in the same way:

`
ClojureScript:cljs.user> (ns my-test-ns.core (:require [clojure.string :as string]))
true
ClojureScript:my-test-ns.core> (def a string/blank?)

<function clojure$string$blankQMARK(s){

return goog.string.isEmptySafe(s);
}>
ClojureScript:my-test-ns.core> (ns my-test-ns.core)
nil
ClojureScript:my-test-ns.core> (def a string/blank?)
WARNING: No such namespace: string, could not locate string.cljs at line 1
WARNING: Use of undeclared Var string/blank? at line 1
repl:13
throw e3919auto__;

  ^

ReferenceError: string is not defined

at repl:1:109
at repl:9:3
at repl:14:4
at Object.exports.runInThisContext (vm.js:74:17)
at Domain.<anonymous> ([stdin]:41:34)
at Domain.run (domain.js:197:16)
at Socket.<anonymous> ([stdin]:40:25)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)

ClojureScript:my-test-ns.core>
`

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-1139 (reported by cichli)
...