Fork me on GitHub
#boot
<
2016-06-07
>
juhoteperi06:06:24

the package task will tell it when it fails

codeape18:06:02

Hello, I was wondering if anyone could help with how to do boot options for a task? I don't seem to be able to pass args correctly.

martinklepsch18:06:11

@codeape: sure, what are you trying to do?

codeape18:06:44

I'm using adzerk's boot-cljs-repl library. I want to pass the port for the websocket port that the reloads run through because it's currently random.

codeape18:06:36

I've tried (cljs-repl :port 3449) which doesn't work.

martinklepsch18:06:16

@codeape: the syntax is definitely correct šŸ™‚ besides that I'm not sure what you're trying to achieve

codeape18:06:31

Hunh, perhaps it's a bug. Thanks.

anmonteiro19:06:14

@codeape: if you want to change the port where reloads run, maybe change that in the reload task? šŸ™‚

lsnape20:06:25

Iā€™m having trouble pulling in clojure 1.9.0-alpha5 using boot 2.6.0. BOOT_CLOJURE_VERSION set to 1.9.0-alpha5 in the project + boot.properties file, yet *clojure-version* reports 1.8.0 always, and I canā€™t require clojure.spec. Any idea what Iā€™m missing here?

micha20:06:28

@lsnape: what does boot show -d show? do you have a clojure dependency in your :dependencies? because a lot of time you end up with one from transitive deps

lsnape20:06:11

boot show -d
[org.clojure/clojure "1.9.0-alpha5ā€]
thatā€™s it!

lsnape20:06:21

I stripped the project right down

micha20:06:27

let me try

lsnape20:06:25

I had some stuff in profile:

(require 'boot.repl)

(swap! boot.repl/*default-dependencies* concat
       '[[refactor-nrepl "2.2.0"]
         [cider/cider-nrepl "0.12.0"]])

(swap! boot.repl/*default-middleware* conj
       'refactor-nrepl.middleware/wrap-refactor
       'cider.nrepl/cider-middleware)

micha20:06:55

i wonder if you add :exclusions [org.clojure/clojure] in those deps?

micha20:06:08

the *default-dependencies* ones

lsnape20:06:26

yeah ok, Iā€™ll try that

micha20:06:31

it could be something weird with nrepl, perhaps

lsnape20:06:25

{:major 1, :minor 9, :incremental 0, :qualifier "alpha5"}
boot.user=> 
šŸ‘

micha20:06:56

whew! was it the :exclusions?

lsnape20:06:01

So yeah clojure 1.8 mustā€™ve been pulled in be either of those deps

lsnape20:06:19

yep, thanks for your help!

micha20:06:22

ah right, yeah i see it now

micha20:06:30

so the reason why that happened i think

micha20:06:43

is because those dependencies are loaded only when you use the repl task

micha20:06:56

so they're loaded after the rest of your dependencies are loaded

micha20:06:09

so it's possible for them to pull in new versions of things you already have

lsnape20:06:14

Ah, so is there no way to show them with boot show -d?

micha20:06:23

actually yes, interestingly

micha20:06:51

actually no lol

lsnape20:06:55

I guess a better question is whether thatā€™s appropriate or not

micha20:06:15

they're added secretly, so they don't mess with your dependencies when you're working in the repl

micha20:06:28

that might not be a great idea

micha20:06:45

we may be better off with explicitly adding the repl dependencies

micha20:06:01

with :scope "test"

micha20:06:12

yeah i think that sounds right

lsnape20:06:01

Sounds good to me!

lsnape20:06:12

IMO the more visible the better

micha20:06:37

yeah me too

micha20:06:57

also i think it should automatically add :exclusions for all dependencies you already have loaded

micha20:06:09

so there is no chance of pulling in a new conflicting version

micha20:06:19

i guess really it's only clojure

micha20:06:28

i don't think nrepl depends on anything else, iirc

micha20:06:46

anyway if you would like to make a github issue i will fix it

micha20:06:26

just adding the :exclusions will help, and we can fix the visibility with the 3.0.0 release if necessary

lsnape20:06:51

sure, will do

lsnape20:06:33

I canā€™t think of a reason why we would ever want default-deps overriding the clojure version

micha20:06:00

yeah, this is a downside to being able to dynamically add dependencies at runtime

micha20:06:11

maven was really intended to run only once

micha20:06:21

because you can't remove a jar from the classpath

micha20:06:34

so it can't recompute transitive deps

micha20:06:56

so what happened there was when we added the nrepl dependencies it also installed their transitive deps

micha20:06:04

which means we loaded clojure dep again

micha20:06:09

which isn't good lol

micha20:06:17

did you get a warning about it when it happened?

lsnape20:06:49

No nothing at all

micha20:06:03

ah, bummer

micha20:06:10

we'll fix it

lsnape20:06:50

But then again my application currently has no source, so very little for it to complain about šŸ˜„

lsnape20:06:27

np! Glad that hitting my head on this was fruitful in a way