Skip to content

Conversation

rickeylev
Copy link
Collaborator

@rickeylev rickeylev commented Oct 22, 2024

Fix various errors with upcoming Bazel versions

  • Use rules_cc 0.0.13 for integration tests.
  • Set allow_empty=True in local toolchains setup

Fixes #2310

This is so that the test works with Bazel@head
@rickeylev rickeylev requested a review from aignas as a code owner October 22, 2024 23:40
@aignas
Copy link
Collaborator

aignas commented Oct 22, 2024

Although, looking at the CI it seems that it is still unhappy.

@rickeylev rickeylev changed the title tests: use rules_cc 0.0.13 for ignore_root_user_error test fix: fix errors with bazel@head Oct 23, 2024
@rickeylev
Copy link
Collaborator Author

Heh, yeah, that required a few more fixes. All the integration tests needed rules_cc added, which then needed protobuf added. Then some allow_empty=True fixes in the local toolchain test.

@rickeylev rickeylev added this pull request to the merge queue Oct 23, 2024
Merged via the queue into bazel-contrib:main with commit 5f28550 Oct 23, 2024
4 checks passed
@rickeylev rickeylev deleted the fix.bazel.head.cc_rules branch October 23, 2024 04:26
Comment on lines +3 to +15
http_archive(
name = "protobuf",
sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa",
strip_prefix = "protobuf-27.0",
url = "https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protobuf-27.0.tar.gz",
)

http_archive(
name = "rules_cc",
sha256 = "d9bdd3ec66b6871456ec9c965809f43a0901e692d754885e89293807762d3d80",
strip_prefix = "rules_cc-0.0.13",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.13/rules_cc-0.0.13.tar.gz"],
)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rickeylev, I think this means that the py_repositories function adding these deps needs to be updated. This looks like the wrong thing to do if we want to keep supporting bazel@HEAD with a released rules_python version?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Something felt off updating so many workspace files for tests. I've started #2335 to update py_repositories.

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.

[Bazel CI] Error toolchain_config_utils.bzl is invalid because 'cc/toolchains' is not a package.

2 participants