pkl icon indicating copy to clipboard operation
pkl copied to clipboard

"latest" packages

Open bioball opened this issue 10 months ago • 1 comments

Provide a way to use the "latest" version of a package, where, the version is queried during eval.

Imagined syntax:

import "package://example.com/foo@1.+#/myModule.pkl"

Or, when as a dependency:

amends "pkl:Project"

dependencies {
  ["foo"] { uri = "package://example.com/foo@1.+" }
}

Some thoughts:

  1. Projects with "latest" dependencies should be prevented from being published as packages
  2. The "latest" should only be applied to the minor version or below, because the major version is part of the package identifier.

This requires a package index that can be queried.

bioball avatar Feb 21 '25 01:02 bioball

Simar issue: https://github.com/apple/pkl/issues/278

Because I guess such dependencies shouldn't be in cache since they can be updated at any time... 🤔

Another which might be related: #313

Not sure exactly 🤷‍♂️ but all of those somehow match together and might take into account when implementing this.

StefMa avatar Feb 21 '25 06:02 StefMa