Skip to content

Update rules_cc to 0.2.17#28728

Open
fmeum wants to merge 1 commit intobazelbuild:masterfrom
fmeum:update-rules-cc
Open

Update rules_cc to 0.2.17#28728
fmeum wants to merge 1 commit intobazelbuild:masterfrom
fmeum:update-rules-cc

Conversation

@fmeum
Copy link
Collaborator

@fmeum fmeum commented Feb 20, 2026

Description

Updates rules_cc to 0.2.17 in MODULE.bazel and MODULE.tools.

Motivation

Build API Changes

No

Checklist

  • I have added tests for the new use cases (if any).
  • I have updated the documentation (if applicable).

Release Notes

RELNOTES: None

@github-actions github-actions bot added the awaiting-review PR is awaiting review from an assigned reviewer label Feb 20, 2026
@fmeum
Copy link
Collaborator Author

fmeum commented Feb 20, 2026

@trybka @pzembrod rules_cc v0.2.17 causes some of Bazel's tests to fail, but it's not obvious to me what the root cause is.

@dzbarsky FYI, this issue is unrelated to your attempted blake3 update.

@iancha1992
Copy link
Member

@trybka @pzembrod rules_cc v0.2.17 causes some of Bazel's tests to fail, but it's not obvious to me what the root cause is.

@dzbarsky FYI, this issue is unrelated to your attempted blake3 update.

Hi @trybka @pzembrod. Any update on this? We're planning to get 9.0.1rc1 on Wednesday.

@iancha1992 iancha1992 added the team-Rules-CPP Issues for C++ rules label Feb 24, 2026
@trybka
Copy link
Contributor

trybka commented Feb 24, 2026

@c-mita @hvadehra

@hvadehra
Copy link
Member

The logs indicate this was likely caused by bazelbuild/rules_cc@6402462 and the problem with the mocks in Bazel is that

"@rules_cc//cc:srcs",
"@rules_cc//cc/common:srcs",
"@rules_cc//cc/toolchains:srcs",
does not include srcs from https://github.com/bazelbuild/rules_cc/tree/main/cc/toolchains/impl

This will need to be fixed in rules_cc - https://github.com/bazelbuild/rules_cc/blob/38517fb1eb1333517b5a4e9bbaa169027b7a5988/cc/toolchains/BUILD#L43 should include srcs from all sub packages.

@trybka
Copy link
Contributor

trybka commented Feb 25, 2026

@hvadehra thanks for the analysis!

What is the fix for catching something like that in the future? Presumably porting many of the tests that validate cc behavior from Java->Starlark?

I think there are other java tests that just use things in rules_cc because they were convenient target types (e.g. for generic analysis tests) -- presumably those could either be migrated to use other rules?

Would it be possible to setup a bazelbuild CI with rules_cc at TOT, or even better run bazelbuild tests with rules_cc PRs?

@pzembrod
Copy link
Contributor

I believe this is caused by a gap in MockCcSupport.java. I'm working on it.

@pzembrod
Copy link
Contributor

Under @hvadehra's guidance this turned into a one-line fix in src/test/java/com/google/devtools/build/lib/packages/util/BazelMockCcSupport.java.

@fmeum can you rebase your PR and retrigger the checks?

@fmeum
Copy link
Collaborator Author

fmeum commented Feb 27, 2026

@pzembrod done

@pzembrod pzembrod added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Feb 27, 2026
@pzembrod
Copy link
Contributor

@pzembrod done

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally team-Rules-CPP Issues for C++ rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants