Closed piranha closed 7 years ago
That's strange, it happens when I build in advanced mode.
Hey,
Thanks for adding the issue, I'm aware of this warning. I think that maybe this is due to a bug in cljs, but not sure ATM.
Do you have any issues with the compiled code working?
I noticed that lein cljsbuild once min
stops generating the js file.
Moreover with 0.3.15
I have:
Compiling "resources/public/js/compiled/lambdax_web.js" from ["src/cljs" "env/prod/cljs"]...
WARNING: No such namespace: goog.i18n.TimeZone, could not locate goog/i18n/TimeZone.cljs, goog/i18n/TimeZone.cljc, or Closure namespace "" at line 241 /home/kapitan/git/lambdax-web/target/cljsbuild-compiler-1/cljs_time/core.cljs
WARNING: Use of undeclared Var goog.i18n.TimeZone/createTimeZone at line 241 /home/kapitan/git/lambdax-web/target/cljsbuild-compiler-1/cljs_time/core.cljs
Moved to separate issue, not sure if related to this: https://github.com/andrewmcveigh/cljs-time/issues/59
We have an app using cljs-time that also started showing this warning when we upgraded to 0.4.0
. As our automated builds include a check to fail on any compiler warnings, this makes this version a no-go (though we haven't observed any failures in the compiled output).
If this is a CLJS bug @andrewmcveigh, should we pursue this somehow there?
I think there's a cljs/jira issue for this, but I can't find it at the moment.
There's probably a quick work-around that I can put in cljs-time
that'd be quicker than diving into the clojurescript compiler. I've been a bit hesitant to do that, but if it's causing people problems then I guess I should.
We're wanting to add a 'fail on warn' to our CI but we can't with this warning occurring.
:+1:
Any news on this issue? Is the warning indicative of a problem or is it inconsequential?
Practically I've not found it a problem, but I've reworked the format stuff in the upcoming 0.5.0, so the code that triggers this warning will not be there. Hoping to get that out this weekend, time/life permitting.
Thanks @andrewmcveigh . Any chance you might also be here at Clojure/West in Seattle as well this weekend?
Thank you for the explanation, @andrewmcveigh.
@russellwhitaker no, unfortunately not. Bit of a drive from London.
Just pushed changes that include a different implementation of the stuff concerned as 0.5.0-alpha1
. Would appreciate feedback if this solves (or not) this issue for you.
@andrewmcveigh thanks for doing that, I'll test it in my own environment in the next day and give feedback here.
This fixed the problem for us. Thanks!
I don't see the warning as well anymore, thanks a bunch!
At first glance, it looks good here, too.
Thanks for the feedback, I'm going to close this issue then.
Unfortunately, the problem looks to be back with the lasted ClojureScript releases. Not sure if it's a regression in the compiler though. The errors I see are as follows.
1.9.456
Use of undeclared Var schema.core/RegExp at line 356 target/cljsbuild/public/js/schema/core.cljs
1.9.473
Use of undeclared Var cljs-time/core at line 605 target/cljsbuild/public/js/cljs_time/core.cljs
Everything works fine using 1.9.293
however. I've tested with versions 0.3.14
and 0.5.0-alpha2
of cljs-time.
I don't think this can be the same problem, the code that the compiler originally had an issue with is not present in 0.5.x.
I'll re-open though, and check it out.
This definitely seems to be related to a change in the compiler as downgrading cljs version resolved the issue. This only affects advanced compilation, everything works as expected without optimizations.
Beyond the warning under optimizations, have you noticed broken calls or other breakage?
I'm trying to assess my upgrade strategy towards an application in production that uses cljs-time
. I tend to run the latest clojurescript version and the latest cljs-time
. Would love to know what kind of damage awaits.
I haven't done too much testing for that yet. I'll keep you posted if I find anything broken aside from the warnings.
So I tracked down the issue to bouncer. I thought it might've been the issue that it referenced an older version, but I tried updating it and still see the warnings using it. Nothing really jumps out at me in its implementation though.
There has been some change to the compiler recently. There's a "fix" for #89 that should help (7acc22fe827bf9e69a8984ba26becbb774cdc5a4).
It's to do with class-names used in extend-protocol
. TBH, I think it could be a bug/regression in the compiler, but I haven't had time to track down the cause.
That's my suspicion as well since the warnings don't show up using earlier versions on ClojureScript.
WARNING: Use of undeclared Var cljs-time.format/constructor at line 413 target/prod.out/cljs_time/format.cljs