whereas the current implementation of eval (and related things like resolve) the "current namespace" is taken from @current-ns, which is cljs.user when evaluating a top-level script.
So, if eval were changed to use (.-name *ns*), this would fix things, apart from the issue that occurs when using -K or -k, where *ns* is not set.
If you consider this, it will work when executed as a script:
whereas the current implementation of
eval
(and related things likeresolve
) the "current namespace" is taken from@current-ns
, which iscljs.user
when evaluating a top-level script.So, if
eval
were changed to use(.-name *ns*)
, this would fix things, apart from the issue that occurs when using-K
or-k
, where*ns*
is not set.