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 dt_patches/compiler_sources repo #1654

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mbland
Copy link
Contributor

@mbland mbland commented Nov 27, 2024

Description

Introduces the dt_patches/compiler_sources repo. This is part of the Bzlmod prep work from #1482, but also reduces duplication between the dt_patches/test_dt_patches*/WORKSPACE files.

Motivation

The structure of the dt_patches/compiler_sources/extensions.bzl declarations accommodates the fact that, unlike WORKSPACE, MODULE.bazelfiles cannot import constants or contain conditional statements. That is to say, there's no way to port theif SCALA_VERSION.startswith("2.")expressions from the previousWORKSPACEfiles toMODULE.bazel`.

The new import_compiler_source_repos macro, however, works for both WORKSPACE and Bzlmod builds, as it's trivial to wrap import_compiler_source_repos in a module extension.

This is part of the Bzlmod prep work from bazelbuild#1482, but also reduces
duplication between the `dt_patches/test_dt_patches*/WORKSPACE` files.

The structure of the `dt_patches/compiler_sources/extensions.bzl`
declarations accommodates the fact that, unlike `WORKSPACE,
`MODULE.bazel` files cannot import constants or contain conditional
statements. That is to say, there's no way to port the `if
SCALA_VERSION.startswith("2.")` expressions from the previous
`WORKSPACE` files to Bzlmod.

The new `import_compiler_source_repos` macro, however, works for both
`WORKSPACE` and Bzlmod builds, as it's trivial to wrap
`import_compiler_source_repos` in a module extension.
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.

1 participant