Cargo: Failed to build a project from crates.io due to README.md

Created on 12 Jun 2020  ·  3Comments  ·  Source: rust-lang/cargo

Problem

I cannot build and run the tests for the crate dotenv.

Steps

I'm facing a problem trying to build a project that uses the create dotenv.

I'm running inside the docker rust:1.44.0.
I have installed the nightly:

rustup toolchain install nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2020-06-12, rust version 1.46.0-nightly (a37c32e2d 2020-06-11)
info: downloading component 'cargo'
  5.0 MiB /   5.0 MiB (100 %)   1.5 MiB/s in  2s ETA:  0s
info: downloading component 'rust-std'
 15.9 MiB /  15.9 MiB (100 %)  15.0 MiB/s in  1s ETA:  0s
info: downloading component 'rustc'
 47.3 MiB /  47.3 MiB (100 %)  10.9 MiB/s in  5s ETA:  0s
info: installing component 'cargo'
info: installing component 'rust-std'
 15.9 MiB /  15.9 MiB (100 %)   9.1 MiB/s in  1s ETA:  0s
info: installing component 'rustc'
 47.3 MiB /  47.3 MiB (100 %)   9.9 MiB/s in  4s ETA:  0s

  nightly-x86_64-unknown-linux-gnu installed - rustc 1.46.0-nightly (a37c32e2d 2020-06-11)

info: checking for self-updates

Now it gives me:

 cargo +nightly test
error: failed to download `dotenv v0.15.0`

Caused by:
  unable to get packages from source

Caused by:
  failed to parse manifest at `/usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/dotenv-0.15.0/Cargo.toml`

Caused by:
  readme file with name '../README.md' was not found

I've tried to remove the readmes from the project but it is going to fail cause it has a dependency with the same problem:
https://github.com/dotenv-rs/dotenv/pull/52

Possible Solution(s)

Add an option to ignore missing README.md files.

Notes

https://github.com/dotenv-rs/dotenv/issues/51
https://stackoverflow.com/questions/62336892/failed-to-build-dotenv-v0-15-0-rust-cargo

C-bug

Most helpful comment

Thanks for the report. This has been fixed (see #8351), and will hopefully make it in the next nightly (if https://github.com/rust-lang/rust/pull/73266 lands before midnight UTC).

All 3 comments

Thanks for the report. This has been fixed (see #8351), and will hopefully make it in the next nightly (if https://github.com/rust-lang/rust/pull/73266 lands before midnight UTC).

Thanks for the report. This has been fixed (see #8351), and will hopefully make it in the next nightly (if rust-lang/rust#73266 lands before midnight UTC).

@ehuss Do you know when will be released the next nightly?
Also, is there any workaround before that?

Publishing is usually finished by 01:00 UTC. The workaround is to install a previous nightly.

Was this page helpful?
0 / 5 - 0 ratings