Fork me on GitHub
#cljs-dev
<
2019-11-09
>
Alex Miller (Clojure team)00:11:49

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

mfikes15:11:24

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

darwin15:11:15

@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

darwin15:11:13

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

mfikes15:11:33

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

mfikes15:11:53

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

darwin16:11:18

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

mfikes16:11:11

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.)

darwin16:11:35

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

mfikes16:11:18

Ah… wow! That’s cool!

darwin16:11:35

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

mfikes16:11:54

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>

mfikes16:11:13

^ repro from current master 🙂

darwin16:11:23

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?

mfikes16:11:43

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

mfikes16:11:01

CLJS-2823 eliminates that suppression

darwin16:11:42

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

mfikes16:11:20

Mechanical testing FTW

mfikes16:11:13

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