Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crate_universe is incompatible with Bazel 8.0.0 #3150

Open
jthemphill opened this issue Dec 31, 2024 · 0 comments
Open

crate_universe is incompatible with Bazel 8.0.0 #3150

jthemphill opened this issue Dec 31, 2024 · 0 comments

Comments

@jthemphill
Copy link

jthemphill commented Dec 31, 2024

Attempting to build example 05-deps-cargo on an M1 Mac. The example builds great on Bazel 7 but fails on Bazel 8.

I made two changes.

First, I bumped .bazelversion in the examples repository:

- 7.2.1
+ 8.0.0

The build then failed. I thought maybe the newest version of rules_rust could address the issue. So I bumped the version of rules_rust in MODULE.bazel:

- bazel_dep(name = "rules_rust", version = "0.47.1")
+ bazel_dep(name = "rules_rust", version = "0.56.0")

Running the build with Bazel 8 and rules_rust 0.56.0:

05-deps-cargo % bazel build //...
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_android' found. This will result in a failure if there's a reference to those rules or symbols.
ERROR: /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/external/rules_rust+/crate_universe/extensions.bzl:363:17: Traceback (most recent call last):
        File "/private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/external/rules_rust+/crate_universe/extensions.bzl", line 459, column 37, in _crate_impl
                _generate_hub_and_spokes(
        File "/private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/external/rules_rust+/crate_universe/extensions.bzl", line 144, column 16, in _generate_hub_and_spokes
                cargo_bazel([
        File "/private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/external/rules_rust+/crate_universe/extensions.bzl", line 363, column 17, in run
                fail("%s returned with exit code %d:\n%s" % (pretty_args, result.return_code, result.stderr))
Error in fail: /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/modextwd/rules_rust++crate/cargo-bazel generate --cargo-lockfile /Users/jhemphill/oss/bazelbuild/examples/rust-examples/05-deps-cargo/Cargo.lock --config /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/modextwd/rules_rust++crate/crates/config.json --splicing-manifest /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/modextwd/rules_rust++crate/crates/splicing_manifest.json --repository-dir /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/modextwd/rules_rust++crate/crates --metadata /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/modextwd/rules_rust++crate/crates/splicing-output/metadata.json --repin --lockfile /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/modextwd/rules_rust++crate/crates/lockfile.json --nonhermetic-root-bazel-workspace-dir /Users/jhemphill/oss/bazelbuild/examples/rust-examples/05-deps-cargo --paths-to-track /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/modextwd/rules_rust++crate/paths-to-track --warnings-output-path /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/modextwd/rules_rust++crate/warnings-output-file --cargo /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/external/rules_rust++rust_host_tools+rust_host_tools/bin/cargo --rustc /private/var/tmp/_bazel_jhemphill/a3385e184eb75f0cb537a24f915a0ff0/external/rules_rust++rust_host_tools+rust_host_tools/bin/rustc returned with exit code 1:
Error: Package "all_crate_deps" target "all_crate_deps" had an absolute source path "/dev/null", which is not supported
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

No branches or pull requests

1 participant