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

pretty-env-logger = 0.2 fails to cargo doc #5345

Closed
richard-uk1 opened this issue Apr 11, 2018 · 1 comment · Fixed by #5361
Closed

pretty-env-logger = 0.2 fails to cargo doc #5345

richard-uk1 opened this issue Apr 11, 2018 · 1 comment · Fixed by #5361

Comments

@richard-uk1
Copy link
Contributor

richard-uk1 commented Apr 11, 2018

This is caused by a dependency on different versions of the same crate, depending on target. See rust issue 49002. I made a small project to reproduce the problem on github.

I need to work out 2 things

  1. How to fix it
  2. How to write a regression test

I don't know how to write a test without using crates.io, because trying to depend on 2 different versions using a local path is rejected:

error: failed to parse manifest at `/home/rdodd/devel/non-work/rust_49002/Cargo.toml`

Caused by:
  Dependency 'dep' has different source paths depending on the build target. Each dependency must have a single canonical source path irrespective of build target.

Or maybe the manifest should fail to compile also for differing versions on crates.io?

@alexcrichton
Copy link
Member

Thanks for the report! You can add crates to a registry in Cargo's test suite where it doesn't actually hit crates.io (search for usage of Package), and that may help in writing a test? Otherwise seems good to fix!

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

Successfully merging a pull request may close this issue.

2 participants