Keep fetcher tag metadata when reading current plugin state from Nix.
The updater needs to know whether a plugin was fetched by tag or by commit.
Without carrying src.tag through, tagged sources are read back as if rev were
always the canonical source identifier, which breaks tag-aware comparisons and
cache behavior later in the update flow.
We have machinery for Python packaging, so let’s make use of
it. This also helps unblock moving `by-name` overrides out of
`all-packages.nix`, as it was previously being used to work around
`nixpkgs-vet` forbidding the direct reference to the path.
I fixed many hidden bugs and made some small improvements. The main
reason this was separated from #336137 is to fix the sorting issue.
Before this commit, sorting for Vim plugins was broken and worked by
what was fetched first. This is because the sorting was done by empty
strings (the default value in CSV is not None but an empty string). This
PR fixes it and also moves sorting from the user to the library (from
`vim/plugins/update.py` to `pluginupdate.py`) to prevent such weird
issues and duplication of code.
* update.py: introduce subparsers for plugin updaters
This is preliminary work to help create more powerful plugin updaters.
Namely I would like to be able to "just add" plugins without refreshing
the older ones (helpful when github temporarily removes a user from
github due to automated bot detection).
Also concerning the lua updater, we pin some of the dependencies, and I
would like to be able to unpin the package without editing the csv
(coming in later PRs).
* doc/updaters: update command to update editor plugins
including vim, kakoune and lua packages
Co-authored-by: figsoda
I tried to run this and it failed. These changes made it work again.
I looked at maintainers/scripts/pluginupdate.py and how the types
differed to make this fix.