Skip to content

Support a "latest - 1" dependency version constraint #889

Open

Description

@ianpittwood

Add a way for dependency version constraints to select the minor version before the latest, so that when Python 3.15 is released, a generated version resolves Python 3.14 as its dependency.

Today a constraint can use latest: true, count, min and max (see posit-bakery/posit_bakery/config/dependencies/version.py). There is no way to say "one minor release behind current". Products that lag a new language release until it is validated have to pin max by hand and update it each time.

Proposed behavior:

  • A new constraint option (for example latest: -1, or an offset/behind field) selects the minor version N releases before the latest minor, using the latest patch of that minor.
  • Applies to all version-resolving dependencies (Python, R, Quarto).
  • Validation: reject combinations that conflict with latest/max, and fail clearly if fewer than N+1 minor versions exist.
  • Unit tests covering the example above, and docs for the new field.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dockerRelated to container images we produce

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions