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

ERROR cargo_tarpaulin: Failed to compile tests! #905

Closed
gkorland opened this issue Dec 19, 2021 · 7 comments
Closed

ERROR cargo_tarpaulin: Failed to compile tests! #905

gkorland opened this issue Dec 19, 2021 · 7 comments

Comments

@gkorland
Copy link

gkorland commented Dec 19, 2021

Describe the bug
Error while building:

Dec 19 12:50:49.869 ERROR cargo_tarpaulin: Failed to compile tests! Error: redis-module: cannot find value `ptr` in this scope

To Reproduce

> git clone git@github.com:RedisJSON/RedisJSON.git
> cd RedisJSON
> cargo tarpaulin

Expected behavior
Successful build

@gkorland
Copy link
Author

When trying to build

> git clone git@github.com:RedisLabsModules/redismodule-rs.git
> cd redismodule-rs
> cargo tarpaulin

Got the following error:

0 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"

@gkorland
Copy link
Author

ref #756

@xd009642
Copy link
Owner

So for RedisJSON, I got the SIGILL instruction, so I checked the readme and did cargo tarpaulin --features test and it works. Maybe you're missing the feature?

Well when I cloned redismodule-rs fresh it's using nom 7 and bitvec isn't in the dependency tree, I'd recommend upgrading whatever package is bringing it in cargo tree -i bitvec, but I can't see what is doing it... In the meantime --avoid-cfg-tarpaulin is a flag to go back to the legacy tarpaulin attribute behaviour.

I then ran tarpaulin using cargo tarpaulin --features test,experimental-api as this matched the features tested under in CI, and it compiled and was running fine until this error which I imagine is just due to my system setup - I'm not sure if I have redis installed on this machine:


running 2 tests
test test_keys_pos ... FAILED
test test_hello ... FAILED

failures:

---- test_keys_pos stdout ----
Error: failed to start redis server

Is there any more information that could help me recreate this? Compiler versions, any configuration etc? From what I see currently it all seems to work as expected

@gkorland
Copy link
Author

gkorland commented Dec 19, 2021

So for RedisJSON, I got the SIGILL instruction, so I checked the readme and did cargo tarpaulin --features test and it works. Maybe you're missing the feature?

I just ran it with cargo tarpaulin --features test and got the same error:

$ cargo tarpaulin --features test
...

...
   Compiling chrono v0.4.19
   Compiling rand v0.7.3
   Compiling env_logger v0.9.0
   Compiling strum_macros v0.23.1
   Compiling redis-module v0.25.0
error: Broken pipe (os error 32)
warning: build failed, waiting for other jobs to finish...
error: Broken pipe (os error 32)
error: build failed
Dec 19 14:39:13.835 ERROR cargo_tarpaulin: Failed to compile tests! Error: redis-module: cannot find value `ptr` in this scope
Error: "Failed to compile tests! Error: redis-module: cannot find value `ptr` in this scope"

Running on:

  • Ubuntu 21.10
  • rustup 1.24.3 (ce5817a94 2021-05-31)
  • rustc 1.57.0 (f1edd0429 2021-11-29)

@xd009642
Copy link
Owner

Strange, I just tried it with tarpaulin 0.18.5, with rustc 1.57.0 on ubuntu 18.04 and it worked fine. Can you do a cargo clean before you run tarpaulin?

@gkorland
Copy link
Author

cargo clean didn't help

@xd009642
Copy link
Owner

Haven't been able to reproduce, still works fine my end and now there's --engine llvm which further increases compat with other projects. So closing this as likely fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants