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

[CI] [Rust] Fix broken cargo coverage #20771

Closed
asfimport opened this issue Jan 8, 2019 · 6 comments
Closed

[CI] [Rust] Fix broken cargo coverage #20771

asfimport opened this issue Jan 8, 2019 · 6 comments

Comments

@asfimport
Copy link
Collaborator

The Rust cargo coverage is failing with the following error:

warning: unused manifest key: package.edition
warning: unused manifest key: package.edition
...
error[E0432]: unresolved import `num`
  --> arrow/src/array_ops.rs:22:5
   |
22 | use num::Zero;
   |     ^^^ did you mean `std::num`?
error[E0432]: unresolved imports `self::csv_crate::StringRecord`, `self::csv_crate::StringRecordsIntoIter`
  --> arrow/src/csv/reader.rs:55:23
   |
55 | use self::csv_crate::{StringRecord, StringRecordsIntoIter};
   |                       ^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^ no `StringRecordsIntoIter` in `csv`
   |                       |
   |                       no `StringRecord` in `csv`
error[E0432]: unresolved import `serde_derive`
  --> arrow/src/datatypes.rs:29:5
   |
29 | use serde_derive::{Deserialize, Serialize};
   |     ^^^^^^^^^^^^ maybe a missing `extern crate serde_derive;`?
error[E0432]: unresolved import `serde_json`
  --> arrow/src/datatypes.rs:30:5
   |
30 | use serde_json::{json, Value};
   |     ^^^^^^^^^^ maybe a missing `extern crate serde_json;`?
error[E0432]: unresolved import `libc`
  --> arrow/src/memory.rs:18:5
   |
18 | use libc;
   |     ^^^^ no `libc` in the root
error[E0432]: unresolved import `rand`
  --> arrow/src/util/test_util.rs:18:5
   |
18 | use rand::{thread_rng, Rng};
   |     ^^^^ maybe a missing `extern crate rand;`?
...

perhaps because it doesn't recognize Rust 2018 edition.

Reporter: Chao Sun / @sunchao
Assignee: Jorge Leitão / @jorgecarleitao

PRs and other links:

Note: This issue was originally created as ARROW-4189. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Owen Nelson / @onelson:
@sunchao I'd expect to see output like this when using an older version of the rust toolchain (lower than 1.31). Support for editions was added to cargo with 1.31, along with almost but not all of the module system updated (there were some minor changes made in the subsequent 1.32 release).

Do you happen to know which version of the toolchain you saw this with?

@asfimport
Copy link
Collaborator Author

Andy Grove / @andygrove:
Code coverage seems to have been broken for many months due to multiple reasons ... I will work on getting it running again as part of moving to the use of docker compose for the CI builds

@asfimport
Copy link
Collaborator Author

Andy Grove / @andygrove:
The current travis code for reference is

 cargo install cargo-tarpaulin -f
cargo tarpaulin --out Xml
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" 

When trying to run this via docker-compose it fails with:

 Failed to run tests: ASLR disable failed: EPERM: Operation not permitted

I'm not even sure why we were using Tarpaulin when the codecov.io documentation provides a different method based on kcov: https://github.com/codecov/example-rust

@asfimport
Copy link
Collaborator Author

Jorge Leitão / @jorgecarleitao:
@andygrove, that error happens because our docker run does not pass a security variable required by Tarpaulin, details #7797 (comment)

I would go for Tarpaulin; it seems to be the standard for rust. I was able to make it work on our repo outside docker but it naturally doubles the build time. I am trying to move it to inside the image.

@asfimport
Copy link
Collaborator Author

Andy Grove / @andygrove:
I have unassigned myself from this issue since I have too many other issues I am working on and don't want to block progress on this

@asfimport
Copy link
Collaborator Author

Krisztian Szucs / @kszucs:
Issue resolved by pull request 7797
#7797

@asfimport asfimport added this to the 2.0.0 milestone Jan 11, 2023
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