Closed Licenser closed 2 years ago
Interestingly, I got the same error but with a better message, it seems the error comes from an older version of bitvec which is used by nom (which is used by syslog_loose and hdrhistogram). It's bitvec 0.19.5 and they're currently on 0.22.3.
Also, nom can't update to the later bitvec which doesn't have the issue without bumping their MSRV so it might not be easily solvable. I think the issue there is likely down to the breaking change in the tarpaulin attributes and there is --avoid-cfg-tarpaulin
to persist with the old behaviour (although that will make your tarpaulin attributes to ignore code useless).
I tried with --avoid-cfg-tarpaulin
and got another issue with the crate procedural-masquerade
(a member of rust-cssparser) so now just looking into that
oh I realised you're on 0.16.0 instead of one of the alphas so don't have --avoid-cfg-tarpaulin
. But with 0.16.0 and 0.18.0-alpha3 I do get the skip error on rust 1.51 and 1.52 so not sure what changed there. Maybe one of the dependencies that pulled in bitvec had a patch bump that's being bought in that changes the bitvec version :thinking:
Oi, would it be possible to ignore attributes in dependencies? Making sure that all 700 dependencies have their tests written with up-to-date tarpaulin attributes will be a bit of a nightmare. if tarpaulin gains more traction the rust ecosystem tendencies to small dependencies / crates could make that a bigger problem for breaking changes in the future.
Maybe one of the dependencies that pulled in bitvec had a patch bump that's being bought in that changes the bitvec version
they all should be locked in the lockfile so a updated rust-toolchaiun should :tm: not cause a change in dependencies
Oi, would it be possible to ignore attributes in dependencies?
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)
they all should be locked in the lockfile so a updated rust-toolchaiun should tm not cause a change in dependencies
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
I tried it with --locked
, same codebase, ran tarpaulin with the rust-toolchain
being 1.51.0
and it compiles then change the rust-toolchain
to 1.52.1
and re-execute cargo tarpaulin --locked
and it fails. I don't know what it is but something that changed between 1.51.0
and 1.52.0
did cause a degradation :(
Hi, Same issue here using Rust 1.52.0.
Compiling bitvec v0.19.5
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 11 13:17:29.567 ERROR cargo_tarpaulin: Failed to compile tests! Error: bitvec: cannot find attribute `skip` in this scope
Error: "Failed to compile tests! Error: bitvec: cannot find attribute `skip` in this scope"
Update: I did try with the 18 alpha, which gets past it and compilation. the procedural-masquerade error is based on a false positive in a warning: https://github.com/rust-lang/rust/issues/83125 and can be solved with #![allow(proc_macro_back_compat)]
with that tarpaulin runs again :D
so the 18-alpha is a workaround but I'm still curious what causes the degradation :sweat_smile:
Had the same issue, also with bitvec
.
Updating tarpaulin to the latest alpha version (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?
Hi Geal, don't be sorry :)! I can't test it sadly since nom isn't a direct dependency but rather pulled in in a number of different versions over a few other sub dependencies :(
@Licenser You can use [patch.crates-io]
if you're feeling lucky
With the tarpaulin 0.18.0 release, I still see this error in CI (GitHub Actions). Now that nom 7 has been released without the bitvec dependency enabled by default, is there some work we can do here? I looked into tarpaulin's dependency tree using cargo tree but did not any direct or indirect dependency on nom, so I'm a bit confused now.
I'm still encountering this issue on the latest release.
@djc so it's not in tarpaulins dependency tree but rather projects wih tarpaulin being ran on them and there is the --avoid-cfg-tarpaulin
flag to solve this. One thing I'm going to start doing is working on finding any users of nom 6 and submitting PRs to update the nom version to make sure as much as possible can be moved on from. I've just submitted this one which should fix it for tremor https://github.com/HdrHistogram/HdrHistogram_rust/pull/102 and any other users of the hdrhistogram crate
So anyone using hdrhistogram can now upgrade to 7.4.0 and that will be one more instance of skip removed from their dependency tree (and maybe the last one). I've just had to go to a PC without everything installed but iirc it was the only instance of skip in tremor @Licenser
7.4.0* :)
Oops, used to everyone being like me and too shy to go 1.0.0 :sweat_smile:
It's just a number, it's fine 😁
I'll check :D
Yay it is the last! :rocket:
And with updating to 0.18.3 free 2% test coverage :D :rocket: from our side this is fully resolved :)
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 :smile: also if I don't hear anything else in a month or so I'll probably close this issue as inactive
I still get this on cargo-tarpaulin version: 0.18.5, rustc 1.56.1 (59eed8a2a 2021-11-01).
@ehiggs have you used --avoid-cfg-tarpaulin
to switch to the legacy behaviour, and do you have the code open so I can track which dependency is bringing in the old style attributes?
I used cargo tarpaulin --avoid-cfg-tarpaulin
and it worked now :tada: . You responded before I could delete my comment. :scream:
I was already on github doing some stuff :sweat_smile:. I'd still be interested in what the dependency is and if it's been updated or needs updating though
Compiling bitvec v0.19.5
error: Broken pipe (os error 32)
warning: build failed, waiting for other jobs to finish...
error: Broken pipe (os error 32)
error: build failed
Nov 13 17:22:48.505 ERROR cargo_tarpaulin: Failed to compile tests! Error: bitvec: cannot find attribute `skip` in this scope
Error: "Failed to compile tests! Error: bitvec: cannot find attribute `skip` in this scope"
├── askama v0.10.5
│ ├── askama_derive v0.10.5 (proc-macro)
│ │ ├── askama_shared v0.11.1
│ │ │ ├── askama_escape v0.10.1
│ │ │ ├── humansize v1.1.1
│ │ │ ├── nom v6.1.2
│ │ │ │ ├── bitvec v0.19.5
│ │ │ │ │ ├── funty v1.1.0
│ │ │ │ │ ├── radium v0.5.3
│ │ │ │ │ ├── tap v1.0.1
│ │ │ │ │ └── wyz v0.2.0
│ │ │ │ ├── funty v1.1.0
│ │ │ │ ├── lexical-core v0.7.6
│ │ │ │ │ ├── arrayvec v0.5.2
│ │ │ │ │ ├── bitflags v1.3.2
│ │ │ │ │ ├── cfg-if v1.0.0
│ │ │ │ │ ├── ryu v1.0.5
│ │ │ │ │ └── static_assertions v1.1.0
│ │ │ │ └── memchr v2.4.1
│ │ │ │ [build-dependencies]
│ │ │ │ └── version_check v0.9.3
│ │ │ ├── num-traits v0.2.14
│ │ │ │ [build-dependencies]
│ │ │ │ └── autocfg v1.0.1
│ │ │ ├── percent-encoding v2.1.0
│ │ │ ├── proc-macro2 v1.0.30 (*)
│ │ │ ├── quote v1.0.10 (*)
│ │ │ ├── serde v1.0.130 (*)
│ │ │ ├── syn v1.0.80 (*)
│ │ │ └── toml v0.5.8
│ │ │ └── serde v1.0.130 (*)
│ │ ├── proc-macro2 v1.0.30 (*)
│ │ └── syn v1.0.80 (*)
│ ├── askama_escape v0.10.1
│ └── askama_shared v0.11.1 (*)
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).
The next version of Askama will hopefully be released soon, so it will no longer trigger this problem.
Closing this as it's been resolved for us :)
Seeing this again @xd009642:
Jul 22 19:51:04.606ERROR cargo_tarpaulin: Failed to compile tests! Error: coins-core: cannot find attribute `skip` in this scope
Error: "Failed to compile tests! Error: coins-core: cannot find attribute `skip` in this scope"
Error: The process '/home/runner/.cargo/bin/cargo' failed with exit code 1
@0xAlcibiades you can use --avoid-cfg-tarpaulin
but whatever library is printing in the legacy skip macro should be updated (either bumping the dependency or PRing it and releasing a new one)
Describe the bug
When trying to run tarpaulin in our project with rust v1.52.0 it fails with the error:
tarpaulin works with rust 1.51.0 and we do not use the
skip
attribute in the codebaseTo Reproduce
clone https://github.com/tremor-rs/tremor-runtime and update the
rust-toolchain
file to 1.52.0Expected behavior
projects working in 1.51.0 also work in 1.52.0