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.1.0] Mark built-in providers as hashable #25230

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

bazel-io
Copy link
Member

@bazel-io bazel-io commented Feb 7, 2025

Built-in providers always have an immutable hashCode. Making them hashable makes it easier to deduplicate a list of providers, which is sometimes required as the list of provider instances returned by a rule must not contain two instances for a given provider.

Starlark-defined providers are already hashable, so this brings the behavior of built-in providers in line with them.

Closes #24848.

PiperOrigin-RevId: 724370319
Change-Id: I68147b1f707249a8b09ad170c5fc5b3da4776ccf

Commit c94a9bd

Built-in providers always have an immutable `hashCode`. Making them hashable makes it easier to deduplicate a list of providers, which is sometimes required as the list of provider instances returned by a rule must not contain two instances for a given provider.

Starlark-defined providers are already hashable, so this brings the behavior of built-in providers in line with them.

Closes bazelbuild#24848.

PiperOrigin-RevId: 724370319
Change-Id: I68147b1f707249a8b09ad170c5fc5b3da4776ccf
@bazel-io bazel-io requested a review from a team as a code owner February 7, 2025 17:26
@bazel-io bazel-io added team-Remote-Exec Issues and PRs for the Execution (Remote) team awaiting-review PR is awaiting review from an assigned reviewer labels Feb 7, 2025
@bazel-io bazel-io requested a review from comius February 7, 2025 17:26
@iancha1992 iancha1992 enabled auto-merge February 7, 2025 18:55
@iancha1992 iancha1992 disabled auto-merge February 7, 2025 19:10
@iancha1992 iancha1992 added this pull request to the merge queue Feb 11, 2025
Merged via the queue into bazelbuild:release-8.1.0 with commit 3b0d75a Feb 11, 2025
46 checks passed
@github-actions github-actions bot removed the awaiting-review PR is awaiting review from an assigned reviewer label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Remote-Exec Issues and PRs for the Execution (Remote) team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants