Deps.edn alias works with clj -A, but boot deps -A throws errors

I have fairly simple deps.edn that includes an alias for rebel readline


     :aliases {:rebel  {:extra-deps {com.bhauman/rebel-readline {:mvn/version "0.1.4"}}
               :main-opts ["-m" "rebel-readline.main"]}}

from the comandline:
$ clj -A:rebel #works! rebel starts up!

but when using the boot-tools-deps library:

$ boot deps -A:rebel
    ...blah blah lots of pain, nashing of teeth...
    clojure.lang.ExceptionInfo: Specified aliases are undeclared: [:pod/rebel]
    line: 27

I’m clearly misunderstanding how works. Apologies in advance.

Ok. I think I got this:

$ boot deps -A rebel -x #works! rebel launches!

-A = include the alias named by the next argument (no keywords required?)

-x = execute any main-opts passed in

Yes, you need to a) use Boot-style command-line arguments (which means -A alias1 -A alias2 rather than the clj-style of -A:alias1:alias2) and b) you have to explicitly tell boot-tools-deps that you really want to run the :main-opts rather than let Boot do its usual default runtime.

The latter makes it easier to work with aliases that both add dependencies and run code for clj, since you’ll often want to get the dependencies but still let Boot run code its own way.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.