andir / npins

Nix dependency pinning. Very similar to Niv but has a few features that I personally wanted.
European Union Public License 1.2
164 stars 12 forks source link

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

Open hab25 opened 6 months ago

hab25 commented 6 months ago

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 happened[^1].

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.

[^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.

piegamesde commented 6 months ago

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

hab25 commented 6 months ago

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.