Does every Cargo.toml that uses the 2018 edition need to say so to Cargo?

If a crate has edition="2018" in the [package] section of Cargo.toml, does cargo vendor require cargo-features = ["edition"] at the beginning of the file for it to work?

I'm finding this problematic for crates I don't control. For example, doing cargo vendor inside librsvg's make distcheck produces this:

tlacoyo:~/src/librsvg/master (master *)$ cargo vendor
error: failed to sync

Caused by:
  failed to fetch package

Caused by:
  unable to get packages from source

Caused by:
  failed to parse manifest at `/home/federico/.cargo/registry/src/github.com-1ecc6299db9ec823/fuchsia-cprng-0.1.1/Cargo.toml`

Caused by:
  editions are unstable

Caused by:
  feature `edition` is required

consider adding `cargo-features = ["edition"]` to the manifest

Does your cargo-vendor predate stable editions? The latest version should work.

You are correct; it works with cargo-vendor 0.1.23. I had an old cargo-vendor in ~/.cargo/bin, which was clashing with the system's version. :man_facepalming:t4:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.