Skip to content

[dev-dependencies] referencing [dependencies] causes warnings #7024

Open
@ghost

Description

Hello Rust developers,

My Problem

In Cargo.toml, in order to use same version of a dependency for both [dependencies] and [dev-dependencies], I use a reference:

[dependencies]
some = '0.1'

[dev-dependencies]
some = { package='some' }

It compiles, but with a warning: dependency (some) specified without providing a local path, Git repository, or version to use. This will be considered an error in future versions.

Possible Solution(s)

Both section can declare their own version strings, and the warning will be gone. However, I'm using references to reduces mistakes, maintenance cost... Yes it is just a small version string, but I wish to be able to declare it in one single place.

Beside, references are legal: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html -- May I ask if you could make my problem above a legal declaration?

Notes

Output of cargo version: cargo 1.35.0 (6f3e9c367 2019-04-04)

Thank you,

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-dev-dependenciesArea: [dev-dependencies]C-bugCategory: bugS-needs-rfcStatus: Needs an RFC to make progress.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions