Skip to content

Unbreak after 0.71.0 release of rules_rust - #40

Merged
Calsign merged 1 commit into
Calsign:mainfrom
ckwalsh:main
Jun 29, 2026
Merged

Unbreak after 0.71.0 release of rules_rust#40
Calsign merged 1 commit into
Calsign:mainfrom
ckwalsh:main

Conversation

@ckwalsh

@ckwalsh ckwalsh commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary:

The 0.71.0 release of rules_rust broke gazelle_rust by removing the
deprecated @rules_rust//crate_universe:extension.bzl target.

This commit updates use_extension() within MODULE.bazel to use the modern
extensions.bzl target.

This commit also takes the opportunity to update several bzlmod dependencies,
which required resolving several clippy errors in
gazelle_rust_parser/src/lib.rs that newly appeared after updating
rules_rust to 0.71.0

Notes:

These changes are NOT AI generated, and I offer it to the gazelle_rust project
under the terms of the APACHE license.

  • [fix] Fix use_extension() target for crate_universe in MODULE.bazel
  • [style] Fix clippy issues in gazelle_rust_parser/src/lib.rs
  • [build] Use golang version from go.mod
  • [build] Ignore cargo /target directories
  • [dep] Update bazel from 8.4.2 to 8.7.0
  • [dep] Update rules_shell from 0.6.1 to 0.8.1
  • [dep] Update rules_go from 0.59.0 to 0.61.1
  • [dep] Update gazelle from 0.47.0 to 0.51.3
  • [dep] Update rules_rust from 0.67.0 to 0.71.0
  • [dep] Update rules_rust_prost from 0.67.0 to 0.71.0
  • [dep] Update cargo packages in both root and example directories
  • [dep] Clean up go.mod with bazel run @rules_go//go -- mod tidy -e

Test Plan:

$> bazel build --config check //...
INFO: Invocation ID: 36981488-710f-4ce8-8d3e-da03fecc2097
INFO: Analyzed 60 targets (0 packages loaded, 0 targets configured).
INFO: Found 60 targets...
INFO: Elapsed time: 0.184s, Critical Path: 0.00s
INFO: 1 process: 108 action cache hit, 1 internal.
INFO: Build completed successfully, 1 total action
$> bazel test //...
[ ... SNIP ... ]
Executed 41 out of 41 tests: 41 tests pass.
$> cd example
$> bazel build //...
INFO: Invocation ID: e7b360fd-7d64-4ad4-84fd-4735db416990
INFO: Analyzed 5 targets (79 packages loaded, 4020 targets configured).
INFO: Found 5 targets...
INFO: Elapsed time: 11.750s, Critical Path: 9.23s
INFO: 130 processes: 1360 action cache hit, 25 internal, 105 processwrapper-sandbox.
INFO: Build completed successfully, 130 total actions
$> bazel test //...
[ ... SNIP ... ]
Executed 2 out of 2 tests: 2 tests pass.
$>

@ckwalsh
ckwalsh force-pushed the main branch 3 times, most recently from a53da8e to ff61983 Compare June 28, 2026 03:59
@ckwalsh

ckwalsh commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for approving the workflows!

Sorry for being a dunce and not realizing the example directory had it's own MODULE.bazel peer files that needed to be updated as well, it wasn't obvious from the UI, and I only realized what was going on when I looked closer at the workflow file.

Summary:

The `0.71.0` release of `rules_rust` broke `gazelle_rust` by removing the
deprecated `@rules_rust//crate_universe:extension.bzl` target.

This commit updates `use_extension()` within MODULE.bazel to use the modern
`extensions.bzl` target.

This commit also takes the opportunity to update several bzlmod dependencies,
which required resolving several clippy errors in
`gazelle_rust_parser/src/lib.rs` that newly appeared after updating
`rules_rust` to `0.71.0`

Notes:

- Updating `rules_rust` to `0.71.0` instead of `0.71.1` due to incompatibility
  between `rules_proto` and `rules_rust`
  - protocolbuffers/protobuf#28224


These changes are NOT AI generated, and I offer it to the gazelle_rust project
under the terms of the APACHE license.

- [fix] Fix use_extension() target for crate_universe in MODULE.bazel
- [style] Fix clippy issues in `gazelle_rust_parser/src/lib.rs`
- [build] Use golang version from `go.mod`
- [build] Ignore cargo `/target` directories
- [dep] Update bazel from `8.4.2` to `8.7.0`
- [dep] Update `rules_shell` from `0.6.1` to `0.8.1`
- [dep] Update `rules_go` from `0.59.0` to `0.61.1`
- [dep] Update `gazelle` from `0.47.0` to `0.51.3`
- [dep] Update `rules_rust` from `0.67.0` to `0.71.0`
- [dep] Update `rules_rust_prost` from `0.67.0` to `0.71.0`
- [dep] Update cargo packages in both root and `example` directories
- [dep] Clean up `go.mod` with `bazel run @rules_go//go -- mod tidy -e`

Test Plan:

```bash
$> bazel build --config check //...
INFO: Invocation ID: 36981488-710f-4ce8-8d3e-da03fecc2097
INFO: Analyzed 60 targets (0 packages loaded, 0 targets configured).
INFO: Found 60 targets...
INFO: Elapsed time: 0.184s, Critical Path: 0.00s
INFO: 1 process: 108 action cache hit, 1 internal.
INFO: Build completed successfully, 1 total action
$> bazel test //...
[ ... SNIP ... ]
Executed 41 out of 41 tests: 41 tests pass.
$> cd example
$> bazel build //...
INFO: Invocation ID: e7b360fd-7d64-4ad4-84fd-4735db416990
INFO: Analyzed 5 targets (79 packages loaded, 4020 targets configured).
INFO: Found 5 targets...
INFO: Elapsed time: 11.750s, Critical Path: 9.23s
INFO: 130 processes: 1360 action cache hit, 25 internal, 105 processwrapper-sandbox.
INFO: Build completed successfully, 130 total actions
$> bazel test //...
[ ... SNIP ... ]
Executed 2 out of 2 tests: 2 tests pass.
$>
```

@Calsign Calsign left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks!

Sorry for being a dunce and not realizing the example directory had it's own MODULE.bazel peer files that needed to be updated as well, it wasn't obvious from the UI, and I only realized what was going on when I looked closer at the workflow file.

Perhaps I should add a CONTRIBUTING.md with, among other things, instructions for how to run the CI checks locally. I'm not sure how to make the UI more obvious. Are there other things that would be useful to have documented?

@Calsign
Calsign merged commit 0920b33 into Calsign:main Jun 29, 2026
1 check passed
@ckwalsh

ckwalsh commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

A CONTRIBUTING.md file would be great!

Two smaller ideas that come to mind:

  1. Rather than "for example" in the CI step names, perhaps "in ./example directory"?
  2. A shell script to help run the same commands as the CI steps on a local machine

@ckwalsh

ckwalsh commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the fast review!

@Calsign

Calsign commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Thanks for the suggestions! I added a CONTRIBUTING.md and ci.sh.

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