New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugs with prefix namespaces & co. #874
Comments
You get a warning for this?
This is a known limitation in CLJS and not shadow-cljs related at all. |
For the charset warning add |
somehow only showed up once for compile but not during watch fixes #874
None of
TIL .. I did not know that limitation. Thank you for being so reactive. 👍 |
I got the warnings on the first compile but after caching it didn't warn. Not exactly sure why but it is fixed in master. |
One explanation could be that the warning is non-deterministic, that somehow it depends on the source code parsing order? There is a warning when a variable is conflicting with a namespace, is there a warning when a namespace conflicts with a variable? |
That is possible yes. In general the namespaces and defs are layed out as nested JS objects so basically you'd have
So in this loading order the |
The following compiled form could potentially be conflict free:
But I guess that the solution is not as simple as it looks, and it is probably related to the CLJS compiler. |
Yes, if I was going to rewrite how the CLJS compiler works I'd change how namespaces are organized to avoid such conflicts. It does however require rewriting the CLJS compiler a little bit and is not something I can do via shadow-cljs. |
Minimal project to reproduce it: https://github.com/green-coder/shadow-cljs-namespace-party
Then go to
http://localhost:3000/
2 problems:
nil
value printed.The text was updated successfully, but these errors were encountered: