mill icon indicating copy to clipboard operation
mill copied to clipboard

Add support for dependency version constraints

Open lefou opened this issue 6 months ago • 0 comments

Currently, when adding dependencies, coursier supports explicit versions or version ranges. But there is only limited support to control transitive dependencies:

  • exclude them
  • explicitly depend on them with a more specific version or version range

This is often not, what the user want.

Instead, we want some way to constrain the resolved transitive dependencies without explicitly adding a direct dependency to it. To my knowledge, there is no proper way to do this in Maven, so we probably won't be able to have it in a transparent way. But it would be already a great plus for Mill, if the user could express the version constraints explicitly. To way underlying coursier/Maven feature this need to be mapped, of if we need to generate some explicit dependencies for the sake of consistency, needs to be figured out. The key features is, that in Mill we keep explicit dependencies and dependency constraints separate.

lefou avatar Jun 02 '25 10:06 lefou