Fork me on GitHub
#boot
<
2015-06-19
>
andrewmcveigh12:06:59

Hi, I’m having issues with boot & cljs deps.

andrewmcveigh12:06:28

TBH I don’t really ‘get’ how boot does dependencies, but other dependencies seem to be working.

andrewmcveigh12:06:51

I get java.io.FileNotFoundException: Could not locate cljs/util__init.class or cljs/util.clj on classpath: when trying to require cljs namespaces

andrewmcveigh12:06:43

Ah… maybe this is .cljc related?

martinklepsch12:06:56

What’s unclear about how boot handles deps? Probably best to get that right first. @andrewmcveigh

andrewmcveigh12:06:47

Well, I guess the fact that it doesn’t load them into the repl like leiningen.

martinklepsch12:06:47

Make sure to have Clojurescript with a version that supports .cljc if you’re trying to load cljc files.

andrewmcveigh12:06:56

But, I’ve fixed the issue.

andrewmcveigh12:06:17

I didn’t have boot on the right clojure version.

martinklepsch12:06:08

How does Leiningen load them into the repl? I think they should behave similary

andrewmcveigh12:06:21

I guess it took pasting that exception into this window for me to read it properly.

martinklepsch12:06:26

Whatever floats your boat simple_smile

andrewmcveigh12:06:38

I think I just made a load of assumptions about how boot worked, based on the fact that it wasn’t working for me

martinklepsch12:06:28

If you have suggestions for things that could use more documentation or more prominent placement totally let people here know simple_smile

andrewmcveigh12:06:03

I guess the thing that threw me off here is that the clojure dependency that’s set in (set-env! :dependencies …) isn’t the one that the repl starts with.

andrewmcveigh12:06:09

Followed by pods

andrewmcveigh12:06:39

‘cos I assumed that I must have completely misunderstood what boot was when I started reading about pods.

martinklepsch12:06:59

Did you read the wiki pages?

martinklepsch12:06:28

Probably we could add a warning if people specify clojure itself as dependency using set-env!?

andrewmcveigh12:06:32

Yeah, but I possibly started in the wrong place.

andrewmcveigh12:06:16

I guess it’s not usually that much of an issue, unless you’re trying to use cljc

andrewmcveigh12:06:17

And I had read about setting the clojure version, but it didn’t really sink in.

ragge12:06:44

@martinklepsch: the need to set clojure version both in properties and and env?

martinklepsch12:06:48

@ragge yes. if you use 1.6 most of the time it will just work without using set-env! because it’s pulled in via another dependency but with 1.7 that’s not the usual case.

martinklepsch12:06:38

> Probably we could add a warning if people specify clojure itself as dependency using set-env!? To correct this: there should be a warning if the Clojure dependency in Boot’s env differs from the one specified in boot.properties

andrewmcveigh12:06:21

@martinklepsch: Yes, I think this ^^ would have helped

ragge12:06:50

@martinklepsch: sounds like a good enhancement. tbh, can't really think of a case where you'd actually want different versions, but might be missing something...

martinklepsch12:06:31

I’m not sure if different versions would work at all. 😛

micha14:06:23

ragge: did you see what I did with your PR?

ragge14:06:50

@micha: yes, thanks, sorry for not reacting to your comments quicker

ragge14:06:06

@micha: first I thought you missed my comment about the possible breakage, but then I saw the next commit

micha14:06:56

ragge: it's merged into master now, that's cool right?

ragge14:06:48

micha: yes, with your fix it looks good.. haven't actually tried master, can do now

ragge14:06:02

micha: was actually just about to pick up the project where i initially encountered the error

ragge14:06:13

hmm, actually not sure about your comment in that commit though

ragge14:06:43

if you pass someone a stream, you don't expect them to close it unless that's agreed in some contract (docstring in the case of clojure)

micha14:06:07

you're right

ragge14:06:11

in this case, you could pass a stream, a downstream functions uses it in with-open, which closes it, and when you're back in control it's already closed

ragge14:06:26

i don't think that issue exists in this particular path

micha14:06:38

we can fix this though, luckily

micha14:06:09

i can add a check of (insance? java.io.InputStream new-stream-or-url)

micha14:06:19

and skip the with-open in that case

micha14:06:32

s/insance/instance/

micha14:06:02

you're right about closing streams you don't own

ragge14:06:08

yeah, that'd work

micha14:06:38

haha we're bracketing the target

micha14:06:45

thanks for the help with this

ragge14:06:53

tbh, i haven't looked to closely at how the merging works, maybe streams aren't the right abstraction? could you use File instead?

ragge14:06:01

probably a bigger change though simple_smile

ragge14:06:01

hmm, i guess it can't be a file if it's in a jar...

ragge14:06:18

my uberjar build works fine with latest master anyway

micha14:06:00

i'll make a little private with-open* macro to handle the case where it's already a stream

ragge15:06:22

@micha: any idea when a 2.1.3 might happen? 😉

martinklepsch15:06:07

We need a project.clj ➡️ build.boot task. Almost always the first thing I do in a newly cloned lein project just to be able to do boot watch build-jar 😄

micha16:06:04

we can probably do project.clj --> build.boot transpiling

micha16:06:19

at least to support things like compile and make a jar

micha16:06:37

because project.clj is a DSL

martinklepsch16:06:58

@alandipert: that example will get you into trouble because of sources don’t end up in jars by default w/ boot

alandipert16:06:29

i suspect the end game would be lein in a pod and feed it the project.clj, then inspect its runtime

alandipert16:06:30

altho the project.clj DSL is so broad... it's not clear if parsing directly or letting lein parse and then interpreting the lein runtime is less work

martinklepsch16:06:17

Probably quite hard to support things beside minimal library projects

micha16:06:18

one thing we could do is run lein in a pod and have lein's target dir be a temp dir in boot

micha16:06:22

that we can slurp into the fileset

micha16:06:36

i guess that defeats the purpose lol

micha16:06:23

i think realistically you can't do anything with lein plugins probably

micha16:06:41

so you'd just be trying to figure out which directories are which really

martinklepsch17:06:05

Loading things at runtime — how again? 😕 No luck with (resolve #’bootlaces!)

raywillig17:06:13

Boot is darkness?

alandipert17:06:18

sweet! a nice addition to any profile.boot

micha21:06:21

#C06JU743H created!

micha21:06:59

ragge: we should release 2.2.0 in the next few days btw

micha22:06:01

raywillig: ^^