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

Fix 'repo_mapping_manifest' property check for compatibility #412

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

karataliu
Copy link
Contributor

@karataliu karataliu commented Feb 1, 2024

Making it compatible with bazel6.

repo_mapping_manifest is added to FilesToRunProvider in bazel 7.0 via bazelbuild/bazel#20022

Currently the code will access repo_mapping_manifest directly, which makes it only works for bazel >=7.0

This fix helps make the code compatible with bazel 6.0 by adding a attr check. When running on bazel 6.0:

  • Before fix: Error: 'FilesToRunProvider' value has no field or method 'repo_mapping_manifest'
  • After fix: (no error)

@karataliu karataliu requested a review from purkhusid as a code owner February 1, 2024 12:54
Copy link

google-cla bot commented Feb 1, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@karataliu karataliu changed the title Fix compatible property check Fix property check for 'repo_mapping_manifest' for compability Feb 1, 2024
@karataliu karataliu changed the title Fix property check for 'repo_mapping_manifest' for compability Fix 'repo_mapping_manifest' property check for compatibility Feb 1, 2024
@purkhusid
Copy link
Collaborator

Could you add a comment that explains why this is needed?

@karataliu
Copy link
Contributor Author

@purkhusid Sure, updated comment in code and PR description. Would you please take another look? Thanks.

@karataliu karataliu force-pushed the b6 branch 2 times, most recently from 7aa6dcf to 8757553 Compare February 2, 2024 05:01
@purkhusid purkhusid merged commit 22568f4 into bazel-contrib:master Feb 2, 2024
2 checks passed
@karataliu karataliu deleted the b6 branch February 4, 2024 01:58
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