fsprojects / fsprojects/Paket

RFC: Add SemVer mode for paket 6

Open
#3,744 8 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Since we noticed multiple issues with ASP.NET and how packages are release I propose a new group and package flag called semver_level with the following options:

  • major - Resolver will not skip to a higher major version
  • minor - Resolver will not skip to a higher minor version
  • none - Resolver works as in paket 5.

So if the you are using ASP.NET 2.2 using semver_level: major would shield you from resolving asp.net 3.x packages. If your are using ASP.NET 3.0 and don't want to draw ASP.NET 3.1 packages then you could use semver_level: minor.

This flag only applies to transitive dependencies. If you have direct dependency A which dependends on B >= 2.2 then semver_level: major would rewrite it to B >= 2.2 && B < 3.0.

This flag would work together with min and max strategy. Frankly min/max defines the order in which versions are probed while semver_level restricts the version ranges that are found in the nuspecs.

The default would be major. This will be a breaking change, but it would not break restore of exisitng lock files.

Alternative approach

We extend the "strategy" modifier to have 4 values:

  • "min" - uses the minimum matching version. That's how NuGet operates. Available in paket 5.
  • "latest-patch" - takes the latest patch that is available from the minimum version. Does not increase major or minor versions. Probably works best with Microsoft packages. Especially asp.net core.
  • "latest-minor" - takes the latest minor that is available from the minimum version. Does not increase major versions.
  • "max" - uses the maximum matching version. Default in paket 5.

Contributor guide

No contributing guide indexed for this repository

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 reviewing Paket 5's existing min and max strategy behavior and the resolver rules described in the issue. Define how semver_level or the alternative strategy values constrain transitive dependency ranges, preserve existing lock-file restores, and interact with direct dependencies; the work is done when the chosen behavior is specified and implemented with coverage for the ASP.NET version examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.