Skip to content
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

Allow users to customize coursier ResolutionParams #3949

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alexarchambault
Copy link
Contributor

@alexarchambault alexarchambault commented Nov 12, 2024

This adds a JavaModule#resolutionParams task, allowing users to customize coursier's ResolutionParams. These allow to customize some aspects of dependency resolution.

In particular, ResolutionParams#enableDependencyOverrides, when set to Some(false), disables the recent BOM changes added (and enabled by default) in coursier 2.1.17. This might be useful, if ever users aren't happy with the versions it selects, or want to wait a bit before enabling that, or if they find out performance suffers because of it for them.

The new task is anonymous (it's not a target, it's not serialized on disk), as ResolutionParams has a field that doesn't easily lend itself to serialization (rules, because of the Rule type, which is an open abstract class).

@lihaoyi lihaoyi requested a review from lefou November 13, 2024 00:19
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should move the resolutionParams task into CoursierModule, since that the place where it should be used. This would also avoid the introduction of new resolutionParams parameter which the default parameter in various places.

@lefou
Copy link
Member

lefou commented Nov 13, 2024

The new task should definitely come with some documentation, since some other customizations seem to affect the final ResolutionParams as well. What overrides what?

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.

2 participants