tarpaulin: Tarpaulin fails with `Error: cannot find attribute 'skip' in this scope"` with rust 1.52.0 even if skip isn't used
Describe the bug
When trying to run tarpaulin in our project with rust v1.52.0 it fails with the error:
error: Broken pipe (os error 32)
warning: build failed, waiting for other jobs to finish...
error: Broken pipe (os error 32)
error: build failed
May 07 11:14:50.974 ERROR cargo_tarpaulin: Failed to compile tests! Error: cannot find attribute `skip` in this scope
Error: "Failed to compile tests! Error: cannot find attribute `skip` in this scope"
tarpaulin works with rust 1.51.0 and we do not use the skip
attribute in the codebase
To Reproduce
clone https://github.com/tremor-rs/tremor-runtime and update the rust-toolchain
file to 1.52.0
Expected behavior
projects working in 1.51.0 also work in 1.52.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 32 (11 by maintainers)
Commits related to this issue
- Disable code coverage report on CI The coverage analysis currently fails while compiling `bitvec`. This is tracked as xd009642/tarpaulin#756. — committed to jtgeibel/crates.io by jtgeibel 3 years ago
- Disable code coverage report on CI The coverage analysis currently fails while compiling `bitvec`. This is tracked as xd009642/tarpaulin#756. — committed to jtgeibel/crates.io by jtgeibel 3 years ago
- CI: Cycle cargo binary cache and add `--avoid-cfg-tarpaulin` to tarpaulin see https://github.com/xd009642/tarpaulin/issues/756 — committed to Turbo87/crates.io by Turbo87 3 years ago
- CI: Cycle cargo binary cache and add `--avoid-cfg-tarpaulin` to tarpaulin see https://github.com/xd009642/tarpaulin/issues/756 — committed to Turbo87/crates.io by Turbo87 3 years ago
- CI: Cycle cargo binary cache and add `--avoid-cfg-tarpaulin` to tarpaulin see https://github.com/xd009642/tarpaulin/issues/756 — committed to Turbo87/crates.io by Turbo87 3 years ago
- Auto merge of #3602 - Turbo87:tarpaulin-workaround, r=jtgeibel CI: Cycle cargo binary cache and add `--avoid-cfg-tarpaulin` to tarpaulin see https://github.com/xd009642/tarpaulin/issues/756 r? `@gh... — committed to rust-lang/crates.io by bors 3 years ago
- try workaround --avoid-cfg-tarpaulin from https://github.com/xd009642/tarpaulin/issues/756 — committed to ergoplatform/sigma-rust by greenhat 3 years ago
- run tarpaulin with --avoid-cfg-tarpaulin see xd009642/tarpaulin#756 — committed to brunocodutra/reducer by brunocodutra 3 years ago
- run tarpaulin with --avoid-cfg-tarpaulin see xd009642/tarpaulin#756 — committed to brunocodutra/reducer by brunocodutra 3 years ago
- add flag to tarpaulin coverage command https://github.com/xd009642/tarpaulin/issues/756 — committed to shnewto/bnf by shnewto 3 years ago
- haven't been able to get a successful tarpaulin coverage report (see https://github.com/xd009642/tarpaulin/issues/756) so removing it all together for now — committed to shnewto/bnf by shnewto 3 years ago
- haven't been able to get a successful tarpaulin coverage report (see https://github.com/xd009642/tarpaulin/issues/756) so removing it all together for now (#83) — committed to shnewto/bnf by shnewto 3 years ago
- Revert "haven't been able to get a successful tarpaulin coverage report (see https://github.com/xd009642/tarpaulin/issues/756) so removing it all together for now (#83)" This reverts commit fd5bdf221... — committed to shnewto/bnf by shnewto 3 years ago
- Revert "haven't been able to get a successful tarpaulin coverage report (see https://github.com/xd009642/tarpaulin/issues/756) so removing it all together for now (#83)" (#85) This reverts commit fd5... — committed to shnewto/bnf by shnewto 3 years ago
- Fix https://github.com/xd009642/tarpaulin/issues/756 — committed to Snowfork/snowbridge by vgeddes 3 years ago
- Update to Polkadot 0.9.9 (#515) * Update to Polkadot 0.9.9 * Update runtimes and tests * Make actions workflow use newer rustc * Update benchmarks * Fix https://github.com/xd009642/tarpau... — committed to Snowfork/snowbridge by vgeddes 3 years ago
- Update to Polkadot 0.9.9 (#515) * Update to Polkadot 0.9.9 * Update runtimes and tests * Make actions workflow use newer rustc * Update benchmarks * Fix https://github.com/xd009642/tarpau... — committed to Snowfork/snowbridge-nft by vgeddes 3 years ago
Had the same issue, also with
bitvec
. Updating tarpaulin to the latestalphaversion (EDIT: v0.18.x is out of alpha by now) (cargo install cargo-tarpaulin --version 0.18.3
) And adding the--avoid-cfg-tarpaulin
flag solved the problem.On my repo I had no further errors/warnings.
hello, I’m really sorry about the issues with bitvec and nom. I started the work on nom 7 which should fix them, but the rest of what I’d like to pass in that version is not ready yet, so in the meantime I published nom 7.0.0-alpha1 which only includes dependency updates. Could you check if it works for you?
If everyone else with issues wants to check and let me know the projects if they still fail. I’ll go on a hunt around the ecosystem upgrading things as needs be 😄 also if I don’t hear anything else in a month or so I’ll probably close this issue as inactive
I used
cargo tarpaulin --avoid-cfg-tarpaulin
and it worked now 🎉 . You responded before I could delete my comment. 😱Okay just checked and the askama 0.12 beta has nom at 0.7 so you’ll be able to remove the flag once the next version of askama is released (unless you wanted to move to a beta release ofc).
And with updating to 0.18.3 free 2% test coverage 😄 🚀 from our side this is fully resolved 😃
It’s just a number, it’s fine 😁
We’d need a way to apply rust flags to only the top level crate and not the dependencies, unless there’s something rust can do that I’m not aware of. I tried to do this once by calling rustc directly but it didn’t work very well. The attributes also had the breaking change in 0.14.0 after I found minimal use of them in peoples code I don’t expect a change like that again anytime soon. (Also, there is the flag to enable the legacy behaviour)
So in my own production rust I rely on
--locked
to force it to use exactly what’s in the lockfile as there seems to be some instances where things can slightly change