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

Mommy can't check rust-analyzer if I ask her for debuginfo #118061

Closed
saethlin opened this issue Nov 19, 2023 · 3 comments
Closed

Mommy can't check rust-analyzer if I ask her for debuginfo #118061

saethlin opened this issue Nov 19, 2023 · 3 comments
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@saethlin
Copy link
Member

With this config:

[rust]
debuginfo-level = 1

Try to use mommy via x by doing this hack I copied from @Nilstrieb:

alias x="CARGO=x cargo-mommy"
x check src/tools/rust-analyzer

But I get this:


error: failed to run custom build command for `proc-macro-test v0.0.0 (/home/ben/rust-master/src/tools/rust-analyzer/crates/proc-macro-test)`

Caused by:
  process didn't exit successfully: `/home/ben/rust-master/build/x86_64-unknown-linux-gnu/stage0-tools/release/build/proc-macro-test-7fa74236db286eaa/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=imp
  cargo:rerun-if-env-changed=PROC_MACRO_TEST_TOOLCHAIN
  Creating /home/ben/rust-master/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/build/proc-macro-test-69377bbf9f6b825d/out/proc-macro-test-imp-staging
  Creating /home/ben/rust-master/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/build/proc-macro-test-69377bbf9f6b825d/out/proc-macro-test-imp-staging/src
  Copying /home/ben/rust-master/src/tools/rust-analyzer/crates/proc-macro-test/imp/Cargo.toml to /home/ben/rust-master/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/build/proc-macro-test-69377bbf9f6b825d/out/proc-macro-test-imp-staging/Cargo.toml
  Copying /home/ben/rust-master/src/tools/rust-analyzer/crates/proc-macro-test/imp/src/lib.rs to /home/ben/rust-master/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/build/proc-macro-test-69377bbf9f6b825d/out/proc-macro-test-imp-staging/src/lib.rs
  Running cd "/home/ben/rust-master/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/build/proc-macro-test-69377bbf9f6b825d/out/proc-macro-test-imp-staging" && "/home/ben/rust-master/x" "build" "-p" "proc-macro-test-impl" "--message-format" "json" "--target-dir" "/home/ben/rust-master/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/build/proc-macro-test-69377bbf9f6b825d/out/target" "--target" "x86_64-unknown-linux-gnu"
  <snip>
       Compiling build_helper v0.1.0 (/home/ben/rust-master/src/tools/build_helper)
      Finished dev [unoptimized] target(s) in 9.88s
  error: unexpected argument '-p' found

    tip: to pass '-p' as a value, use '-- -p'

  Usage: x.py build [OPTIONS] [PATHS]... [-- <ARGS>...]

  For more information, try '--help'.
  Build completed unsuccessfully in 0:00:18


  --- stderr
  thread 'main' panicked at crates/proc-macro-test/build.rs:87:9:
  proc-macro-test-impl failed to build
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:01:14

At a glance,

"/home/ben/rust-master/x" "build" "-p" "proc-macro-test-impl"

Seems like the problem, because you can't just replace cargo with x. But why does this work for everything else? And why does it work with debuginfo-level = 0?

@saethlin saethlin added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-bug Category: This is a bug. labels Nov 19, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 19, 2023
@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Nov 19, 2023
@Noratrieb
Copy link
Member

Gankra/cargo-mommy#62 will probably fix this

@saethlin
Copy link
Member Author

Yup, this works:

alias x="CARGO_MOMMYS_ACTUAL=x cargo-mommy"

@jyn514
Copy link
Member

jyn514 commented Nov 19, 2023

Seems like the problem, because you can't just replace cargo with x. But why does this work for everything else? And why does it work with debuginfo-level = 0?

the proc-macro-test build script is using CARGO somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

4 participants