cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
dnolen 2021-05-13T00:48:20.142600Z

Ah that’s true, can’t compare versions with sha I think, it’s trying to chose the right logging

dnolen 2021-05-13T00:48:30.142900Z

Because closure madness

dnolen 2021-05-13T00:49:18.144Z

So not really a bug but that figwheel makes using shas challenging

dnolen 2021-05-13T00:49:29.144400Z

In order to make normal user life easier

raspasov 2021-05-13T06:12:01.146500Z

Ok, I made some local changes to figwheel-main and got it to compile. I don’t have a small repro case or exact benchmarks but: Launching a dev figwheel repl does feel substantially slower than before on my current project. Are some of the new CLJS changes expected to potentially affect compilation performance?

raspasov 2021-05-13T06:32:57.147800Z

On a positive note, yes, the core.async long-standing bugs seem fixed 🙂

(defn go-test-123 []
 (a/go
  (let [?v :not-a-v]
   ;this works!
   (if (and (vector? ?v) (< 0 (count ?v)))
    (println "VECTOR!")
    (println "Not a vector...!")))))

dnolen 2021-05-13T11:50:07.148700Z

definitely need to create something measurable, I'm pretty skeptical about performance regressions w/ the change

raspasov 2021-05-13T12:20:11.150800Z

Yes… Sorry it’s not specific. I’ll post here if I come up with something concrete.

raspasov 2021-05-13T12:21:48.151600Z

Everything feels OK otherwise. I’ve been using the new version for a few hours during dev and all is good. This initial delay in loading the REPL is quite weird.

dnolen 2021-05-13T14:02:51.151900Z

@raspasov do you build on REPL start?

dnolen 2021-05-13T14:04:08.152700Z

yeah taking so long on the and/or of thing is unfortunate - but honestly I thought it would be harder

dnolen 2021-05-13T14:04:42.153200Z

mostly because I had a bad mental model about it

dnolen 2021-05-13T14:05:10.153800Z

again the key was that type inference decorates the AST with all the info we need and it is the first pass

dnolen 2021-05-13T14:05:39.154500Z

seems simple but just didn't see it many months ago when I tried it last, but once I saw that and/or can go after and it doesn't need to do anything special at all it was quick

dnolen 2021-05-13T14:13:46.155300Z

tangentially related - I wonder if the "type-inference" procedure in ClojureScript is really more like abstract interpretation

raspasov 2021-05-13T14:29:40.157800Z

@dnolen clj -m figwheel.main -b ios -r It’s weird. It “builds” fast as usual, but then it takes about the same time for the REPL to connect. And I see the java process going crazy in Activity Monitor. The laptop fans even turn on, not on M1 yet, lol After it’s done the REPL connects. After that, there’s no problems. It’s really not a show stopper because it’s more or less a one time cost. I don’t have to re-build unless I add a new library, or something rare.

raspasov 2021-05-13T14:31:29.159Z

It could be something from figwheel as well (not using caches?, something else wrong?), but I don’t know enough about the internals to be able to give an educated guess.

dnolen 2021-05-13T14:31:33.159200Z

@raspasov oh ha

dnolen 2021-05-13T14:31:41.159500Z

sorry you're just used to the released JAR 🙂

😂 1
dnolen 2021-05-13T14:31:46.159700Z

which AOTed compiled

raspasov 2021-05-13T14:31:57.160100Z

Ahhhh damn OK lol

dnolen 2021-05-13T14:32:03.160400Z

if you use a SHA then you have to compile 25000 lines of Clojure

raspasov 2021-05-13T14:32:23.161Z

I guess because I added the figwheel deps locally via a :local/root / deps.edn

raspasov 2021-05-13T14:32:28.161200Z

… it’s not AOTed

raspasov 2021-05-13T14:32:32.161500Z

That makes total sense.

raspasov 2021-05-13T14:32:52.161800Z

Thanks for that explanation 🙂 I would have never guessed.

raspasov 2021-05-13T14:33:41.162Z

So I guess no problems at all then!

dnolen 2021-05-13T14:34:34.162200Z

💥

raspasov 2021-05-13T14:38:33.163100Z

That’s pretty neat that those core.async bugs are fixed. I remember first time I ran into this problem years ago, I thought I was going crazy, it probably took me 1/2 day to figure out where it’s coming for 😄

raspasov 2021-05-13T14:38:56.163900Z

The lack of short-circuit in (and …)

dnolen 2021-05-13T14:39:14.164200Z

was nasty

dnolen 2021-05-13T14:39:27.164500Z

the other nasty one is #js will be looking at that next

👍 1
raspasov 2021-05-13T14:39:34.164700Z

What is the problem with that?

dnolen 2021-05-13T14:39:40.165Z

just doesn't work reliably

raspasov 2021-05-13T14:39:56.165400Z

Ha, I haven’t ran into it…

raspasov 2021-05-13T14:40:50.166300Z

Is there a minimal repro or a link for it (just curious how it shows up)?

raspasov 2021-05-13T14:44:59.167Z

Oh, so it’s about #js inside a go I assume, not #js in general?

souenzzo 2021-05-13T14:46:08.168500Z

Just something like (let [x 1] (go #js {:x x})) will not find x There is also a wired behavior that if it's a global it works, but not with locals.Don't remember exactly

raspasov 2021-05-13T14:46:59.169Z

@souenzzo I see, thanks!

dnolen 2021-05-13T15:30:56.169800Z

@alexmiller answered - it just looks like they didn't read the Quick Start

dnolen 2021-05-13T15:32:10.170200Z

or maybe there is an issue but there's a lot of irrelevant steps

dnolen 2021-05-13T15:47:40.171Z

could not reproduce it following the standard procedure w/o all the various manual steps above