lein pom includes :dev dependencies in <dependencies> for some composite profiles #14

Open
opened 2 months ago by rlb · 1 comments
rlb commented 2 months ago

As an example, you should be able to reproduce this via:

git clone https://github.com/puppetlabs/trapperkeeper-webserver-jetty9
cd trapperkeeper-webserver-jetty9
git checkout 4.4.1
lein pom

Now compojure, for example, should appear in the pom.xml.

As an example, you should be able to reproduce this via: ``` git clone https://github.com/puppetlabs/trapperkeeper-webserver-jetty9 cd trapperkeeper-webserver-jetty9 git checkout 4.4.1 lein pom ``` Now compojure, for example, should appear in the pom.xml.
technomancy changed title from With 2.10.0 (at least), lein pom includes :dev dependencies in <dependencies> for some composites to lein pom includes :dev dependencies in <dependencies> for some composite profiles 2 months ago
Owner

This was introduced in 2.9.2 with the project initialization changes that caused a lot of other profile bugs: https://github.com/technomancy/leiningen/pull/2593

In fact, the root cause is the same as https://github.com/technomancy/leiningen/issues/2687

The documentation has advised against using composite profiles that have maps in them for quite some time, but I think this is an inherent problem with that approach that can't really be fixed without a full rewrite.

I think the solution here is to remove support for the buggy behavior. This is disruptive, but the alternative of silently doing the wrong thing is much worse, and the fix is very easy. (Just move the map to a top-level named profile.)

I've added a warning in a7f3d2b3db but would prefer to expand this so that it actually suggests the change to make to project.clj.

This was introduced in 2.9.2 with the project initialization changes that caused a lot of other profile bugs: https://github.com/technomancy/leiningen/pull/2593 In fact, the root cause is the same as https://github.com/technomancy/leiningen/issues/2687 The documentation has advised against using composite profiles that have maps in them for quite some time, but I think this is an inherent problem with that approach that can't really be fixed without a full rewrite. I think the solution here is to remove support for the buggy behavior. This is disruptive, but the alternative of silently doing the wrong thing is much worse, and the fix is very easy. (Just move the map to a top-level named profile.) I've added a warning in https://codeberg.org/leiningen/leiningen/commit/a7f3d2b3dbcca30a9cdfb3ec870aeb5b0681aceb but would prefer to expand this so that it actually suggests the change to make to project.clj.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: leiningen/leiningen#14
Loading…
There is no content yet.