Skip to content

Add missing load statements#4508

Merged
fmeum merged 1 commit intobazel-contrib:masterfrom
keith:ks/add-missing-load-statements
Nov 7, 2025
Merged

Add missing load statements#4508
fmeum merged 1 commit intobazel-contrib:masterfrom
keith:ks/add-missing-load-statements

Conversation

@keith
Copy link
Copy Markdown
Member

@keith keith commented Nov 7, 2025

This is required for compatibility with bazel @ HEAD. Done with:
buildifier --lint=fix -r .

This is required for compatibility with bazel @ HEAD. Done with:
`buildifier --lint=fix -r .`
@fmeum fmeum enabled auto-merge (squash) November 7, 2025 19:26
@fmeum fmeum merged commit b3e12d7 into bazel-contrib:master Nov 7, 2025
1 check passed
jayconrod added a commit to jayconrod/bazel-gazelle that referenced this pull request Nov 18, 2025
Bazel 9.x requires the cc_common module to be loaded explicitly.
bazel-contrib/rules_go#4508 added the required load statement,
and this fix was released in rules_go 0.59.0.

This change upgrades the tests/bcr/go_mod and go_work test modules
to require rules_go 0.59.0 so they can be tested with Bazel 9.x.
Gazelle itself doesn't require the fix, so this change doesn't touch
MODULE.bazel, avoiding a forced upgrade.

Fixes bazel-contrib#2234
jayconrod added a commit to bazel-contrib/bazel-gazelle that referenced this pull request Nov 18, 2025
**What type of PR is this?**

> Bug fix

**What package or component does this PR mostly affect?**

tests/bcr

**What does this PR do? Why is it needed?**

Bazel 9.x requires the cc_common module to be loaded explicitly.
bazel-contrib/rules_go#4508 added the required load statement, and this
fix was released in rules_go 0.59.0.

This change upgrades the tests/bcr/go_mod and go_work test modules to
require rules_go 0.59.0 so they can be tested with Bazel 9.x. Gazelle
itself doesn't require the fix, so this change doesn't touch
MODULE.bazel, avoiding a forced upgrade.

**Which issues(s) does this PR fix?**

Fixes #2234

**Other notes for review**
pcj pushed a commit to stackb/bazel-gazelle that referenced this pull request Dec 23, 2025
**What type of PR is this?**

> Bug fix

**What package or component does this PR mostly affect?**

tests/bcr

**What does this PR do? Why is it needed?**

Bazel 9.x requires the cc_common module to be loaded explicitly.
bazel-contrib/rules_go#4508 added the required load statement, and this
fix was released in rules_go 0.59.0.

This change upgrades the tests/bcr/go_mod and go_work test modules to
require rules_go 0.59.0 so they can be tested with Bazel 9.x. Gazelle
itself doesn't require the fix, so this change doesn't touch
MODULE.bazel, avoiding a forced upgrade.

**Which issues(s) does this PR fix?**

Fixes bazel-contrib#2234

**Other notes for review**
rdesgroppes added a commit to rdesgroppes/rules_foreign_cc that referenced this pull request Mar 18, 2026
This is a first step toward making `rules_foreign_cc` _buildable_ with
Bazel 9 (making it _consumable_ deserves a dedicated fix).

Running `bazel build -k //...` on Bazel 9.0.1 produces a flood of
errors like:
```
  ERROR: .../rules_go+/go/private/rules/cgo.bzl:101:12: The CcInfo
  symbol has been removed, add the following to your BUILD/bzl file:
  load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
```

The root cause is rules_go@0.50.1, pulled in transitively via:
- `bazel_skylib_gazelle_plugin@1.7.1`
  - `gazelle@0.41.0`
    - `rules_go@0.50.1`

That version references `CcInfo` and other `CC*` symbols as Bazel-native
globals, removed in Bazel 9. bazel-contrib/rules_go#4508 fixed this in
rules_go@0.59.0.

Bumping `bazel_skylib_gazelle_plugin` to 1.9.0 is sufficient: its direct
dependency on rules_go@0.59.0 overrides the rules_go@0.50.1 required
by gazelle@0.41.0, wiping out the entire error class.

Since `bazel_skylib_gazelle_plugin` is a **dev** dependency, this only
affects building the repo itself, not its consumers.
rdesgroppes added a commit to rdesgroppes/rules_foreign_cc that referenced this pull request Mar 18, 2026
This is a first step toward making `rules_foreign_cc` _buildable_ with
Bazel 9 (making it _consumable_ deserves a dedicated fix).

Running `bazel build -k //...` on Bazel 9.0.1 produces a flood of
errors like:
```
  ERROR: .../rules_go+/go/private/rules/cgo.bzl:101:12: The CcInfo
  symbol has been removed, add the following to your BUILD/bzl file:
  load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
```

The root cause is rules_go@0.50.1, pulled in transitively via:
- `bazel_skylib_gazelle_plugin@1.7.1`
  - `gazelle@0.41.0`
    - `rules_go@0.50.1`

That version references `CcInfo` and other `CC*` symbols as Bazel-native
globals, removed in Bazel 9. bazel-contrib/rules_go#4508 fixed this in
rules_go@0.59.0.

Bumping `bazel_skylib_gazelle_plugin` to 1.9.0 is sufficient: its direct
dependency on rules_go@0.59.0 overrides the rules_go@0.50.1 required
by gazelle@0.41.0, wiping out the entire error class.

Since `bazel_skylib_gazelle_plugin` is a **dev** dependency, this only
affects building the repo itself, not its consumers.

Note: `bazel_skylib` must be bumped as well according to CI failing on:
```
  ERROR: For repository 'bazel_skylib', the root module requires module
  version bazel_skylib@1.8.2, but got bazel_skylib@1.9.0 in the resolved
  dependency graph.
```
rdesgroppes added a commit to rdesgroppes/rules_foreign_cc that referenced this pull request Mar 19, 2026
This is a first step toward making `rules_foreign_cc` _buildable_ with
Bazel 9 (making it _consumable_ deserves a dedicated fix).

Running `bazel build -k //...` on Bazel 9.0.1 produces a flood of
errors like:
```
  ERROR: .../rules_go+/go/private/rules/cgo.bzl:101:12: The CcInfo
  symbol has been removed, add the following to your BUILD/bzl file:
  load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
```

The root cause is rules_go@0.50.1, pulled in transitively via:
- `bazel_skylib_gazelle_plugin@1.7.1`
  - `gazelle@0.41.0`
    - `rules_go@0.50.1`

That version references `CcInfo` and other `CC*` symbols as Bazel-native
globals, removed in Bazel 9. bazel-contrib/rules_go#4508 fixed this in
rules_go@0.59.0.

Bumping `bazel_skylib_gazelle_plugin` to 1.9.0 is sufficient: its direct
dependency on rules_go@0.59.0 overrides the rules_go@0.50.1 required
by gazelle@0.41.0, wiping out the entire error class.

Since `bazel_skylib_gazelle_plugin` is a **dev** dependency, this only
affects building the repo itself, not its consumers.

Note: `bazel_skylib` must be bumped as well according to CI failing on:
```
  ERROR: For repository 'bazel_skylib', the root module requires module
  version bazel_skylib@1.8.2, but got bazel_skylib@1.9.0 in the resolved
  dependency graph.
```
novas0x2a pushed a commit to bazel-contrib/rules_foreign_cc that referenced this pull request Mar 19, 2026
This is a first step toward making `rules_foreign_cc` _buildable_ with
Bazel 9 (making it _consumable_ with Bazel 9 deserves a dedicated
[fix](#1493)).

Running `bazel build -k //...` on Bazel 9.0.1 produces a flood of errors
like:
```
  ERROR: .../rules_go+/go/private/rules/cgo.bzl:101:12: The CcInfo
  symbol has been removed, add the following to your BUILD/bzl file:
  load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
```

The root cause is rules_go@0.50.1, pulled in transitively via:
- `bazel_skylib_gazelle_plugin@1.7.1`
  - `gazelle@0.41.0`
    - `rules_go@0.50.1`

That version references `CcInfo` and other `CC*` symbols as Bazel-native
globals, removed in Bazel 9. bazel-contrib/rules_go#4508 fixed this in
rules_go@0.59.0.

Bumping `bazel_skylib_gazelle_plugin` to 1.9.0 is sufficient: its direct
dependency on rules_go@0.59.0 overrides the rules_go@0.50.1 required by
gazelle@0.41.0, wiping out the entire error class.

Since `bazel_skylib_gazelle_plugin` is a **dev** dependency, this only
affects building the repo itself, not its consumers.

Note: `bazel_skylib` must be bumped as well according to CI failing on:
```
  ERROR: For repository 'bazel_skylib', the root module requires module
  version bazel_skylib@1.8.2, but got bazel_skylib@1.9.0 in the resolved
  dependency graph.
```
rdesgroppes added a commit to rdesgroppes/rules_foreign_cc that referenced this pull request Mar 19, 2026
This is a first step toward making `rules_foreign_cc` _buildable_ with
Bazel 9 (making it _consumable_ deserves a dedicated fix).

Running `bazel build -k //...` on Bazel 9.0.1 produces a flood of
errors like:
```
  ERROR: .../rules_go+/go/private/rules/cgo.bzl:101:12: The CcInfo
  symbol has been removed, add the following to your BUILD/bzl file:
  load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
```

The root cause is rules_go@0.50.1, pulled in transitively via:
- `bazel_skylib_gazelle_plugin@1.7.1`
  - `gazelle@0.41.0`
    - `rules_go@0.50.1`

That version references `CcInfo` and other `CC*` symbols as Bazel-native
globals, removed in Bazel 9. bazel-contrib/rules_go#4508 fixed this in
rules_go@0.59.0.

Bumping `bazel_skylib_gazelle_plugin` to 1.9.0 is sufficient: its direct
dependency on rules_go@0.59.0 overrides the rules_go@0.50.1 required
by gazelle@0.41.0, wiping out the entire error class.

Since `bazel_skylib_gazelle_plugin` is a **dev** dependency, this only
affects building the repo itself, not its consumers.

Note: `bazel_skylib` must be bumped as well according to CI failing on:
```
  ERROR: For repository 'bazel_skylib', the root module requires module
  version bazel_skylib@1.8.2, but got bazel_skylib@1.9.0 in the resolved
  dependency graph.
```
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