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

feat: Pass additional coursier cli options #1137

Merged
merged 3 commits into from
May 17, 2024

Conversation

honnix
Copy link
Contributor

@honnix honnix commented May 15, 2024

The primary use case this change tries to solve is passing down --max-iterations to coursier because the default value could be too small for certain artifacts.

Copy link
Collaborator

@shs96c shs96c left a comment

Choose a reason for hiding this comment

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

You will also need to mirror the same changes into the tag classes used for bzlmod. These can be found in //private/extensions:maven.bzl.

private/rules/coursier.bzl Outdated Show resolved Hide resolved
private/rules/coursier.bzl Outdated Show resolved Hide resolved
private/rules/maven_install.bzl Outdated Show resolved Hide resolved
@honnix honnix force-pushed the resolver-additional-options branch from 5f9e7f4 to 30eb9c8 Compare May 15, 2024 10:34
@@ -338,6 +340,8 @@ def _maven_impl(mctx):
if mod.is_root:
repo["repin_instructions"] = install.repin_instructions

repo["additional_coursier_options"] = repo.get("additional_coursier_options", []) + getattr(install, "additional_coursier_options", [])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not very sure I'm doing the right thing, so please let me know if anything missed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is perfect

@honnix honnix marked this pull request as ready for review May 16, 2024 07:11
@honnix honnix requested a review from shs96c May 17, 2024 07:00
Copy link
Collaborator

@shs96c shs96c left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -338,6 +340,8 @@ def _maven_impl(mctx):
if mod.is_root:
repo["repin_instructions"] = install.repin_instructions

repo["additional_coursier_options"] = repo.get("additional_coursier_options", []) + getattr(install, "additional_coursier_options", [])
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is perfect

@shs96c shs96c merged commit bc3a190 into bazelbuild:master May 17, 2024
8 checks passed
@honnix honnix deleted the resolver-additional-options branch May 17, 2024 12:49
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.

None yet

2 participants