Closed aiba closed 12 months ago
Is there a way for me to reproduce the issue @aiba ? I don't think the PR you opened would break anything, but I'd like to have some way to test this.
I tried to make a small example app to reproduce, but in the small app I couldn't compel the clojurescript compiler to munge the "Provider" name. But I'm sure it happens in my larger app, because I spent a lot of time inspecting the generated, optimized javascript, and my fix in #104 fixes it in my larger app. I wish I could give you an easy way to reproduce, but I would ask that you accept the change based on the way macros emit metadata, as discussed in the two links in the comments on #104.
This bug reappeared on our most recent build, and I just confirmed that #109 did not fix it.
I think we need to declare the type-hinted symbol outside of the syntax-quote. See the comments on #104 (which is a working fix).
PR welcome. Can we test for this somehow?
See https://github.com/lilactown/helix/blob/46b81fc656af480e8e588f87def10da9b114fb04/test/helix/core_test.cljs#L69-L72 for how I think we could test this
I was chasing down an issue in our app that was only occuring with
:optimizations :advanced
and I think it's this line where it calls(.-Provider ~context)
. I think the compiler needs the^js
hint on the context variable.PR forthcoming.