given :main-opts in my :test alias and none in my :dev alias, is there a way for me to start with clojure.main so I can do clj -M:dev:test -e ,,,? clj -M:test:dev will run :main-opts from :test which I don’t want.
The hack I use for this is:
clj -Scp $(clj -Spath -A:dev:test) -M -e ...Optimally you should be able to:
clj -A:dev:test -M -e
but currently -A: still runs :main-opts which I hope will be removed sooner than laterUse -r to start a REPL: clj -A:dev:test -r
@seancorfield -A:dev:test will still kick off the :main-opts of the :test alias, no?
and shouldn't this be -M -r?
Hmm, I shouldn't offer advice at 6 am without coffee. I use -r on some projects but I think maybe I have an empty :main-opts in an alias and use that to override previous :main-opts
Ah, you can hack around it by doing clj -X:dev:test -M -r
I will now either go back to bed for a few hours or make a ☕
ah nice, the -X is good :)
thanks for the hack!
Unfortunately the -X hack didn't work, I'm getting:
Unqualified function can't be resolved: -M@alexmiller When can we get -A with ignorance of :main-opts? 🙏
After add-libs :)
Can’t you just split into two aliases as a workaround? Seems like you’re making this so hard
yes, that has been the workaround, but it's a workaround that keeps coming up ;)
but good to hear it's coming
Still hoping this will happen soon. See discussion in https://app.slack.com/client/T03RZGPFR/C02FBBU61A9/thread/C02FBBU61A9-1689157272.648009 cc @mkvlr @teodorlu
Why are the resources and target dirs included in :paths ["src" "resources" "target"] in the documentation of figwheel? Isn't this option for listing source code directories?
https://figwheel.org/docs/create_a_build.html
Did you mean to ask that in the #figwheel-main channel?
Oh, yeah. But anyway, it's deps.edn.
Sure, but only Figwheel users (or possibly only the Figwheel maintainers) will know the answer to this.
:paths just puts folders on the classpath so they're available when running code.
(so, no, it's not just source code directories -- it's anything you want on the classpath)
Having target on the classpath sounds a bit odd to me but I guess it depends what Figwheel puts into that folder.
If you've been using Leiningen (or Boot) previously, maybe this old blog post of mine will shed some light? https://corfield.org/blog/2018/04/18/all-the-paths/
Yeah, this explains a lot, thanks.
I don't think this is the reason figwheel chose this, but having the target/classes directory in paths is somewhat necessary for libraries that support deps/prep-lib
example: https://github.com/http-kit/http-kit/blob/master/deps.edn