Skip to content

Add a canonical way to install the latest version of a package from a major release timeline #555

@ssg

Description

@ssg

Many packages support two or more release timelines. For example, a package might have both 3.x and 2.x maintained at the same time: 3.x with the newest features, and 2.x as the maintained legacy release.

Currently, I don't see a canonical way to install the latest version from 2.x timeline mostly because -MaximumVersion parameter is inclusive, so I can't use -MaximumVersion 3.0.0 to install the latest 2.x package. Wildcards don't seem to be supported either, so I can't use -RequiredVersion 2.* either.

The only workaround seems to be to pick a very large number for 2.x and use it with -MaximumVersion like -MaximumVersion 2.999.999. That isn't quite coherent or easy to understand. The intent is vague. It unnecessarily gives meaning to some arbitrary number that has no meaning.

I propose one of these two approaches:

  • An exclusive MaximumVersion variant (e.g. -MaximumVersionExcluding 3.0.0)
  • or an entirely new -LatestVersion parameter that supports wildcards (e.g. -LatestVersion 2.*)

I'm not sure if this needs provider support, or can be implemented purely on the client-side. Obviously, it's not worth to create a new provider interface just for this. But, if it ever gets redesigned, please consider exclusive ranges the next time. If it can be implemented on the client-side, I think it would still improve the usability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions