andir / npins

Nix dependency pinning. Very similar to Niv but has a few features that I personally wanted.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: if `--branch` is used, give all tags or at least the latest tag in the repository

hab25 opened this issue · comments

Use case: I'd rather follow the latest tag of https://github.com/nix-community/nixGL rather than the main branch, but it doesn't currently use tags. However, it could start using tags in the future. I'd like to be notified, at update time, if this has happened1.

To do this, I'd like to do something like assert (import ./npins).nixGL.tags == []; ....

I.e., the above assert should pass, even if nixGL has been added via npins add git https://github.com/nix-community/nixGL --branch main, iff the nixGL repository has no git tags.

Footnotes

  1. While I could, to be notified even earlier than update time, instead RSS-subscribe to https://github.com/nix-community/nixGL/tags.atom, this would be a fragile coupling because this RSS-feed feature is not part of git; GitHub is proprietary and could decide to break it once they start thinking that keeping the feature around wouldn't be profitable enough.

Would GitHub's "watch new releases" be an option for you?

Would GitHub's "watch new releases" be an option for you?

It is an option, but a fragile one, like the RSS method described in the footnote. It is also GitHub specific. I.e., it is not an open widely-used standard with open source implementation(s).

It suffers from the same fundamental problem:

GitHub is proprietary and could decide to break it once they start thinking that keeping the feature around wouldn't be profitable enough.