Skip to content

Cannot build project depending on serde using Cargo from 2017 #14237

@aidanhs

Description

@aidanhs

Problem

I was expecting to be able to build an old project with a cargo.lock and correct rustc, but it fails because of a registry parsing error for an unrelated version of serde

Steps

$ git clone https://github.com/aidanhs/ayzim.git
$ rustup default rustup default nightly-2017-03-03
~/ayzim $ cargo --version
cargo 0.18.0-nightly (19ea423 2017-03-02)
~/ayzim $ cargo build --verbose
error: failed to parse registry's information for: serde

Caused by:
  Feature `derive` depends on `serde_derive` which is not an optional dependency.
Consider adding `optional = true` to the dependency

Possible Solution(s)

I think when trying to parse the registry, my version of cargo should lazily apply validation checks to versions being considered instead of eagerly validating all versions. Unfortunately even doing this doesn't help my really old version of cargo and I don't really want to update the project...I just want to build it!

Notes

No response

Version

$ cargo --version --verbose
cargo 0.18.0-nightly (19ea423 2017-03-02)
release: 0.18.0
commit-hash: 19ea4238114ea94c3fde0b623618e75accd70a66
commit-date: 2017-03-02

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-registriesArea: registriesC-bugCategory: bugS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions