Data passed to -Sdeps is merged with local `deps.edn`
Description
I was under they impression that when using -Sdeps the passed in string would be treated as if a deps.edn with exactly that content existed.
Particularly the description caused that expectation: "Deps data to use as the final deps file".
I now learned that the data passed to -Sdeps is still merged with a local deps.edn if such exists.
While at least the docstring should get improved in some way I also wish for an option that allows me to pass any data which will then be treated as if a deps.edn with that content existed. An option like this would make the clojure tool more useful for scripting since it would allow a more consistent environment.
Environment
None
Activity
Alex Miller
September 15, 2018 at 1:50 PM
Released in 1.9.0.391
Alex Miller
July 17, 2018 at 7:29 PM
Doc and help for -Sdeps updated in 0f272a8 for next release.
Placeholder ticket for meaning of -Srepro logged at TDEPS-88.
Martin Klepsch
July 17, 2018 at 7:27 PM
This is the expected and intended behavior. So I'd say that is more of a doc enhancement.
I agree, just opening this issue to track it since I think "final" is potentially confusing/less precise than alternatieves like the "last in the chain" you used to describe it.
Using "-Srepro -Sdeps ..." is probably closer to what you want,
It's closer in that it ignores the user's deps.edn but it will still take into account a deps.edn in the current working dir.
Alex Miller
July 17, 2018 at 7:24 PM
Here, "final" means "last in the chain", not "only". This is the expected and intended behavior. So I'd say that is more of a doc enhancement.
Using "-Srepro -Sdeps ..." is probably closer to what you want, but it is still somewhat in flux against other potential changes.
I was under they impression that when using
-Sdeps
the passed in string would be treated as if adeps.edn
with exactly that content existed.Particularly the description caused that expectation: "Deps data to use as the final deps file".
I now learned that the data passed to
-Sdeps
is still merged with a localdeps.edn
if such exists.While at least the docstring should get improved in some way I also wish for an option that allows me to pass any data which will then be treated as if a
deps.edn
with that content existed. An option like this would make theclojure
tool more useful for scripting since it would allow a more consistent environment.