Fork me on GitHub
#cljs-dev
<
2019-01-31
>
dnolen12:01:42

cutting a release now

🎉 25
squirrel 5
❤️ 10
borkdude13:01:22

@mfikes maybe minor, but the performance of re-seq is also improved:

v8:  1.69
sm:  1.66
jc:  1.51
nh:  1.37
ck:  1.79
gvm: 1.04

mfikes13:01:32

Any copy we could include? Or just something like re-seq performance has been improved, with a speedup of 1.5 or more under major JavaScript engines.

borkdude13:01:00

I was typing roughly the same, so go ahead adding that 🙂

mfikes13:01:07

OK will add it.

dnolen13:01:27

Let's publish website update / mailing list stuff around lunchtime EST

borkdude13:01:13

has it been pushed to maven central yet?

mfikes13:01:02

Sounds good; I suspect that once we merge the news post, we may need Alex to do the manual deploy

dnolen13:01:28

@alexmiller if you want to deploy now go for it

borkdude13:01:03

probably the

Release
Current version: 1.10.439
on the front-page needs updating too?

dnolen13:01:51

I thought that was automatic when the site gets republished?

mfikes13:01:13

We may need to manually update the references in the Quick Start page.

dnolen13:01:25

@mfikes I think it's ok if the artifact goes out

dnolen13:01:34

then when we pub it's definitely there for people to grab

souenzzo14:01:13

Running clj -Sdeps '{:deps {org.clojure/clojurescript {:mvn/version "1.10.514"}}}' -m cljs.main -re node -e '(1 - 1)' I get (node:9430) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead..

souenzzo14:01:40

(everything works as expected. but it's a deprecation warning from node)

borkdude14:01:04

I have been getting that warning in previous versions as well, so it’s not a regression. I have ignored it so far…

👍 5
thheller14:01:10

@dnolen accoding to the clojure.core.specs the use of keywords in :keys desctructuring is invalid. this fails to compile in shadow-cljs. the core.specs aren't actively used in CLJS yet but this should probably be addressed? https://github.com/clojure/clojurescript/blob/c7cd3a1f4265dd1f9687da7e1076223a4da8ce20/src/main/cljs/cljs/repl.cljs#L121

thheller14:01:21

IIRC there was a similar related issue a while ago

dnolen14:01:40

@alexmiller ^ that's surprising, I could have sworn that keywords in :keys was explicitly allowed when namespace maps landed - am I misremembering?

thheller15:01:32

$ clj
Clojure 1.10.0
user=> (let [{:keys [:foo]} {}])
nil
user=> (let [{::keys [:foo]} {}])
Syntax error macroexpanding clojure.core/let at (REPL:1:1).

thheller15:01:53

seems like :keys is indeed fine with it, just not namespaced keys

dnolen15:01:08

::keys is not a thing

dnolen15:01:19

did you mean {:keys [::foo]}?

thheller15:01:59

why would ::keys not be a thing?

user=> (let [{::keys [foo]} {::foo "bar"}] foo)
"bar"

dnolen15:01:27

so that's just a bug in ClojureScript

thheller15:01:32

user=> (let [{:foo/keys [:foo]} {}])
Syntax error macroexpanding clojure.core/let at (REPL:1:1).

dnolen15:01:56

right those are wrong

dnolen15:01:02

I mis read what you were talking about above

dnolen15:01:06

that's just a bug in the ClojureScript source

thheller15:01:13

yep that works

borkdude15:01:42

maybe it would be cool to add shadow-cljs to canary?

dnolen15:01:16

we could also run the tests with core specs on

mfikes15:01:15

At some point we could also just enable core specs (unless a compiler flag is used to opt out) https://dev.clojure.org/jira/browse/CLJS-3016

dnolen15:01:24

to catch obvious stuff like this

dnolen15:01:48

building 1.10.516

👍 10
Alex Miller (Clojure team)15:01:23

sorry, did y’all figure it out?

dnolen15:01:28

@thheller another destructuring feature I didn't know about

dnolen15:01:36

:foo.bar/keys

Alex Miller (Clojure team)15:01:43

ah, that goes back to 1.9

thheller15:01:01

@alexmiller any ruling on whether it should work in :keys but not ::keys? feels a bit inconsistent

Alex Miller (Clojure team)15:01:16

those look like the same thing?

thheller15:01:29

sorry missed on : 😉

Alex Miller (Clojure team)15:01:37

both :keys and ::keys should work

thheller15:01:41

$ clj
Clojure 1.10.0
user=> (let [{:keys [:foo]} {}])
nil
user=> (let [{::keys [:foo]} {}])
Syntax error macroexpanding clojure.core/let at (REPL:1:1).

borkdude15:01:35

(let [{::keys [foo]} {}]) works though

thheller15:01:08

yes, only talking about the :foo here

Alex Miller (Clojure team)15:01:19

it is worrying that I remembered the jira ticket number for this enhancement off the top of my head?

dnolen15:01:00

@alexmiller another push would be good?

mfikes15:01:08

Humans evolved to remember painful things

😂 10
Alex Miller (Clojure team)15:01:20

I’m still assessing your question @thheller

borkdude15:01:56

so it seems the syntax for destructuring namespaced keys just doesn’t support simple keywords, only simple symbols

dpsutton15:01:04

> The key list after :ns/keys should contain either non-namespaced symbols or non-namespaced keywords. Symbols are preferred. proposal originally intended to include the behavior but no comment remarks that it does not in practice

Alex Miller (Clojure team)15:01:38

the primary reason to support keywords in the original :keys [:a :b] syntax was to have support for autoresolved keywords so you could do :keys [::a ::b] (as there are no auto-resolved symbols). With the namespaced :keys enhancement, you can do that on :keys itself (or :syms) with ::keys [a b] or ::syms [a b], so it’s not really needed there.

thheller15:01:45

ah interesting

mfikes15:01:21

One facet is that it appears ClojureScript has a more lenient / broad destructuring implementation. (That's how https://dev.clojure.org/jira/browse/CLJS-3015 was initially missed, IIRC.)

Alex Miller (Clojure team)15:01:33

from looking at the patch, it seems like it would work with either symbol or keyword so perhaps the spec is overly restrictive

mfikes15:01:55

Oh, makes sense, perhaps just a overly tight spec, while both Clojure and ClojureScript's destructuring algorithms are OK with it.

borkdude15:01:26

I’d say the spec should additionally allow simple keywords, but not namespaced keywords?

Alex Miller (Clojure team)15:01:50

if you skip macro spec checking and test this without you’ll see the destructuring code actually works with symbols and keywords, namespaced or not

Alex Miller (Clojure team)15:01:05

the :keys namespace dominates

borkdude15:01:50

(let [{::keys [:foo/bar]} {:cljs.user/bar 1}] bar)
1
hmyeah, I can see how that would be confusing and I would still argue simple keywords in the spec for that

mfikes15:01:22

Updated news PR to refer to 1.10.516

dpsutton15:01:24

(let [{:a/keys [a :_/b]} {:a/a 1 :b 2}] b)

dpsutton15:01:43

is there the escape back to un-namespaced keywords?

thheller15:01:19

{:a/keys [a] :keys [b]}

dpsutton15:01:22

yes. just wondering if an analogue to this worked. #:a{:a 1 :_/b 2 } => {:a/a 1, :b 2}

thheller15:01:38

I'd guess no

dpsutton15:01:05

cljs.user> 
(let [{::keys [:foo]} {::foo 1}] foo)
1
cljs.user> *clojurescript-version*
"1.9.946"

borkdude15:01:56

this works, it’s just the core.specs problem

thheller15:01:02

@dpsutton this also worked in 1.10.514. it only failed in shadow-cljs because that has the core specs enabled by default which is not true for CLJS currently

thheller15:01:21

need to require the core specs first

dpsutton15:01:27

oh i apologize. i missed that part

borkdude15:01:29

I guess the updated core.specs lib can be released before clojure 1.11 so people can already bump that version?

Alex Miller (Clojure team)15:01:48

yes, we use the fix version for bucketing but those can be released off-cycle

Alex Miller (Clojure team)15:01:38

but it will go through screening before that (whenever we do another round of screening)

dnolen17:01:20

@mfikes ready to merge the post?

mfikes17:01:31

Yeah; will do now.

dnolen17:01:41

thanks, will post to ml and update channels

dnolen17:01:28

@mfikes let me know when that's up and I'll link to it

mfikes17:01:56

Merged. Maybe we can do another small PR for the Quick Start update, and then have Alex do a deploy?

mfikes17:01:12

I'll put together a PR for Quick Start regardless...

mfikes17:01:50

Oh, looks like we will need the downloadable JAR that the Quick Start points to.

dnolen17:01:58

oh yeah let me do that now

mfikes17:01:17

Confirmed download of that JAR is good:

$ java -cp cljs.jar cljs.main -re node -r
ClojureScript 1.10.516
cljs.user=> (+ 1 2)
3

dnolen17:01:23

is the website stuff manual now (to deploy) @alexmiller?

mfikes17:01:36

Let me merge that Quick Start PR so that both the news and Quick Start changes go out with one manual deploy.

mfikes17:01:59

OK merged.

Alex Miller (Clojure team)17:01:23

Yes, it’s manual at the moment

Alex Miller (Clojure team)17:01:25

Do you need me to deploy?

mfikes17:01:17

Yeah, both PRs have been merged (news and Quick Start)

borkdude17:01:09

Any reason why ClojureScript releases aren’t mentioned on https://twitter.com/cognitect ? I see nothing about the previous release.

borkdude17:01:58

oh, I see one from March

dnolen17:01:40

@borkdude they've never used that account to post ClojureScript releases really

Alex Miller (Clojure team)17:01:20

deployed - let me know if it looks good

dnolen17:01:55

looks great!

dnolen18:01:13

thanks much