Repository navigation
Load CcToolchainConfigInfo from rules_cc in cc_toolchain_config.bzl - #2484
Open
TrapsterDK wants to merge 1 commit into
Open
TrapsterDK wants to merge 1 commit into
TrapsterDK wants to merge 1 commit into
Conversation
Bazel 9 removed the native CcToolchainConfigInfo global, so loading cc_toolchain_config.bzl failed with "at index 0 of provides, got element of type NoneType, want Provider". Fixes tweag#2483 Assisted by Claude.
This was referenced Nov 7, 2026
Closed
TrapsterDK
added a commit
to devhusdk/rules_dx
that referenced
this pull request
Nov 7, 2026
…loses #8969) (#8976) The Windows GHC repo loaded @rules_cc//cc:cc_toolchain.bzl, which does not exist in rules_cc 0.2.27, and rules_haskell's cc_toolchain_config used the native CcToolchainConfigInfo global, which is None under Bazel 9. Load cc_toolchain from cc/toolchains, patch rules_haskell to load the provider from rules_cc (tweag/rules_haskell#2484), and add a Linux build test that uses the same loads. Claude-Session: https://claude.ai/code/session_01Xut2hzpb4qWNZKpDCrwUz7 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2483.
cc_toolchain_config.bzlused the nativeCcToolchainConfigInfoglobal inprovides. Bazel 9 removed it, so the global isNoneand loading the file fails withat index 0 of provides, got element of type NoneType, want Provider. This change loads the provider from@rules_cc//cc/toolchains:cc_toolchain_config_info.bzl, which exists in the pinned rules_cc 0.0.15 and in later versions.tests/cc_toolchain_configadds abuild_testthat instantiates the rule, so the file gets loaded on every platform, not only Windows.I checked the same change under Bazel 9.3.1 with rules_cc 0.2.27 in a downstream repo: the build test fails to load without the change and passes with it.
Assisted by Claude.