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

Add examples/overridden_artifacts and test #1713

Merged

Conversation

mbland
Copy link
Contributor

@mbland mbland commented Mar 7, 2025

Description

Adds the examples/overridden_artifacts repository and the corresponding overridden_artifacts_example test case in test/shell/test_examples.sh. Broken out from #1710, and part of #1482 and #1652.

@dmivankov noticed the design bug in the upcoming Bzlmod API for overridden_artifacts that this change addresses. See:

Makes _validate_scalac_srcjar() and dt_patched_compiler_setup() in scala/private/macros/scala_repositories.bzl more tolerant of dictionaries containing keys mapped to None. The new overridden_artifacts_example test covers this.

Sets .bazelversion in the new repo to 7.5.0 to match changes in both #1710 and #1711.

Motivation

This change is smaller and more focused than #1710, and should ultimately make that pull request smaller and/or easier to review.

The _validate_scalac_srcjar() update maintains the strict checks for mutually exclusive values, while preventing client code from having to explicitly filter out None entries. This pairs with the change in dt_patched_compiler_setup() that uses the compiler_srcjar dictionary. These changes helps keep the upcoming module extension a bit cleaner.

Adds the `examples/overridden_artifacts` repository and the
corresponding `overridden_artifacts_example` test case in
`test/shell/test_examples.sh`. Broken out from bazelbuild#1710, and part of bazelbuild#1482
and bazelbuild#1652.

@dmivankov noticed the design bug in the upcoming Bzlmod API for
`overridden_artifacts` that this change addresses. See:

- bazelbuild#1482 (comment)
- bazelbuild#1482 (comment)

Makes `_validate_scalac_srcjar()` and `dt_patched_compiler_setup()` in
`scala/private/macros/scala_repositories.bzl` more tolerant of
dictionaries containing keys mapped to `None`. The new
`overridden_artifacts_example` test covers this.

Sets `.bazelversion` in the new repo to 7.5.0 to match changes in
both bazelbuild#1710 and bazelbuild#1711.

This change is smaller and more focused than bazelbuild#1710, and should
ultimately make that pull request smaller and/or easier to review.
@simuons simuons merged commit 4947f9d into bazelbuild:master Mar 10, 2025
2 checks passed
@mbland mbland deleted the overridden-artifacts-example-and-test branch March 10, 2025 11:51
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