Fork me on GitHub
#clojure
<
2022-01-22
>
kristof02:01:24

@alexmiller hey, is there any roadmap for spec.alpha? Like, is it still cooking, or is it kind of on hold because of a road bump, does it still not feel right? Etc.

Alex Miller (Clojure team)02:01:13

been focusing on other things, I expect it will get more attention this year

kristof02:01:18

If you had to give it a percent done, what would you estimate? Just curious

Alex Miller (Clojure team)02:01:48

we haven't decided all the things we want to do yet so don't think I can answer that

Drew Verlee04:01:24

On my phone the link to "get-in" goes to the file, but not the exact line. It's that just happening to me? I could spend a weekend updating the links to the exacit lines, if it means we can say I'm a core contributor :) https://clojuredocs.org/clojure.core/get-in

Alex Miller (Clojure team)05:01:50

link seems right on a computer, goes to: https://github.com/clojure/clojure/blob/clojure-1.10.1/src/clj/clojure/core.clj#L6142 sometimes on the phone I find the anchors into core.clj (which is very large) don't work

Drew Verlee05:01:20

Great, i think it's just the github app not working right.

winsome06:01:42

I've got a cljc file that I'd like to ensure remains cljc, with nothing non-portable sneaking in. Is there a simple test I can write to ensure this, or do I just need to check both in js and jvm land?

p-himik08:01:17

To the best of my knowledge, it's the same deal as proving that some piece of code works, only in this case it must work on both JS and JVM. So it can't be a simple test.

vemv09:01:52

I can think of a custom reader that ensures that for every reader conditional, ensures there are both :clj and :cljs branches It would mean that for stuff that you really intend to have just 1 branch, you'd have to write e.g. ,,, :cljs :ignore

vemv10:01:01

:thinking_face: you don't need a custom reader really, you'd read the file with :read-cond :preserve and then you can inpect those https://github.com/clojure/clojure/blob/da0b9574017918deede6d2a15f386a7cc1b70a2c/src/jvm/clojure/lang/ReaderConditional.java objects. Could make for an interesting, lightweight linter

Joshua Suskalo16:01:12

If you use #clj-kondo it will lint your program twice, once for clj and once for cljs. It will tess you if you have imports and use them in cljs, and tell you about missing function, etc.

😃 1
Joshua Suskalo16:01:44

It's probably your best bet at a relatively easy way to determine if something is portable, though it's not gonna catch 100% of everything.

🙂 1
winsome16:01:27

Alright, so I think I'll go with clj-kondo for development, but have a build step in the ci pipeline that ensures it works in both environments. Thanks for the tips, everyone