-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Exclude trees from ammonite dep. #941
Conversation
Does anyone know if POM files have a way of forcing dependencies? IIRC there was a |
But wouldn't the most common way to do this using
Or something similar to that? |
There aren't AFAIK. The dependency management of transitive dependencies cannot be used to force versions of dependencies they pulled. (I just tested that in this project for confirmation). If project A transitively depends on I had thought about having coursier depart from how Maven does, and use dependency management as a way to force versions too. But for now, it just does the same as Maven. |
Since this doesn't seem to be possible. Is the exclusion alright? |
Ok, after reading this PR again I understand the context a bit better and think we want this PR merged. Essentially, it tries to work around some incompatible transitive dependencies by excluding and explicitly listing them. Chris (@ckipp01), it would be very nice to have a code comment (explaining that fact) as part of the patch, to make future maintenance more easy. |
The reason for doing this is to ensure that the version of trees that mill wants is indeed used instead of the newer version that is being pulled in by ammonite-interp. Before this was using `forceVersion()`, but by doing this the forced version doesn't end up in the POM meaning that when someone bootstraps/uses mill via coursier, they are getting the newer trees, which is causing issues with how the main class is detected. You can see more details on this coursier/apps#56 and a huge props to @alexarchambault for finding this.
Sure, I've gone ahead and added a short description in to explain why the |
Thanks! |
The reason for doing this is to ensure that the version of
trees that mill wants is indeeed used instead of the newer
version that is being pulled in by ammonite-interp. Before
this was using
forceVersion()
, which was added 438ebc...6b492a, but by doing this the forcedversion doesn't end up in the POM meaning that when someone
bootstraps/uses mill via coursier, they are getting the newer
trees, which is causing issues with how the main class is detected.
You can see we are getting
4.3.20
here instead of the forced4.3.7
:This is coming from ammonite-interp:
After this change you can see that now the desired
4.3.7
is here:You can find more info about all of this in detail here: coursier/apps#56 thanks to @alexarchambault and his investigative skills.