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

custom proc macro crate not found in a cargo workspace setup #2783

Closed
firekind opened this issue Aug 7, 2024 · 3 comments · Fixed by #2784
Closed

custom proc macro crate not found in a cargo workspace setup #2783

firekind opened this issue Aug 7, 2024 · 3 comments · Fixed by #2784

Comments

@firekind
Copy link

firekind commented Aug 7, 2024

In a cargo setup, when a proc macro crate is present in a cargo workspace, and one of the crates in the workspace depends on the proc macro crate, dependencies fail to resolve with the following error:

Error in fail: /home/developer/.cache/bazel/_bazel_developer/2927fffaf2126be7f97bf2508c6daa6e/modextwd/rules_rust~~crate/cargo-bazel splice --output-dir /home/developer/.cache/bazel/_bazel_developer/2927fffaf2126be7f97bf2508c6daa6e/modextwd/rules_rust~~crate/crates/splicing-output --config /home/developer/.cache/bazel/_bazel_developer/2927fffaf2126be7f97bf2508c6daa6e/modextwd/rules_rust~~crate/crates/config.json --splicing-manifest /home/developer/.cache/bazel/_bazel_developer/2927fffaf2126be7f97bf2508c6daa6e/modextwd/rules_rust~~crate/crates/splicing_manifest.json --cargo-lockfile /workspace/rust/Cargo.lock --cargo /home/developer/.cache/bazel/_bazel_developer/2927fffaf2126be7f97bf2508c6daa6e/external/rules_rust~~rust_host_tools~rust_host_tools/bin/cargo --rustc /home/developer/.cache/bazel/_bazel_developer/2927fffaf2126be7f97bf2508c6daa6e/external/rules_rust~~rust_host_tools~rust_host_tools/bin/rustc returned with exit code 1:

    Blocking waiting for file lock on package cache
    Updating crates.io index
error: no matching package named <the proc macro crate's name> found
location searched: registry `crates-io`
required by package `rules_rust_fake_proc_macro_root v0.0.0 (/tmp/.tmp79Nulh)`

Error: Failed to generate features

Caused by:
    Failed to run cargo tree: exit status: 101

this error seems to happen in v0.49.1. everything works fine in v0.48.0

@firekind
Copy link
Author

firekind commented Aug 7, 2024

I've made a simple project reproducing this issue here.

@firekind
Copy link
Author

firekind commented Aug 7, 2024

maybe its related to #2749? @illicitonion?

@goniz
Copy link

goniz commented Aug 8, 2024

We're hitting this as well on 0.49.1 !

github-merge-queue bot pushed a commit that referenced this issue Aug 8, 2024
1. Skip in-workspace proc-macros - they shouldn't be resolved, and are
already resolve roots
2. Properly parse out git deps, rather than assuming everything is a
registry dep

Fixes #2777
Fixes #2783
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.

2 participants