-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
leiningen command-line update-in has lower priority than ~/profiles.clj #1969
Comments
No, this is definitely a bug. The profile setting should not be able to override what's explicitly entered in the update-in task.
|
@technomancy thanks for the quick qualif! |
How easy this is depends on whether it's a bug in the |
As a workaround and FYI, |
Also, I've looked into this due to #1981, and it seems that the problem at hand here is quite convoluted because I'm not entirely sure whether this is expected functionality or not. Many tasks merge in extra profiles when they need or where it's expected – perhaps the best known example is uberjar, but repl also does this. In a sense, you can consider those tasks of expanding into something equivalent of So if we have the following profiles.clj fil (or as a profile in project.clj) {:a {:jvm-opts ["foo" "bar"]}} Then what would you expect the It's entirely possible to make update-in changes to the project map unaffected by merge logic (i.e. they always win in a merge), but this may have unintended and confusing consequences down the line. I think that would cause more harm than good in some cases. For example, if the changes were immutable and you want to see how a project works with the latest clojure version, then |
I've thought about this and can see a sensible way out of this. However, that particular solution won't be available before a preview of 3.0.0 lands. As such, I've placed this issue in the 3.0.0 milestone. If there's an immediate need for update-in to be prioritised over everything else, I can add in functionality for that in 2.x, but for now I'd like to punt it. |
clojure-emacs/cider#1824 may be related to this one? It seems that whatever added with If I switch off the cider autoinjecting dependencies and define the necessary dependencies in the Wonder if throwing #2074 into the mix is appropriate here? What I mean is it seems that it would be nice to have a command line way of adding deps/plugins overriding anything but seeing the whole classpath (incl transient deps as well) |
@benedekfazekas: Do you mean transitive dependencies? I'd be surprised if that would be an issue related to |
yes, sorry, i meant transitive deps of course. thanks @hypirion |
At this point I honestly think this is unlikely to ever happen; the disruption caused by this change is greater than the problem it would fix. |
CCW, when launching is project server REPL, is forcing a project's JVM to start in debug mode by adding this to the leiningen command line:
lein .... update-in :jvm-opts concat ["-Xdebug" "-Xrunjdwp:transport=dt_socket,server=y,suspend=n"] -- repl
.Many people seem to have
{:user {:jvm-opts ^:replace []}}
in theirprofiles.clj
. When it is so, then theupdate-in ...
command-line stuff is silently ignored as can be seen by inspecting the project's process command line created by Leiningen.So, a whole category of people are currently unable to launch their project with a REPL in Debugging mode.
Is it normal that what is declared on the command line does not take precedence over what is declared in
~/.lein/profiles.clj
(or even./project.clj
- not tested`) ? I would say it's not normal.What do you think? Bug? Or should CCW be doing things differently to force the insertion of the remote JVM debug options to the project process through invoking the leiningen command?
The text was updated successfully, but these errors were encountered: