-
Notifications
You must be signed in to change notification settings - Fork 2
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
Build hangs for some build scripts #13
Comments
Update, tracked it down to a single line in paste's build.rs; minimal example that seems to hang is this: add fn main() {
_ = "".split('.'); // <-- ???
} This causes it to hang forever:
|
Looking into it a bit further, just running RUSTFLAGS="-Cremark=all -Cdebuginfo=1" cargo +nightly build --release causes
So,
Perhaps related: rust-lang/cargo#6375 (re: not passing RUSTFLAGS down to build scripts which can cause all sorts of problems like here) |
Hi, thanks for investigating this! To be clear, you were able to reproduce this with an empty Cargo project containing the mentioned build script? I can't reproduce the build script error on such an empty project with a build script. |
Yes, the following hangs: cargo new --bin foo
cd foo
echo 'fn main() { _ = "".split(\'.\'); }' > build.rs
cargo +nightly remark build (to clarify, this is on M1 macOS, things may behave different on x64/linux I think) rustc version: |
I see. This works for me on Linux, so it's hard for me to reproduce 😅 I think that the fact that it errors out for you (not the cargo remark hang, but the |
For larger projects, chances are there's always going to be some proc-macro dependencies involved, seems like
cargo remark build
just hangs; here's the simplest example (taken frompaste
docs):which results in hanging forever here:
Edit: not sure if it's proc-macro-related, or if it's something to do with
paste
. Or dependencies that have a custombuild.rs
perhaps?The text was updated successfully, but these errors were encountered: