cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
alexmiller 2019-11-09T00:04:49.243400Z

@dnolen fyi, I'm working towards a release of core.async next week, but of course, we can always do another one :)

mfikes 2019-11-09T15:43:24.246100Z

A good one to assess prior to release: https://clojure.atlassian.net/projects/CLJS/issues/CLJS-3170 TL;DR: The particular example is minor, but generally illustrates an issue in that we will start inferring Array for Closure libraries, where the compiler understands array

2019-11-09T15:46:15.247200Z

@mfikes just curious do you know which patch in patch tender responsible for this warning? https://travis-ci.org/binaryage/cljs-oops/builds/607167428#L868

2019-11-09T15:47:13.248300Z

I briefly looked at the list and didn’t see it, but don’t spend time on it if you don’t know from top of your head

mfikes 2019-11-09T15:51:33.249Z

A hunch is that it is an incorrect diagnostic triggered by the patch in CLJS-2823

mfikes 2019-11-09T15:52:53.249400Z

But that ticket evidently passed Canary… hrm. Let me run it through Canary again.

2019-11-09T16:00:18.251600Z

thanks, it was reported by cljs-oops tests but it is an issue in cljs-devtools lib, I tried to work around it by going through js/: https://gist.github.com/darwin/f4704eb6f0b65ea28a38351a10b451b6 which seems to silence the warning when compiled with latest patch-tender

mfikes 2019-11-09T16:02:11.252600Z

Ahh, so you are using set! there… seems like it could be related then. (My initial hunch is that the compiler is wrong and you shouldn’t need to use js/ to workaround.)

2019-11-09T16:04:35.253600Z

I assume the source of the warning is here: https://github.com/google/closure-library/blob/master/closure/goog/async/nexttick.js#L137 you are newly able to understand the GCL annotations and see that the goog.async.nextTick.setImmediate_ is private

mfikes 2019-11-09T16:05:18.254Z

Ah… wow! That’s cool!

2019-11-09T16:07:35.255600Z

it is welcome, but as a lib I have no control over user’s compiler warning prefs, so I need a workaround, the js/ approach seems to work, I don’t care about advanced mode in this case

mfikes 2019-11-09T16:07:54.255800Z

cljs.user=> (require '[goog.async.nextTick :as next-tick])
nil
cljs.user=> next-tick/setImmediate_
WARNING: var: goog.async.nextTick/setImmediate_ is not public at line 1 <cljs repl>

mfikes 2019-11-09T16:08:13.256100Z

^ repro from current master 🙂

2019-11-09T16:09:23.257200Z

oh, so now I’m a bit puzzled, if the patch is already included in cljs master, why cljs-oops didn’t fail in canary, only with patch-tender?

mfikes 2019-11-09T16:09:43.257600Z

Because private var accesses are currently suppressed in set! on master

mfikes 2019-11-09T16:10:01.258Z

CLJS-2823 eliminates that suppression

2019-11-09T16:10:42.258600Z

ok, thanks for clarification, and now I understand why I wasn’t able to find the patch by glancing over the list 🙂

mfikes 2019-11-09T16:11:20.259Z

Mechanical testing FTW

mfikes 2019-11-09T16:16:13.259700Z

For the Array vs. array issue, I’ve marked https://clojure.atlassian.net/projects/CLJS/issues/CLJS-3170 as a blocker to remind us to assess it before release