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

Pin our own npins #85

Closed piegamesde closed 2 weeks ago

piegamesde commented 1 month ago

Currently the dev shell does not provide an npins, leaving users to use a globally installed one. This causes issues when developing new features, where the sources.json may require a newer version than the user has installed. In that case, cargo run -- must be used instead. Another issue is that the npins/default.nix is both used as the ground truth for the application as well as for dogfooding. In the end, I see the following options:

Personally, I prefer the last option.

andir commented 1 month ago

The 2nd or 3d option sounds best. The 2nd might be the best for dogfooding. The 3rd option has the problem of migrating. If you are changing something (e.g. new version of the JSON file) you'll have to update the pinned npins version while proposing the changes... So we bit of a chicken-and-egg problem.

piegamesde commented 1 month ago

I don't think that's a problem in the 3rd option, because npins itself is not required to use the pins. So one can update npins in the dev shell first and then upgrade the pins.json.

andir commented 1 month ago

Then we'd at least need some CI check that the pinned version doesn't require a newer / older version of the manifest.