-
Notifications
You must be signed in to change notification settings - Fork 404
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
When using serde_derive
via rules_rust, build fails with: failed to spawn process "No such file or directory"
#2071
Comments
I'm hitting this one too. The error might be related to which was fixed swiftly for Cargo users. |
@ttiurani the issue you linked and the issue I describe here a two very different issues. The fix in https://github.com/serde-rs/serde/releases/tag/v1.0.173 for serde-rs/serde#2516 does not solve the problem described in this issue. I assume the problem with "No such file or directory", is that crate_universe does not make the binary available which will be used in the proc macro of serde_derive. |
Yes indeed, should have emphasized the "might" part! I thought it best to give some context related to that upstream serde issue which I almost commented on before finding this issue, but didn't mean to imply that this rules_rust problem was fixed with that change. |
I'm also getting bitten by this issue! |
+1 here. |
For what is worth, you can work around this issue by locking an earlier version: serde = { version = "=1.0.164", features = ["derive"] } https://github.com/kolloch/rust-bazel-missing-proc-macro2/blob/main/Cargo.toml#L8-L9 [Thank you for the great bug report BTW, I was just assembling mine and found this after but honestly had nothing to add :) ] |
I'm getting this instead, not sure if it's same thing |
The error message changed since version 1.0.176, see: https://github.com/serde-rs/serde/blob/v1.0.176/precompiled/serde_derive/src/lib_precompiled.rs#L44-L52 but the root cause of the problem remains the same. See also #2074 |
I'd like to know if there's a way to hijack the dependency of a 3rd party crate from |
Hi, I see that #2097 is merged - I have a dump question - what do I need to do to make the build fixed? ty |
I tried to replicate the bug with a bootstrapped version of rules_rust here: https://github.com/ttiurani/rules_rust/tree/main/examples/crate_universe_failure/serde_derive and unfortunately the merge of that PR alone (at least as far as I can tell) did not seem to fix the problem. |
Good news: my tester now compiles again with serde_derive v.1.0.184 and later. This is because serde removed prebuilt binaries: https://github.com/serde-rs/serde/releases/tag/v1.0.184 Things possibly again work also with older versions of rules_rust? Edit. At least for my builds with a new serde version, this error is gone. I didn't update rules_rust either. |
oh wow |
With the recent update of serde to not use the ore compiled binary anymore, this issue became outdated. |
Originally had to pin to an older serde version due to https://stackoverflow.com/questions/76905691/bazel-unable-to-build-external-rust-dependency-with-feature-serde1, but according to [this comment](bazelbuild/rules_rust#2071 (comment)), this issue is resolved in newer released versions now ## Test plan `bazel build //docker-images/syntax-highlighter:scip-ctags` works
When using (transitively)
serde_derive
in a Bazel workspace viarules_rust
, the build fails with:This only happens on
#[cfg(all(target_arch = "x86_64", target_os = "linux", target_env = "gnu"))]
.I think it is related to serde release 1.0.172.
Due to:
Minimal reproducible example
WORKSPACE
BUILD
main.rs
The text was updated successfully, but these errors were encountered: