Fork me on GitHub
#shadow-cljs
<
2018-02-05
>
thheller13:02:53

I just published 2.1.0 which might break your build if you were using relative requires. I did a rework on that to hopefully gain better support for working with local .js files. It might unintentionally present other bugs as well. Please try it.

thheller13:02:54

@hlolli you might be interested in this. I believe you were trying to deal with this a while ago (ie. use a .js file in a library jar)

hlolli13:02:20

@thheller perfect timing, I try it!

theasp19:02:44

Is shadow-cljsjs 0.0.5 still valid? I'm getting react-15.5.4-0.jar deps.cljs refers to file not in jar: cljsjs/react/development/react.inc.js

thheller19:02:56

thats an outdated cljsjs/react version. either exclude it or bump to a newer version

thheller19:02:15

shadow-cljsjs has nothing to do with that

theasp19:02:38

Ah, I figured thats where the deps.cljs was from

thheller19:02:58

nope thats the cljsjs/react package itself

theasp19:02:23

What would have changed? I'm not requiring react directly, just through reagent 0.7.0

thheller19:02:58

CLJS itself does not validate deps.cljs files so "errors" in those files go unnoticed easily

thheller19:02:10

shadow-cljs validates those files and checks if the contents are correct

thheller19:02:32

in this case the jar file does not contain a file it is referring too

thheller19:02:39

that error has been there for a long time

thheller19:02:55

just add [reagent "0.7.0" :exclusions [cljsjs/react cljsjs/react-dom]] since we are not going to use them anyways

theasp19:02:06

Yes, that makes sense. Why is it breaking all of a sudden though?

theasp19:02:18

i.e. it worked yesterday

thheller19:02:32

breaking? should just be a warning

thheller19:02:57

oh wait did you upgrade to 2.1.0 and it is breaking now?

thheller19:02:06

maybe I remove a try/catch accidentally

theasp19:02:10

Oh, no, it's not a warning:

failed to start service
{:id :classpath}
ExceptionInfo: failed to start service
        clojure.core/ex-info (core.clj:4739)
        clojure.core/ex-info (core.clj:4739)
        shadow.runtime.services/start-many/fn--15833 (services.clj:135)
        shadow.runtime.services/start-many (services.clj:126)
        shadow.runtime.services/start-many (services.clj:105)
        shadow.runtime.services/start-all (services.clj:144)
        shadow.runtime.services/start-all (services.clj:139)
        shadow.cljs.devtools.server/start-system (server.clj:191)
Caused by:
/home/asp/.m2/repository/cljsjs/react/15.5.4-0/react-15.5.4-0.jar deps.cljs refers to file not in jar: cljsjs/react/development/react.inc.js
{:tag :shadow.build.classpath/deps-cljs, :source-path #object[java.io.File 0x64c82a3b "/home/asp/.m2/repository/cljsjs/react/15.5.4-0/react-15.5.4-0.jar"], :name "cljsjs/react/development/react.inc.js"}
ExceptionInfo: /home/asp/.m2/repository/cljsjs/react/15.5.4-0/react-15.5.4-0.jar deps.cljs refers to file not in jar: cljsjs/react/development/react.inc.js
        clojure.core/ex-info (core.clj:4739)
        clojure.core/ex-info (core.clj:4739)
        shadow.build.classpath/process-deps-cljs/get-index-rc--17183 (classpath.clj:252)
        shadow.build.classpath/process-deps-cljs/fn--17187 (classpath.clj:265)
        clojure.core/map-indexed/mapi--8189/fn--8190 (core.clj:7228)
        clojure.lang.LazySeq.sval (LazySeq.java:40)
        clojure.lang.LazySeq.seq (LazySeq.java:49)
        clojure.lang.RT.seq (RT.java:528)

theasp19:02:26

Sorry, I could have been clearer 😉

thheller19:02:49

but you upgraded to 2.1?

thheller19:02:02

fixing, just a sec

thheller19:02:30

add the exclusions if you don't want to wait 😉

theasp19:02:17

Yup, works, thanks 🙂

theasp19:02:36

oh, no, still errored out

theasp19:02:42

just took longer

theasp19:02:04

re-frame probably

thheller19:02:11

might be coming from a different dep now 😛

thheller19:02:40

unfortunately basically all CLJS libs still expect to use cljsjs

thheller19:02:49

you can also add [cljsjs/react "15.6.2-4"] do your dependencies so you don't have to exclude it for everything

thheller19:02:19

trying to figure out why it didn't error out previously

thheller19:02:37

or rather why it errors out now .. the file is actually in the jar

thheller20:02:12

@theasp fixed in 2.1.1. thanks for the report.

theasp20:02:39

Awesome, thanks for the quick fix

mynomoto20:02:09

Did someone try shadow-cljs for building react-native projects? Is there a sample project somewhere?

mynomoto20:02:38

@thheller I will take a look, thanks!

thheller20:02:07

"shadow-cljs": "^0.18.0" hehe cute 😛

thheller20:02:43

should still work though

justinlee20:02:14

@shaunlebron That is super weird timing. I was just writing this comment at the exact same time: “I finally drank two cups of coffee and read through the shadow-cljs guide. what a monumental project this is. I do not understand where you found the time.”

shaunlebron20:02:01

💯 haha, on the same wavelength. very excited to see the attention to detail on docs. very well written

shaunlebron21:02:33

@lee.justin.m i don’t get it either, thomas has been working on this for some 3-4 years

thheller21:02:24

almost full time for the past 6 months or so, but yeah lots of work since dec 2013

justinlee21:02:54

i keep markdown notes to myself when i’m working through something complicated. you should see the file i wrote when trying to figure out JS import stuff based on the http://clojurescript.org docs. i really now wish i had gone with shadow first

shaunlebron21:02:38

yeah, thomas’s blog posts on importing js libraries are really good

shaunlebron21:02:12

@thheller awesome you took some time off to work on it, it really shows. let us know if you’re letting people support your work yet (patreon or whatever)

thheller21:02:30

yeah still thinking about where I want to go with that. I still want to do so much more but can't really justify doing it since I need to get back to actual work soon.

shaunlebron21:02:30

i was in the same situation in november after taking 6 months on parinfer

shaunlebron21:02:59

the patreon stuff helps me treat the project as a part-time job to justify time spent

thheller21:02:40

yeah. I still need to look into that properly. Last time I checked the tax situation for patreon in germany was weird.

lilactown23:02:23

is there a suggested way to run tests on Node.js for CI?