bazelbuild / rules_cc

C++ Rules for Bazel
https://bazel.build
Apache License 2.0
181 stars 89 forks source link

Please Update `io_bazel_rules_go` to remove reference to `@bazel_tools//platforms:xxx` #140

Closed aranguyen closed 8 months ago

aranguyen commented 2 years ago

Description of the problem / feature request:

The flag --incompatible_use_platforms_repo_for_constraints has been flipped and we're seeing CI failures in rules_cc for downstream pipeline https://buildkite.com/bazel/bazel-at-head-plus-downstream/builds/2600#_

Issue: https://github.com/bazelbuild/continuous-integration/issues/1404

Replace this line with your answer.

Feature requests: what underlying problem are you trying to solve with this feature?

My quick analysis points to the remaining references of bazel_tools//platforms in io_bazel_rules_go. Since rules_go came from bazel_federation https://github.com/bazelbuild/rules_cc/blob/ddc0791fa66deaf3d70925fbc8048e5b0e2fe999/internal_deps.bzl#L17 , please do the following: 1) Make a PR to update bazel_federation with the most recent rules_go https://github.com/bazelbuild/bazel-federation/blob/8ce885a3a89da83228cd845c6ab13bb0175ca105/repositories.bzl#L161 2) Make a PR to update bazel_federation to the most recent commit with updated rules_go https://github.com/bazelbuild/rules_cc/blob/cb6d32e4d1ae29e20dd3328109d8cb7f8eccc9be/WORKSPACE#L6

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

bazel build --nobuild ...
bazel info ouput_base
grep -r "@bazel_tools//platforms" <replace with the output of the command bazel info output_base>

What operating system are you running Bazel on?

Replace this line with your answer.

What's the output of bazel info release?

release 5.2.0

What version of rules_cc do you use? Can you paste the workspace rule used to fetch rules_cc? What other relevant dependencies does your project have?

rules_cc at HEAD

aranguyen commented 2 years ago

I'm not able to build rules_cc on my machine and got this error ERROR: /Users/aranguyen/rules_cc/examples/custom_toolchain/BUILD:81:19: in cc_toolchain_suite rule //examples/custom_toolchain:legacy_selector: cc_toolchain_suite '//examples/custom_toolchain:legacy_selector' does not contain a toolchain for cpu 'darwin'

If someone could guide me to build rules_cc, I could help with the deps update.

aiuto commented 2 years ago

We should get rid of the federation indirection. No one is actively maintaining that so it becomes a boondoggle.

aiuto commented 2 years ago

Without addressing removing the federation indirction, I think #142 is a fix.

comius commented 8 months ago

Stale