Bug 2229663

Summary: Rustc/cargo can't find source code file
Product: [Fedora] Fedora Reporter: Jakub Čajka <jcajka>
Component: rustAssignee: Rust SIG <rust-sig>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: amulhern, igor.raits, jistone, rust-sig, TicoTimo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-08 00:58:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Čajka 2023-08-07 09:17:28 UTC
It appears that rustc/cargo can't find, resolve file dependencie properly. This has been reported upstream but they can't reproduce this issue https://github.com/rust-cli/anstyle/issues/110 .

Reproducible: Always

Steps to Reproduce:
1.git clone https://github.com/rust-cli/anstyle
2.pushd anstyle
3.cargo test
Actual Results:  
.
.
.
running 3 tests
test state::definitions::tests::pack_state_action ... ok
test state::definitions::tests::unpack_state_action ... ok
test state::codegen::table ... FAILED

failures:

---- state::codegen::table stdout ----
thread 'state::codegen::table' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', crates/anstyle-parse/src/state/codegen.rs:11:54
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    state::codegen::table

test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Expected Results:  
All tests are built and passes

Result are the same regardless if the tests are started via the top level workspace or directly in the anstyle-parse crate.

Comment 1 Josh Stone 2023-08-07 17:09:12 UTC
As I replied upstream, I think you just need to "dnf install rustfmt".