rust-lang / rust-lang/cargo

Dependencies resolution with `--minimal-versions`

Open
#5,657 87 comments 33 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-tracking-issue S-needs-design Z-minimal-versions
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

View all comments

Implementation PR: https://github.com/rust-lang/cargo/pull/5200
Docs: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#minimal-versions
Issues: https://github.com/rust-lang/cargo/labels/Z-minimal-versions

Steps:

Unresolved questions:

  • do we want to "impose" this feature on the ecosystem? Currently, everything seems to work fine due to eager dependency resolution. Adding --minimal-versions has costs: one-time ecosystem transition cost, cost to run CI job for minimal versions, cost to actually update minimal versions. There's anecdotal evidence that wrong minimal versions actually are a problem: https://www.reddit.com/r/rust/comments/8ob598/rust_minimum_versions_semver_is_a_lie/e027mtz/.

  • should we implement "--minimal-versions-for-me-but-not-my-dependencies" as well, to make the initial roll-out of this feature easier?

Stabilization TODO:

  • change -Z minimal-versions to just --minimal-versions and add it alongside --frozen/locked,
  • this will require community-wide effort to make the things work, so a special announcement should be prepared. Announcement should describe the links problem and solution.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the implementation PR #5200 and the unstable minimal-versions documentation, then review issue #5656 on best practices. The unresolved ecosystem and dependency-scope questions must be settled before stabilization; done means completing the listed stabilization TODO, including the flag change, placement beside --frozen/locked, and community announcement.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.