This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-12
Channels
- # aleph (1)
- # aws (2)
- # babashka (44)
- # beginners (178)
- # biff (12)
- # calva (22)
- # chlorine-clover (60)
- # cider (1)
- # clj-kondo (9)
- # cljdoc (6)
- # cljs-dev (37)
- # cljss (2)
- # clojure (43)
- # clojure-europe (3)
- # clojure-finland (23)
- # clojure-italy (1)
- # clojure-nl (4)
- # clojure-norway (3)
- # clojure-spec (56)
- # clojure-uk (148)
- # clojuredesign-podcast (1)
- # clojurescript (11)
- # conjure (5)
- # core-async (22)
- # cursive (9)
- # datascript (5)
- # datomic (4)
- # duct (8)
- # emotion-cljs (2)
- # figwheel-main (15)
- # fulcro (53)
- # graalvm (68)
- # helix (2)
- # jackdaw (1)
- # kaocha (9)
- # lambdaisland (1)
- # malli (10)
- # meander (2)
- # news-and-articles (1)
- # observability (12)
- # off-topic (17)
- # pathom (1)
- # pedestal (25)
- # practicalli (1)
- # protojure (4)
- # re-frame (2)
- # reagent (57)
- # reitit (1)
- # releases (2)
- # shadow-cljs (69)
- # specter (6)
- # tools-deps (10)
- # vim (16)
- # vscode (4)
- # yada (3)
@darwin you are the chrome extension expert: do you know if there is any way for a chrome devtools extension to talk directly to workers? I mean eval code in a running worker? I can only find things to eval in page?
Did it add a dep? Reorder them? Put white space? Remove entries? Chop half the file? Rot 13 it? Just wondering what it did.
running: yarn add --exact @js-joda/[email protected]
I spent some hours getting js-joda working right, and I don’t feel very good about my versions being messed with. I don’t know that this broke something, but it gives me a strong sinking feeling (I now have to go test things to see what might have broken), and is not what I want my build tools doing to me.
what’s the diff of your package.json?
like, it was in state (a), you ran a shadow-cljs cmd, now it’s in state (b) - what’s the difference between a and b, and what command did you run?
@tony.kay it will only install dependencies if they aren't already in your package.json
but are declared in a deps.cljs
in some library you use
but there seems to be a caching problem with npm deps I haven't yet figured out https://github.com/thheller/shadow-cljs/issues/727
but shadow-cljs will not modify your package.json if the deps are already in there ... you can also set :npm-deps {:install false}
in the top level of shadow-cljs.edn. then it won't even do that.
ah, ok. Good to know there’s a toggle. I figured you had thought it through…just a little jarring.
what is exactly? I mean the JS dep seems to be required right? do you want to install it yourself and have your app break?
now that I think of it, I upgrade shadow at the same time as some other libs…so it was certainly one of those libs that did it to me 😛
it’s early…I thought perhaps your new inspect tool wanted something in package.json or something
don't you have your package.json in git? I mean what exactly happened should be easy to tell no?
well that wouldn't be any different in JVM land either if you add a dep under a different name
well, but in js-land I don’t trust that package authors keep things out of the global space…so then I’m not sure what I have
like I said: not sure that anything broke, but just so very tired of the js ecosystem’s fragility
well its actually not that common that things end up in global somewhere but you may be passing non-scoped things to other things that expect the new scoped things
so that would be a problem but the origin seems to be in some other dep you bumped as well as shadow 😛
yeah, like I said, it was just a combo of that (changed versions on mulitple things at once), and it being the first time I’d noticed shadow changing my package.json
yeah, but the behavior is safe IMHO. add the dep only if it is not already listed, otherwise leave it alone.
but yeah I'm not a fan of :npm-deps
in deps.cljs
at all ... but also have no better ideas 😛
Cool. js-joda has add-ons (like locales) that seem to plug into the base, so changing from non-scoped to scoped seems like potential breakage.
but yeah, in the past I’ve been perfectly happy with a build error like “react-dom” not found. Is it in your package.json? That’s what shadow used to do, right?
the :npm-deps
behavior is reaaally old. it always worked like that. the only thing I added recently is the ability to turn it off.
I thought you had to turn it on…didn’t realize it had been on all this time. esp since I’ve seen any number of compiler errors about things missing from package.json over the years
https://github.com/thheller/shadow-cljs/commit/83ee468855725667c9a6407d72fc8b23cb661327
ah, for someone that helped you with the book and has been maintaining cljc libs for 5 years…you’d think I’d have caught up on this one 😄 So, the deps.cljs was your invention, and now adopted in regular Clojurescript? That was never clear to me. I just remember trying that early mess in stock cljs builds where it tried to do the backflips with npm.
just used to do more than one thing in regular CLJS. In shadow-cljs it only ever had one function.
I see…thanks for catching me up. I’ve been avoiding this topic ever since I tried to get that mess to work 4-5 yrs ago (before I discovered shadow). Been happy with the “manually manage package.json, and fix it when shadow tells me to”
can I use the same code base for two targets? :browser and react-native? or they are two completely different worlds?
Can webworkers connect to shadow CLJS dev server on 9630? So that we can tap> with them as well?
@wvelezva thats fine yes. depends on how you want to organize the code I guess. I know some people prefer to keep it in one project and others prefer to split.
Cool! It makes it easier to use them haha. I wonxer if we could even hook re-frame-10x to them.