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

rust coverage test could not compile error #1652

Closed
yihau opened this issue Mar 10, 2023 · 6 comments · Fixed by #1740
Closed

rust coverage test could not compile error #1652

yihau opened this issue Mar 10, 2023 · 6 comments · Fixed by #1740
Assignees

Comments

@yihau
Copy link
Contributor

yihau commented Mar 10, 2023

When I tried to do coverage test with rust nightly-2023-02-09, I got

sccache: encountered fatal error
sccache: error: failed to zip up compiler outputs
sccache: caused by: failed to zip up compiler outputs
sccache: caused by: failed to open file `"/Users/yihau/yihau/sccache-coverage-error/target/debug/deps/unicode_ident-25938e1fedca0d89.gcno"`
sccache: caused by: No such file or directory (os error 2)
error: could not compile `unicode-ident`

Caused by:
  process didn't exit successfully: `/Users/yihau/.cargo/bin/sccache rustc --crate-name unicode_ident --edition=2018 /Users/yihau/.cargo/registry/src/github.com-1ecc6299db9ec823/unicode-ident-1.0.8/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=156 --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C split-debuginfo=unpacked -C metadata=25938e1fedca0d89 -C extra-filename=-25938e1fedca0d89 --out-dir /Users/yihau/yihau/sccache-coverage-error/target/debug/deps -L dependency=/Users/yihau/yihau/sccache-coverage-error/target/debug/deps --cap-lints allow -Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort` (exit status: 254)
warning: build failed, waiting for other jobs to finish...

I have a tiny project can reproduce the error: https://github.com/yihau/sccache-coverage-build-error (The step is in the coverage.sh)

btw, It works fine with nightly-2023-02-08

@sylvestre
Copy link
Collaborator

Indeed, I have the same issue with https://github.com/uutils/coreutils

@Xuanwo did you see this problem before ?

@Xuanwo
Copy link
Collaborator

Xuanwo commented Mar 10, 2023

If the code works on nightly-2023-02-08 but not on nightly-2023-02-09, perhaps we should report this issue to the Rust team. By the way, have you tested it on the latest nightly version?

@yihau
Copy link
Contributor Author

yihau commented Mar 10, 2023

yeah. Originally I tested it on nightly-2023-03-09 and it failed so I tried to find the first error version. Finally I found it was nightly-2023-02-09.

I reported the issue here cuz I also found all of them work fine if I don't use sccache 😢

@Xuanwo
Copy link
Collaborator

Xuanwo commented Mar 10, 2023

Regardless of the root cause, we can choose to ignore the not found error, abandon this cache, and continue with the compilation process. I will implement a solution for this issue.

@yihau
Copy link
Contributor Author

yihau commented Apr 20, 2023

Hi @Xuanwo, anything I can help with this one?

@Xuanwo
Copy link
Collaborator

Xuanwo commented Apr 20, 2023

Hi @Xuanwo, anything I can help with this one?

We can ignore the NotFound error happened here:

sccache/src/cache/cache.rs

Lines 253 to 254 in 4a8b5f5

let f = fs::File::open(&path)
.with_context(|| format!("failed to open file `{:?}`", path));

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.

3 participants