https://github.com/RickMoynihan/lein-tools-deps/pull/93 sounds like it doesnt
I'm using clojure -Sdeps "${DEPS}" -X:uberjar
and I've noticed that -Sdeps
is not honoured anymore (I previously was using -M:uberjar). The var ${DEPS}
contains a custom mvn/repos....
configuration to set a local company proxy to be the source for central
and clojars
. Am I missing something to now use -Sdeps
?
The default behavior is as-if -Srepro
per the docs for 2.0.
You can specify :repro false
if you need the user deps included. But the command line deps are not part of the project basis.
You need to put that in an alias and then tell depstar
about it via :aliases '[...]'
hmmm
that's wont work for custom overrides
for example, when building in a pipeline, the repo is different than building locally
so, previously, in the pipeline (on gitlab), I was able to override the default ones that come with clj (maven and clojars)
without having to touch the deps.edn in the project, which can be different for usecases
Open an issue to add some sort of :deps
argument
to depstar?
Yes
I'm not sure this is a depstar issue
This is more on how deps are resolved, and permitting the user to override (or merge in a deps file) from the commandline, like -Sdeps
did before
The -Sdeps
CLI argument only applies to the runtime basis, not the computed project basis
This applies to all tools that explicitly compute the project basis
Okay, so the "global" mvn/repos
key - that can't be replaced with the :aliases '[...]'
functionality in depstar?
an alias can't override the global mvn/repos
key?
I think the project basis and runtime basis should both allow for the key for mvn/repos
to be overridden to suit this - to replace where deps are found (esp when running in a container - for building)
The project basis is computed from the system, user, and project deps.edn
files. The -Sdeps
argument is only for the CLI script itself and that information is "gone" by the time the tool runs. depstar
by default omits the user deps.edn
(i.e., as-if -Srepro
) but you can override that with depstar
's :repro false
argument so that it includes user deps.edn
in the project basis computation.
So to override the :mvn/repos
key, it either needs to be in the user deps.edn
file (`:repro false`) or the project deps.edn
file.
So, if I do :repro false
and include a mvn/repos
in my project deps.edn, it should work
Or every tool needs a way to provide additional deps from the command-line like the CLI script allows.
This is why depstar
(and several other tools) has an :aliases
argument: the aliases used by the tool to compute the project basis are not the same as the aliases used by the CLI to compute the runtime basis needed to start the tool.
Hence my suggestion to create an issue against depstar
to add some new command-line argument to allow additional deps.edn
-style context to be provided for the computation of the project basis.
(this is also why I created the post on http://ask.clojure.org about a higher-level API for tools to use t.d.a for exactly this sort of computation)
would you support a procurers
argument?
I don't think that mechanism is open for extension in t.d.a right now?
I'm not sure I fully grok this yet - but have to disppear for a bit - kid needs bed time!
🙂
procurers are open for extension if you're using the library - they're just multimethods
@alexmiller hard to use with :replace-deps
unless you add it as part of the same tool deps, I guess?