You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a problem somewhere, if you've previously done a cargobuild|test|run
you must do a cargo clean before a cargo tarpaulin will succeed. And then you
may get a link error if you subsequently do a cargo build. This too can be resolved
by doing a cargo clean before the first subsequent cargo build :(
Here is the error I'm seeing:
wink@3900x:~/prgs/rust/projects/binance-auto-sell (main)
$ cargo tarpaulin --follow-exec
Apr 13 17:48:22.451 INFO cargo_tarpaulin: Running Tarpaulin
Apr 13 17:48:22.451 INFO cargo_tarpaulin: Building project
Compiling autocfg v1.0.1
Compiling proc-macro2 v1.0.26
...
Compiling clap v3.0.0-beta.2
Compiling binance-auto-sell v0.1.0 (/home/wink/prgs/rust/projects/binance-auto-sell)
error: could not compile `binance-auto-sell`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
thread 'main' panicked at 'already borrowed: BorrowMutError', src/tools/cargo/src/cargo/util/config/mod.rs:307:20
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Apr 13 17:48:30.124 ERROR cargo_tarpaulin: Failed to compile tests! Error: binance-auto-sell: linking with `cc` failed: exit code: 1
Error: "Failed to compile tests! Error: binance-auto-sell: linking with `cc` failed: exit code: 1"
After a cargo clean I see:
wink@3900x:~/prgs/rust/projects/binance-auto-sell (main)
$ cargo clean ; cargo tarpaulin --follow-exec
Apr 13 17:50:45.333 INFO cargo_tarpaulin: Running Tarpaulin
Apr 13 17:50:45.333 INFO cargo_tarpaulin: Building project
Compiling autocfg v1.0.1
Compiling proc-macro2 v1.0.26
Compiling version_check v0.9.3
...
Compiling clap v3.0.0-beta.2
Compiling binance-auto-sell v0.1.0 (/home/wink/prgs/rust/projects/binance-auto-sell)
Finished test [unoptimized + debuginfo] target(s) in 8.25s
Apr 13 17:50:53.842 INFO cargo_tarpaulin::process_handling::linux: Launching test
Apr 13 17:50:53.842 INFO cargo_tarpaulin::process_handling: running /home/wink/prgs/rust/projects/binance-auto-sell/target/debug/deps/binance_auto_sell-8b2f8d3614c3ece0
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Apr 13 17:50:54.416 INFO cargo_tarpaulin::process_handling::linux: Launching test
Apr 13 17:50:54.416 INFO cargo_tarpaulin::process_handling: running /home/wink/prgs/rust/projects/binance-auto-sell/target/debug/deps/cli-595a799ae4fee77f
running 4 tests
test test_no_params ... ok
test test_help ... ok
test test_req_params_as_env_vars ... ok
test test_req_params ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.30s
Apr 13 17:50:57.732 INFO cargo_tarpaulin::report: Coverage Results:
|| Tested/Total Lines:
|| src/main.rs: 6/6
||
100.00% coverage, 6/6 lines covered
The text was updated successfully, but these errors were encountered:
Semi fixed as tarpaulin now automatically cleans so just do a cargo tarpaulin. BUT you must do a cargo clean before doing any subsequent cargo build|run|test.
What I do now is use a trivial shell script cargo-precommit:
Here is the error I'm seeing:
After a
cargo clean
I see:The text was updated successfully, but these errors were encountered: