cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
2020-11-06T12:03:37.029200Z

after a discussion with @thheller (https://clojurians.slack.com/archives/C03S1L9DN/p1604658107070900) about some self-host macro issues I’ve run into, I found something that I think I can reproduce in cljs itself - https://github.com/clojure/clojurescript/compare/master...mhuebert:cljc-macros-require-test - does that look like it should work?

2020-11-06T12:04:34.029400Z

I was running ./script/test-self-host on an older version of clojurescript, after rebasing master I’m seeing fixed via script/bootstrap

SEVERE: /Users/mattmini/Documents/projects/clojurescript/builds/out-self/cljs/core.js:27: ERROR - Closure dependency methods(goog.provide, goog.require, etc) must be called at file scope.
cljs.core._STAR_target_STAR_ = goog.define("cljs.core._STAR_target_STAR_","default");
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

thheller 2020-11-06T12:46:20.029600Z

might need to run script/bootstrap again in case that is out of date

thheller 2020-11-06T12:46:28.029800Z

not actually sure thats still relevant though

thheller 2020-11-06T12:47:09.030Z

but the error above comes from mixing incompatible closure-compiler/closure-library versions

2020-11-06T13:31:10.030200Z

@thheller thanks, that was the reason why I couldn’t run the tests after updating

2020-11-06T13:39:16.030700Z

weird thing about that failing test: it is in a group of 4 related tests. if I move it to the last position in the group (after (ns foo.bar)\n(first [1 2 3])), it passes

2020-11-06T13:41:46.030900Z

what voodoo. if I just copy it so it’s in both places (with a latch of 5), then both tests pass

2020-11-06T13:42:12.031100Z

But without the copy at the end, fails

thheller 2020-11-06T13:42:27.031300Z

maybe some hidden race condition somewhere?

dnolen 2020-11-06T14:55:46.031800Z

@braden.shepherdson that's why we don't update GCL or Closure Compiler very often

dnolen 2020-11-06T14:55:51.032Z

there's always breaking changes

dnolen 2020-11-06T14:56:08.032400Z

and both compiler and library must be coordinated - it's really annoying

dnolen 2020-11-06T14:56:41.033100Z

also generally there's often not super meaningful changes over the span of years

dnolen 2020-11-06T14:56:47.033300Z

as far as ClojureScript is concerned

dnolen 2020-11-06T14:57:13.034100Z

that said, it's on my plate to look at in the 3-4 weeks, and certainly before the end of the year

2020-11-06T14:57:22.034500Z

hm. I'm likely to discover other breaking changes, then, if I'm using master GCL and jscompiler.

dnolen 2020-11-06T14:57:45.035400Z

patches welcome of course, but auditing everything that could go wrong is actually way more trouble than you may understand

dnolen 2020-11-06T14:57:53.035800Z

i.e. downstream tooling might break

dnolen 2020-11-06T14:58:11.036300Z

so even if we fix some stuff it might all be delayed

dnolen 2020-11-06T14:58:32.037Z

until it's communicated and agreed what is required

2020-11-06T14:59:37.038200Z

I'll fiddle with it locally, and at least file a bug with the details. this AnonymousFunctionNamingPolicy case specifically is an option being dropped, so it's easy enough to just stop setting it. I guess it's possible that there's downstream tooling that depends on setting it to something non-default, though I think this is a pretty obscure option.

dnolen 2020-11-06T15:00:27.038800Z

yes, please capture that one and anything else you encounter

dnolen 2020-11-06T15:01:06.039600Z

I will also give it a try - Figwheel will also need a spin, I need to test Krell, yadda yadda

dnolen 2020-11-06T15:01:13.039900Z

so the urgency is quite low

thheller 2020-11-06T15:29:36.041400Z

FWIW I took a look yesterday the offending code can just be removed. I doubt anyone ever used the related setting since source maps were introduced.

dnolen 2020-11-06T15:31:50.042400Z

sure, I'm just pointing out that testing the new compiler/library takes some time now - it might be easy - might not - if things are working in shadow w/o other changes that's a good sign o' course

thheller 2020-11-06T15:32:59.042800Z

can't do much in shadow since everything breaks when cljs.closure is loaded

thheller 2020-11-06T15:33:51.043400Z

but shadow is on v20200830 without issues. I believe the september update just broke things because of the removal.

thheller 2020-11-06T15:34:05.043600Z

otherwise will probably work just fine