You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Technically I would not consider this a bug, but you may wish to preserve pre-existing behavior. You will need to analyze a source directory for these things to be available, :cache-analysis will definitely help here if you want to incur small overheads.
@tomjakubowski FWIW, Ambly exhibits what appears to be similar behavior. You can see this in the README.md instructions for Shrimp (where a require is used in lieu of a load-file to the same effect).
I actually get a WARNING: Use of undeclared Var but with things actually working, unless a require or load-file is first issued. (That's why I said similar behavior. If this is also what you are seeing then it is identical behavior.)
I found that issuing a repl/analyze-source call fixes this, but introduces the challenges I mentioned in #28 where there doesn't appear to be a way to programatically enumerate the source directories that need to be analyzed, and even if it were possible (say by introducing yet another :source-paths), they would need to be in a topological sort reflecting the dependency relation between the source directories.
To reproduce:
lein cljsbuild once
in the example project.index.html
in a browser.weasel-example.example
NS, and evaluatebaz
.The referred var will not be available.
Then, run
(load-file "weasel_example/example.cljs")
, and try to evaluatebaz
again. The referred var will be available, and its value will be printed.The text was updated successfully, but these errors were encountered: