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

Compiler error running tests #51

Closed
LukasKalbertodt opened this issue Jun 5, 2019 · 0 comments · Fixed by #53
Closed

Compiler error running tests #51

LukasKalbertodt opened this issue Jun 5, 2019 · 0 comments · Fixed by #53
Labels

Comments

@LukasKalbertodt
Copy link
Member

LukasKalbertodt commented Jun 5, 2019

For a few weeks now, the daily CI builds fail on nightly. Everything works up till the doctest which fails with:

error: extern location for quote does not exist: /home/travis/build/auto-impl-rs/auto_impl/target/debug/deps/libquote-db9ca8cbcca99a73.rlib
error[E0463]: can't find crate for `quote`

I investigated a bit and found the cause of this failure:

  • cargo build (and cargo test --no-run) prepare the files correctly. They create libquote-db9ca8cbcca99a73.rlib in the right location.
  • cargo test --tests now runs our own test harnesses. They need to get the path to libauto_impl****.so. This is done via the build_plan crate and by executing cargo build -Z unstable-options --build-plan. Executing this command deletes the libquote-db9ca8cbcca99a73.rlib file! (And apparently a bunch of other files as well)
  • cargo test --doc then tries to run rustdoc which is unable to find the libquote-db9ca8cbcca99a73.rlib file.

So the problem is cargo build -Z unstable-options --build-plan removing the rlib file. I'm not yet sure if that's intended or not. When I first created those tests, it worked fine. But I guess it was clear that the current solution is hacky and would break at some point.

I'm trying to fix this, but wanted to create this issue already to write down my findings.


Apparently this is tracked here: rust-lang/cargo#6954

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

Successfully merging a pull request may close this issue.

1 participant