Skip to content

Avoid using CoursierModule#mapDependencies - #6873

Merged
alexarchambault merged 4 commits into
com-lihaoyi:mainfrom
alexarchambault:less-map-dependencies
Feb 23, 2026
Merged

alexarchambault merged 4 commits into
com-lihaoyi:mainfrom
alexarchambault:less-map-dependencies

Conversation

@alexarchambault

Copy link
Copy Markdown
Collaborator

This works around an issue I raised in the past. CoursierModule#mapDependencies makes dependency resolution less "standard": resolutions relying on it can't be easily done with the coursier CLI or from other build tools for comparison.

Mill using it by default can surprise users trying to make sense of some resolutions, and debug them outside of Mill. This PR makes Mill stop relying on it by default, and makes it use CoursierModule#resolutionParams instead.

Only one use of mapDependencies can't be handled with resolutionParams for now: using a custom Scala organization. AFAIK, this was only useful in the past with the Typelevel fork of the Scala compiler. This compiler fork has been discontinued for a while, and I'm not sure anyone needs to customize the scala organization. So this PR simply drops the ability to customize it.

Lastly, this PR makes sure test modules inherit resolutionParams from their main module

And stop allowing users to customize the Scala organization via it.
Seems this was mostly useful when typelevel had its own compiler fork,
but not much beyond that.
It makes it harder to make sense of resolutions when this parameter is being used,
while resolutionParams is much easier to inspect
@alexarchambault
alexarchambault marked this pull request as ready for review February 23, 2026 17:19
@alexarchambault
alexarchambault merged commit 8a582b6 into com-lihaoyi:main Feb 23, 2026
76 of 77 checks passed
@alexarchambault
alexarchambault deleted the less-map-dependencies branch February 23, 2026 23:11
@lefou lefou added this to the 1.1.3 milestone Feb 24, 2026
@lefou lefou added the compat-breaker A PR breaks compatibility and needs to wait till we prepare a major release label Feb 24, 2026
@lefou

lefou commented Feb 24, 2026 •

Copy link
Copy Markdown
Member

Considering, that this will break all user modules that rely on mapDependencies this is a breaking change. I wonder what the next Mill version should be then. At least 1.2. Binary compatibility isn't compromised.

@alexarchambault

alexarchambault commented Feb 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

@lefou That's not a breaking change, mapDependencies is still there and can be used by Mill users. This only makes Mill rely less on it internally / by default.

@lefou lefou removed the compat-breaker A PR breaks compatibility and needs to wait till we prepare a major release label Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants