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

Incompatible with rules_rust whose version is 0.8.0 or later #522

Closed
pddg opened this issue Sep 10, 2022 · 0 comments · Fixed by #532
Closed

Incompatible with rules_rust whose version is 0.8.0 or later #522

pddg opened this issue Sep 10, 2022 · 0 comments · Fixed by #532

Comments

@pddg
Copy link

pddg commented Sep 10, 2022

Overview

cargo-raze requires rules_rust, however it incompatible with rules_rust whose version is 0.8.0 or later.
bazel run @cargo_raze//:raze fails when rules_rust is 0.8.0 or later.

Environment

  • macOS 12.5.1

  • Apple M1 Pro

  • RAM 32GB

  • bazel 5.3.0

  • Rust 1.63.0

  • cargo-raze 0.16.0

Expected

bazel run @cargo_raze//:raze should succeed if rules_rust is latest.

❯ bazel run @cargo_raze//:raze -- --manifest-path=$PWD/Cargo.toml
INFO: Analyzed target @cargo_raze//:raze (0 packages loaded, 435 targets configured).
INFO: Found 1 target...
Target @cargo_raze//tools:raze up-to-date:
  bazel-bin/external/cargo_raze/tools/raze
INFO: Elapsed time: 0.446s, Critical Path: 0.05s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action

Actual

bazel run @cargo_raze//:raze fails when rules_rust is 0.8.0 or later.

❯ bazel run @cargo_raze//:raze -- --manifest-path=$PWD/Cargo.toml
ERROR: /private/var/tmp/_bazel_pddg/c055c30c6268cf8fffdaa4f0d3e6ae6b/external/cargo_raze/tools/BUILD.bazel:44:6: no such target '@rust_darwin_aarch64//:cargo': target 'cargo' not declared in package '' defined by /private/var/tmp/_bazel_pddg/c055c30c6268cf8fffdaa4f0d3e6ae6b/external/rust_darwin_aarch64/BUILD.bazel and referenced by '@cargo_raze//tools:cargo'
ERROR: Analysis of target '@cargo_raze//:raze' failed; build aborted:
INFO: Elapsed time: 0.081s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

#519 seems to be caused by this.

How to reproduce

I have created a very simple rust project and prepared a repository to check the combination with rules_rust from 0.5.0 to the latest 0.10.0.
https://github.com/pddg/raze-rule-compatible-check/pulls

It is compatible from 0.5.0 to 0.7.0, but everything after 0.8.0 fails.

illicitonion pushed a commit that referenced this issue Nov 21, 2022
Bump rules_rust to version 0.11.0 and rules_foreign_cc to 0.9.0

**This MR breaks compatibility with rules_rust < 0.7.0**

Closes #522

Signed-off-by: Alan Diego dos Santos <alandiegosantos@gmail.com>
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 a pull request may close this issue.

1 participant