Fork me on GitHub
#reagent
<
2018-03-24
>
mikethompson00:03:16

Acid Jazz bands?

mikethompson09:03:35

Daniel has just announced the release of re-frame-10x 0.3.0 It includes a big new feature: form level code tracing. You can view exactly how the code in your event handlers executed.

pesterhazy12:03:30

Pretty cool!

justinlee19:03:30

@hoppy how are you compiling? i.e. is this a lein project using a cljsjs version of reagent?

hoppy19:03:17

@justinlee its a lein project, just has [reagent "0.7.0"] in the dependencies is there a better way?

justinlee19:03:13

well i was just making sure you weren’t using shadow-cljs because you do things differently there. there were a number of changes in the way react was packaged and I don’t really remember how it all lines up. this is a dumb question but you’ve cleaned before building?

hoppy19:03:29

all afternoon so far....

justinlee19:03:40

no exclusions in the dependency vector?

justinlee19:03:21

the cljsjs version should package reactdom, which is what appears to be missing

hoppy19:03:47

I kicked it back to 0.6.0 and popped right up.

hoppy19:03:07

I'm not sure how all the cljsjs machinery is spozed to work here.

justinlee19:03:20

well its supposed to load all the necessary items. sorry i’m not quite sure what the issue is.

hoppy19:03:00

it's not particularly urgent, so I'm fine sitting on 0.6.0 for the moment

hoppy19:03:16

have to get some actual work done, ya know?

justinlee19:03:24

oh yes i know about that problem 🙂

justinlee19:03:43

look at this shiny thing… goodbye afternoon…

juhoteperi20:03:41

@hoppy First thing to check for every React problem: lein deps :tree and check which cljsjs React dependency version you have

hoppy20:03:46

[cljsjs/react "15.0.1-1"], which seems be happening because of react-bootstrap, prolly need to bump that one

justinlee20:03:38

ah so if two cljsjs packages have two conflicting dependencies it just includes them both

danielcompton20:03:05

@lee.justin.m I don’t think so? It uses Maven dependency resolution I thought. So there will only ever be one version of an artifact included

danielcompton20:03:54

But Maven only goes by artifact name so if you have two differently named packages with conflicting contents then you can run into trouble

justinlee20:03:28

@danielcompton hm i’m just trying to understand how hoppy got into trouble then. if react-bootstrap is including cljsjs/react “15.0.1-1” and reagent requires (through a couple of transitive dependencies) cljsjs/react 15.6.2-4, how does that resolve without at least a warning?

justinlee20:03:45

AH MY EYES. this is why i’m happy as a clam with shadow-cljs for now 🙂

danielcompton20:03:50

You can turn on warnings with lein

danielcompton20:03:01

:pedantic? :abort

danielcompton20:03:22

You should also see a warning when you run lein deps:tree

danielcompton20:03:31

About conflicting dependencies

hoppy20:03:26

things quieted down after I kicked up react-bootstrap. It seemed to be forcing in an older react somehow

juhoteperi20:03:50

Did you have react-bootstrap or reagent first on your dependencies list?

hoppy20:03:40

reagent was first

hoppy20:03:47

not first, but before

juhoteperi20:03:30

hmh, transitive dependencies should be solved in order but \o/

juhoteperi20:03:53

Anyway, good idea to check lein deps :tree especially if using other libs which depend on cljsjs/react

hoppy20:03:09

appreciate the pointer.

juhoteperi20:03:45

In addition to ensuring all packages uses recent version, you can add :exclusion [cljsjs/react cljsjs/react-dom] to problematic dependencies, or just add direct dependency on cljsjs packages on your project, which will always override any transitive dependencies