mirror of
https://github.com/apple/pkl.git
synced 2026-01-13 15:13:38 +01:00
[Feature] Support badges of latest version on your package server (pkg.pkl-lang.org)
#113
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @StefMa on GitHub (Mar 13, 2024).
I want to add a badge to my README file that shows the latest version that consumers can use.
Similar to other badges supported by https://shields.io
I guess a Pkl server requires to send the latest version if requested with
latestor something so shields.io (or others) can use that API to display the latest version.Its a bit related/similar to https://github.com/apple/pkl/issues/278 or better to this comment.
If you support using e.g.
package://pkg.pkl-lang.org/github.com/stefma/pkl-gha/com.github.action@latestand this would redirect to the latest version (0.0.1 🤷), then it would be possible to implement... I guess 😁Also not sure if this issue should be better placed at https://github.com/apple/pkl-lang.org 🤷
Feel free to move it.
@StefMa commented on GitHub (Mar 13, 2024):
For now, we can use the GitHub releases badge (https://shields.io/badges/git-hub-release) as the pkl package server supports only that.

But that is obiosuly not perfect as maybe in the future the pkl package server supports multiple different sources for packages.
@holzensp commented on GitHub (Mar 13, 2024):
I think this is a reasonable ask. I think this will mostly depend on how we support the
latestconcept in Pkl itself. We could roll something quickly forpkg.pkl-lang.org, but if we later find out subtle incompatibilities withlatestin Pkl itself, it'll be regrettable.That said, we can start having a discussion. Are you only interested in
latest, or in<major>.latestas well? Why (not)?@StefMa commented on GitHub (Mar 13, 2024):
In terms of this feature just
latestwould be required.Mostly, these badges are used to displaying the "really latest" version.
Independent from the
majorversion.I'm not sure if
<major>.latestmake sense to have. 🤔The only use case would I found would be to avoid breaking changes.
Like "I want to have the latest version of version 1, regardless of the minor and patch, but don't want to upgrade to version 2 yet".
But for this case, I would rather support this "internally" on a pkl server than make it public.
What I mean is that it could be possible to request a package like
package://[yadayada]/packageName#1(1 instead of a semver version).The package server will then resolve this internally to the "latest semver version of version 1".
So.. No, I think we don't need
<major>.latest... 🤔