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

[8.0.0] Allow any attributes on non-registry overrides #24443

Merged
merged 5 commits into from
Nov 21, 2024

Conversation

Wyverald
Copy link
Member

Contains cherry-picks of:

RELNOTES: archive_override now accepts all attributes usable with http_archive; similar for git_override and git_repository.

cushon and others added 3 commits November 21, 2024 14:31
PiperOrigin-RevId: 696230400
Change-Id: I3a190dedf4ea35c012383d757db46351505b71af
PiperOrigin-RevId: 696985671
Change-Id: I2bd694ed13abb99e018ce35c2455e002e6fcb3c3
So this kind of ran away from me...

* The motivator for this PR was to allow any `http_archive` attributes to be specified on `archive_override`. It was kind of a design oversight that we didn't allow this, to be honest; we've slowly accumulated fixes like adding `init_gitsubmodules` to `git_override`, adding `patch_cmds` to `archive_override`, etc., but the better alternative is to just forward all kwargs to the actual underlying repo rule.
* This somehow led to a big refactor where I remove the various `NonRegistryOverride` impls in favor of a simple wrapper around a `RepoSpec`, which led to the creation of a `RepoRuleId` class, which led to a refactor in BzlmodRepoRuleFunction (which also now houses the previous logic to validate labels in `ModuleFileGlobals`).
* Also includes some random Java 21 fixes that I couldn't resist... (`ModuleOverride` is now a sealed interface; added several switch expressions)

RELNOTES: `archive_override` now accepts all attributes usable with `http_archive`; similar for `git_override` and `git_repository`.

Fixes #24412

Closes #24378.

PiperOrigin-RevId: 698515353
Change-Id: I285c382d10ef228d46a1f1d732daa77a21bf890b
@Wyverald Wyverald requested a review from a team as a code owner November 21, 2024 19:36
@github-actions github-actions bot added team-Performance Issues for Performance teams team-Configurability platforms, toolchains, cquery, select(), config transitions team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Rules-Java Issues for Java rules team-Rules-CPP Issues for C++ rules team-Local-Exec Issues and PRs for the Execution (Local) team team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Nov 21, 2024
@Wyverald Wyverald added this pull request to the merge queue Nov 21, 2024
Merged via the queue into release-8.0.0 with commit 27487cf Nov 21, 2024
47 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Nov 21, 2024
@Wyverald Wyverald deleted the wyv-800-ovr branch November 21, 2024 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Configurability platforms, toolchains, cquery, select(), config transitions team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. team-Local-Exec Issues and PRs for the Execution (Local) team team-Performance Issues for Performance teams team-Remote-Exec Issues and PRs for the Execution (Remote) team team-Rules-CPP Issues for C++ rules team-Rules-Java Issues for Java rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants