cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
dazld 2020-05-26T12:50:08.260300Z

we're still seeing some inference warnings when using satisfies? - wondering if this is being tracked already? i can try to make a repro case if useful too

mfikes 2020-05-26T12:53:15.260900Z

I don't recall any remaining open issues surrounding satisfies? and type inference, so a JIRA with minimal repro would be useful

👍 1
dnolen 2020-05-26T13:00:14.262600Z

@roman01la just not interested in changing the string concatenation because of Jsonp api changes, as @thheller alludes the issues are too subtle

dnolen 2020-05-26T13:00:40.263100Z

you need to follow Closure conventions here - we're not going to make it more convenient

dnolen 2020-05-26T13:01:32.263600Z

we encountered the same thing with the code splitting loader - goog.html.legacyconversions.safeUrlFromString works just fine

bhauman 2020-05-26T15:43:18.264600Z

so :npm-deps {package "1.2.3"} is incompatible with :target :bundle ?

bhauman 2020-05-26T15:44:36.265800Z

also if folks specify :install-deps the compiler throws an error.

[Figwheel:SEVERE] java.lang.IllegalArgumentException: contains? not supported on type: java.lang.Boolean

dominicm 2020-05-26T15:44:55.266200Z

Oh, I thought I'd broken that. ^ I've reproduced that myself.

bhauman 2020-05-26T15:45:04.266400Z

because :npm-deps is true

bhauman 2020-05-26T15:52:20.268100Z

There just needs to be a guard in the meantime

dnolen 2020-05-26T16:09:42.268600Z

:npm-deps means something slightly different now

dnolen 2020-05-26T16:09:53.269Z

it really just declares dependencies

dnolen 2020-05-26T16:10:48.270100Z

:install-deps is still there and uses :npm-deps, but it's so slow

dnolen 2020-05-26T16:10:59.270500Z

clj -m cljs.main --install-deps preferred

dnolen 2020-05-26T16:11:22.271100Z

instead of putting in your build config which slows down build and REPL

dnolen 2020-05-26T16:11:55.272Z

the other thing that :npm-deps does is notify the compiler needs to index node_modules

bhauman 2020-05-26T16:12:03.272300Z

There is a bug where merge overwrites :npm-deps with true, and calling :install-deps throws when using the :bundle target

dnolen 2020-05-26T16:12:59.273400Z

that's a bit too succinct for 2 bug reports

dnolen 2020-05-26T16:13:04.273600Z

is that one thing or two things?

bhauman 2020-05-26T16:13:55.274200Z

its really one thing

bhauman 2020-05-26T16:14:12.274600Z

:install-deps conflicts with :bundle

bhauman 2020-05-26T16:14:47.275200Z

becase add-implicit-deps overwrites :npm-deps with true

bhauman 2020-05-26T16:15:01.275600Z

and then install-deps expects a map

dnolen 2020-05-26T16:18:22.276100Z

@bhauman fixed in master

bhauman 2020-05-26T16:18:33.276300Z

thanks!

bhauman 2020-05-26T16:19:01.277100Z

this was an issue that @gdanov debugged this morning

bhauman 2020-05-26T16:19:13.277500Z

https://github.com/bhauman/figwheel-main/issues/247

dnolen 2020-05-26T16:19:21.277800Z

just tweaked check-npm-deps to handle the boolean case for :npm-deps

dnolen 2020-05-26T16:19:53.278600Z

in truth :bundle is just sugar

dnolen 2020-05-26T16:20:04.279Z

you could have encountered this with just compiler options

dnolen 2020-05-26T16:20:33.279700Z

i.e. upstream node deps + :install-deps true

bhauman 2020-05-26T16:21:36.280800Z

its fair to say that folks should not have deps specified in :npm-deps when wanting a bundle target?

dnolen 2020-05-26T16:59:38.282200Z

@bhauman :bundle is specifically designed to work :npm-deps

bhauman 2020-05-26T16:59:52.282500Z

to add values to it

bhauman 2020-05-26T16:59:54.282700Z

?

dnolen 2020-05-26T17:00:07.283100Z

it's designed to work with it period

dnolen 2020-05-26T17:00:15.283500Z

you need to be able to declare deps and get upstream deps

dnolen 2020-05-26T17:00:50.285300Z

this gets you ClojureScript libs that depend on node_modules instead of CLJSJS etc.

lilactown 2020-05-26T17:01:01.285500Z

yeah from what I understood, :bundle means that as a lib author I should def start including :npm-deps in a deps.cljs in my lib

lilactown 2020-05-26T17:01:45.286300Z

if there’s something broken with :npm-deps and :bundle then I’d assume it’s a bug

dnolen 2020-05-26T17:02:27.287400Z

Krell depends on this feature, and I believe some demos/examples have been made

bhauman 2020-05-26T17:03:19.288100Z

OK my main question is: Is it intended that :bundle will always set :npm-deps to true, even if its populated with deps declarations?

dnolen 2020-05-26T17:03:41.288500Z

oh that's a bug if it overwrite

bhauman 2020-05-26T17:04:01.289Z

yes that’s what I was getting at 🙂

bhauman 2020-05-26T17:04:28.289700Z

in this clause it gets overwritten

bhauman 2020-05-26T17:06:05.290800Z

I’m super close to releasing the next version of figwheel that supports all of this better and I just wanted to clarify things

dnolen 2020-05-26T17:08:20.291200Z

@bhauman yeah I didn't notice it because I stopped using :install-deps true

dnolen 2020-05-26T17:08:23.291400Z

fixing

👍 1
dnolen 2020-05-26T17:09:59.291800Z

yeah definitely two different bugs, both fixed now @bhauman

👍 2
bhauman 2020-05-26T17:19:39.292500Z

those were tough ones for folks switching over :simple_smile:

dnolen 2020-05-26T17:28:52.293Z

yeah pretty bad bugs, let me know when you want me to cut another release to depend on

bhauman 2020-05-26T18:03:53.293700Z

yeah a new release pretty soon would be great

dnolen 2020-05-26T18:13:36.293900Z

started one now

dnolen 2020-05-26T18:19:15.294100Z

@bhauman 1.10.773

dominicm 2020-05-26T18:43:34.295600Z

@dnolen I know I asked before, but if I wanted to programmatically install deps, is there another api I should use? Probably the same one as cljs.main?

dnolen 2020-05-26T18:50:24.295900Z

yes same as cljs.main

bhauman 2020-05-26T19:55:43.296400Z

@dnolen thanks!

dnolen 2020-05-26T19:55:49.296700Z

np