Skip to content

vimPluginsUpdater: rewrite to use nupd - #380691

Draft
PerchunPak wants to merge 3 commits into
NixOS:masterfrom
PerchunPak:vim-updater-nupd
Draft

PerchunPak wants to merge 3 commits into
NixOS:masterfrom
PerchunPak:vim-updater-nupd

Conversation

@PerchunPak

@PerchunPak PerchunPak commented Feb 9, 2025 •

Copy link
Copy Markdown
Member

This rewrites the Vim plugins updater to use nixpkgs-updaters-library

Command to run: nix-build -A vimPluginsUpdater && ./result/bin/vim-plugins-updater --help
The script without diff

Old implementation problems

The nixpkgs-plugin-update is used for sharing some updater logic between the Vim plugins updater, Luarocks updater, and Kakoune plugins updater. It was designed as a simple 100-line script: load a CSV table, fetch the last commit and its hash, and write it to generated.nix. But as time passed, the number of Vim plugins in nixpkgs grew into the thousands. As a result, the script is extremely slow, and the spaghetti mess makes adding any new features practically impossible.

Thus, someone improved it, added parallelization, and some other features, probably. As a result, we now have Frankenstein. To avoid the same thing, the library is designed with extensibility in mind and learns from mistakes made in nixpkgs-plugin-update.

Here is a list of some major issues with nixpkgs-plugin-update. It is impossible to fix them without a complete rewrite.

Feature comparison

We get:

  • Much faster execution time - without cache, it takes only 3 minutes (compared to the old script that executed in ~1h or more). With a warm cache, it is 15 seconds.
  • Much much much better UX and DX (just run the --help command and see what I am talking about)
  • Support for metadata. Now there is also a description, link to homepage, license, and properly formatted version ({tag}-unstable-{date})
  • Infinite room for easier implementation of new features - the old script is impossible to modify without breaking something and losing all hair.
  • (in the next PR) fetching latest git tags instead of commit! This was almost impossible to implement before, but it is now already implemented in fetchers/github: add github release and tag support PerchunPak/nixpkgs-updaters-library#2 (thanks @khaneliman!). I just need to put a few function calls to enable it for Vim plugins, but I would prefer to do this in a separate PR.
  • In the future, we may automatically get new features and bugfixes that I could implement in nupd. For example, fetchers/github: add github release and tag support PerchunPak/nixpkgs-updaters-library#2 or referencing plugin by its id in the update command, which requires zero changes to the script.

We lose:

  • Automatic run of nvim-treesitter grammars updater when nvim-treesitter itself updates. I don't really see this feature as that important, if we can do vim-plugins-updater update && nvim-treesitter-updater update. Alternatively, we can just introduce writeShellScript with the alias.
  • Referencing the plugin by its name. It was possible because nixpkgs-plugin-update's function for parsing the CLI argument had access to the output file. Right now, I do not want to give the current function that access and want to keep it very simple. Added this in vimPlugins.nixpkgs-updaters-library: 3.0.0 -> 3.1.1 #481733
  • Support for non-GitHub plugins in the updater script. There are only 26 non-GitHub Vim plugins in nixpkgs, and adding support for every possible Git hosting platform is too big a maintenance burden. Remember that this rewrite also fetches all metadata for the plugin. It is much easier and better to package those plugins in non-generated and update them using nix-update. It's either we lose metadata info for non-GitHub plugins or just package them manually
  • Auto-commit. Personally, I hate that feature. But I can add a print at the end with git commit commands (committing it from nix devshell sets author to an empty string, so I don't really see the reason to execute it automatically). But what to print when the user updates multiple plugins?
  • An infinite number of sketchy bugs that are hidden everywhere (yes, I do hate nixpkgs-plugin-update).

Design decisions

  • Everything is async: most of the time is spent on doing network requests, this is where asynchronous code thrives.
  • Strict typing allows the best DX. Although it is totally optional for users of nupd

The updater script has to implement only a few classes; the rest is handled by the library.

  • VimEntryInfo: information about a plugin that is read directly from CSV (includes GitHub URL, branch, and alias)
  • VimEntry: already prefetched information (info attribute links back to EntryInfo instance of this plugin, hash, commit, etc)
  • VimMiniEntry: minified information that is stored in the result file. If we don't minify anything, the output file is multiple times larger
  • VimImpl: implements some general methods like get_all_entries

Dividing plugin information to EntryInfo and Entry was inspired by nixpkgs-plugin-update's PluginDesc and Plugin, the rest just logically followed. The classes are named Entry* instead of Plugin* because the library tries to be agnostic to what the user fetches. Entry can be a git repo or even a GNOME plugin.


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions Bot added 6.topic: vim Advanced text editor 8.has: documentation This PR adds or changes documentation labels Feb 9, 2025
@PerchunPak

Copy link
Copy Markdown
Member Author

Now update of all plugins is faster than my git status!

Also, please don't merge any new plugins until this is merged

@PerchunPak

Copy link
Copy Markdown
Member Author

Weird, eval works for me


```
nix-shell -p vimPluginsUpdater --run vim-plugins-updater -i vim-plugin-names -o generated.nix --no-commit
nix-shell -p vimPluginsUpdater --run 'vim-plugins-updater update "https://github.com/folke/lazy.nvim"'

@khaneliman khaneliman Feb 9, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this no longer support by plugin name? Seems more appropriate than having to enter an entire url everytime

ie:
vim-plugins-updater update lazy-nvim

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It uses the same system as add command. I plan to remove https://github.com/ that is required for every plugin in the near future

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... alright :S Not a fun regression, but we rarely do individual updates anyways, I suppose.

@GaetanLepage

Copy link
Copy Markdown
Contributor

Weird, eval works for me

Do you plan to leave a single commit for this ?

@PerchunPak

This comment was marked as outdated.

@PerchunPak
PerchunPak force-pushed the vim-updater-nupd branch 5 times, most recently from fe7934a to f7d2070 Compare February 10, 2025 09:56
@github-actions github-actions Bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Feb 10, 2025

@khaneliman khaneliman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just quick glance things before diving into python.

Comment on lines +7 to +9
# Note that this updater does not support anything but GitHub, because we want
# to support metadata fetching and it is problematic to do automatically for all
# platforms. If you want to package a non-GitHub plugin - place it to non-generated folder

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like for this not not be the case long-term.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a regression when compared with the current update script?

@khaneliman khaneliman Aug 6, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I believe @PerchunPak had a previous PR for pulling out the non github plugins into non-generated in anticipation for this update. #376366 It was only a handful of plugins so we just moved them out, for now. But, for a long-term solution... we should be flexible with the sources, eventually.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@khaneliman khaneliman Aug 6, 2025 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah.. I really wanted to shift towards nix-update... Artturin had started on something Mic92/nix-update#202 to previously help with updating packages not adhering to the standard derivation style.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that losing support for non-GitHub plugins is controversial, but it is a trade-off that is worth making. I added this information to "features we lose" in the PR description, but also duplicated it here

There is only 26 non-GitHub Vim plugins in nixpkgs, and adding support for every possible Git hosting platform is too big a maintenance burden. Remember that this rewrite also fetches all metadata for the plugin. It is much easier and better to package those plugins in non-generated and update it using nix-update. It's either we lose metadata info for non-GitHub plugins or just package them manually

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable. However if that's the direction we want to go in, I'd like to see an effort towards:

  • renaming generated.json to indicate it only relates to GitHub packages
  • updating packaging documentation to cover adding/maintaining non-github packages
  • adding an update-script wrapper that runs all vimPlugins update scripts, including this one

None of these feel like things that need to be done in this PR, especially not the wrapper script.

But this PR could pivot from "TODO no GitHub support for now" to "this script only handles GitHub, other sources should define per-package update scripts".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating packaging documentation to cover adding/maintaining non-github packages

Already done

adding an update-script wrapper that runs all vimPlugins update scripts, including this one

@r-ryantm handles those updates. Also, such a script would probably be avoided as there is a bunch of Rust plugins in non-generated that are costly to build.

But this PR could pivot from "TODO no GitHub support for now" to "this script only handles GitHub, other sources should define per-package update scripts".

Could you send a link where I have that TODO comment? I could not find it

@PerchunPak

Copy link
Copy Markdown
Member Author

Applied some straightforward review suggestions, thanks for the fast reviews!

Will work on slicing this into separate PRs now

@nixpkgs-ci nixpkgs-ci Bot removed the 6.topic: python Python is a high-level, general-purpose programming language. label Aug 6, 2025
@khaneliman

khaneliman commented Aug 6, 2025 •

Copy link
Copy Markdown
Contributor

See homepage missing from a lot of the plugins in generated.json and some have a weird page listed. How is that being fetched? Don't we have that from the master list or is this supposed to be more helpful meta information scrubbed from somewhere?

(Sorry, still haven't reviewed the python, yet... just cursory stuff since it's end of my work day and my eyes are getting tired.)

  "NotebookNavigator-nvim": {
    "description": "A neovim plugin to navigate and execute code cells",
    "homepage": null,
    "info": {
      "alias": null,
      "branch": null,
      "repo": {
        "name": "NotebookNavigator.nvim",
        "owner": "GCBallesteros"
      }
    },
    "license": null,
    "nurl_result": {
      "args": {
        "hash": "sha256-+FLHJ1tfIplXhO/6kajdcDBTIsNYN9kCOR9IdhXL6d4=",
        "owner": "GCBallesteros",
        "repo": "NotebookNavigator.nvim",
        "rev": "20cb6f72939194e32eb3060578b445e5f2e7ae8b"
      },
      "fetcher": "fetchFromGitHub"
    },
    "version": "0-unstable-2024-05-23"
  },
  "NrrwRgn": {
    "description": "A Narrow Region Plugin for vim (like Emacs Narrow Region)",
    "homepage": "http://www.vim.org/scripts/script.php?script_id=3075",
    "info": {
      "alias": null,
      "branch": null,
      "repo": {
        "name": "NrrwRgn",
        "owner": "chrisbra"
      }
    },
    "license": null,
    "nurl_result": {
      "args": {
        "hash": "sha256-ULlstztsQxzDicj1OWexNWwwhcomaUJ4MagK5hb2nFU=",
        "owner": "chrisbra",
        "repo": "NrrwRgn",
        "rev": "e027db9d94f94947153cd7b5ac9abd04371ab2b0"
      },
      "fetcher": "fetchFromGitHub"
    },
    "version": "0-unstable-2022-02-13"
  },

@PerchunPak

PerchunPak commented Aug 6, 2025 •

Copy link
Copy Markdown
Member Author

See homepage missing from a lot of the plugins in generated.json and some have a weird page listed. How is that being fetched? Don't we have that from the master list or is this supposed to be more helpful meta information scrubbed from somewhere?

That is a homepage that is explicitly set on GitHub, not sure if setting it to the repo URL by default makes sense

image

(Sorry, still haven't reviewed the python, yet... just cursory stuff since it's end of my work day and my eyes are getting tired.)

Np, I also just returned from work and got some time to work on this

@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 7, 2025
@PerchunPak

Copy link
Copy Markdown
Member Author

Hey, any suggestions on this PR? Blockers?

@PerchunPak

Copy link
Copy Markdown
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 380691
Commit: 3f07e8bc35874c00635a17515a82b45f47ef6283


x86_64-linux

✅ 21 packages built:
  • lua51Packages.fzf-lua
  • lua51Packages.grug-far-nvim
  • luaPackages.fzf-lua (lua52Packages.fzf-lua)
  • luaPackages.grug-far-nvim (lua52Packages.grug-far-nvim)
  • lua53Packages.fzf-lua
  • lua53Packages.grug-far-nvim
  • lua54Packages.fzf-lua
  • lua54Packages.grug-far-nvim
  • luajitPackages.fzf-lua
  • luajitPackages.grug-far-nvim
  • nixpkgs-manual
  • tests.vim.test_vim_with_vim_nix
  • tests.vim.test_vim_with_vim_nix_using_plug
  • vimPlugins.avante-nvim
  • vimPlugins.corePlugins
  • vimPlugins.fzf-lua
  • vimPlugins.grug-far-nvim
  • vimPlugins.vectorcode-nvim
  • vimPlugins.vim2nix
  • vimPluginsUpdater
  • vimacs

aarch64-linux

✅ 20 packages built:
  • lua51Packages.fzf-lua
  • lua51Packages.grug-far-nvim
  • luaPackages.fzf-lua (lua52Packages.fzf-lua)
  • luaPackages.grug-far-nvim (lua52Packages.grug-far-nvim)
  • lua53Packages.fzf-lua
  • lua53Packages.grug-far-nvim
  • lua54Packages.fzf-lua
  • lua54Packages.grug-far-nvim
  • luajitPackages.fzf-lua
  • luajitPackages.grug-far-nvim
  • nixpkgs-manual
  • tests.vim.test_vim_with_vim_nix
  • tests.vim.test_vim_with_vim_nix_using_plug
  • vimPlugins.avante-nvim
  • vimPlugins.corePlugins
  • vimPlugins.fzf-lua
  • vimPlugins.grug-far-nvim
  • vimPlugins.vim2nix
  • vimPluginsUpdater
  • vimacs

x86_64-darwin

⏩ 1 package marked as broken and skipped:
  • vimacs
✅ 20 packages built:
  • lua51Packages.fzf-lua
  • lua51Packages.grug-far-nvim
  • luaPackages.fzf-lua (lua52Packages.fzf-lua)
  • luaPackages.grug-far-nvim (lua52Packages.grug-far-nvim)
  • lua53Packages.fzf-lua
  • lua53Packages.grug-far-nvim
  • lua54Packages.fzf-lua
  • lua54Packages.grug-far-nvim
  • luajitPackages.fzf-lua
  • luajitPackages.grug-far-nvim
  • nixpkgs-manual
  • tests.vim.test_vim_with_vim_nix
  • tests.vim.test_vim_with_vim_nix_using_plug
  • vimPlugins.avante-nvim
  • vimPlugins.corePlugins
  • vimPlugins.fzf-lua
  • vimPlugins.grug-far-nvim
  • vimPlugins.vectorcode-nvim
  • vimPlugins.vim2nix
  • vimPluginsUpdater

aarch64-darwin

⏩ 1 package marked as broken and skipped:
  • vimacs
✅ 20 packages built:
  • lua51Packages.fzf-lua
  • lua51Packages.grug-far-nvim
  • luaPackages.fzf-lua (lua52Packages.fzf-lua)
  • luaPackages.grug-far-nvim (lua52Packages.grug-far-nvim)
  • lua53Packages.fzf-lua
  • lua53Packages.grug-far-nvim
  • lua54Packages.fzf-lua
  • lua54Packages.grug-far-nvim
  • luajitPackages.fzf-lua
  • luajitPackages.grug-far-nvim
  • nixpkgs-manual
  • tests.vim.test_vim_with_vim_nix
  • tests.vim.test_vim_with_vim_nix_using_plug
  • vimPlugins.avante-nvim
  • vimPlugins.corePlugins
  • vimPlugins.fzf-lua
  • vimPlugins.grug-far-nvim
  • vimPlugins.vectorcode-nvim
  • vimPlugins.vim2nix
  • vimPluginsUpdater

@PerchunPak

Copy link
Copy Markdown
Member Author

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 380691 --package vimPlugins
Commit: 2464180383be7378ee02989d4a52caa2b9dc7f26


x86_64-linux

✅ 2187 packages built:
  • vimPlugins.BetterLua-vim
  • vimPlugins.BufOnly-vim
  • vimPlugins.ChatGPT-nvim

aarch64-linux

✅ 2184 packages built:
  • vimPlugins.BetterLua-vim
  • vimPlugins.BufOnly-vim
  • vimPlugins.ChatGPT-nvim

x86_64-darwin

✅ 2184 packages built:
  • vimPlugins.BetterLua-vim
  • vimPlugins.BufOnly-vim
  • vimPlugins.ChatGPT-nvim

aarch64-darwin

✅ 2185 packages built:
  • vimPlugins.BetterLua-vim
  • vimPlugins.BufOnly-vim
  • vimPlugins.ChatGPT-nvim

@pyrox0

pyrox0 commented Nov 13, 2025

Copy link
Copy Markdown
Member

See homepage missing from a lot of the plugins in generated.json and some have a weird page listed. How is that being fetched? Don't we have that from the master list or is this supposed to be more helpful meta information scrubbed from somewhere?

That is a homepage that is explicitly set on GitHub, not sure if setting it to the repo URL by default makes sense
image

(Sorry, still haven't reviewed the python, yet... just cursory stuff since it's end of my work day and my eyes are getting tired.)

Np, I also just returned from work and got some time to work on this

Many other packages set the homepage to the source repo if there's no official website, so I think using the repo URL if no homepage is provided would be fine.

@PerchunPak

Copy link
Copy Markdown
Member Author

Many other packages set the homepage to the source repo if there's no official website, so I think using the repo URL if no homepage is provided would be fine.

Done!

@PerchunPak

Copy link
Copy Markdown
Member Author

Hello everyone,

I just cleaned up the description; it now lists clearer pros and cons. Also, I implemented updating plugins by their ID (vim-plugins-updater update lazy-nvim instead of vim-plugins-updater update 'https://github.com/folke/lazy.nvim/') as @khaneliman requested

And if you think the PR is massive, do note that without replacing auto-generated files, it is +295 -243 lines

@khaneliman

khaneliman commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor

We get:

Much faster execution time - updating all plugins takes less than my git status (at that moment). Without cache, it takes only 4 minutes (compared to the old script that executed in ~1h or more). With a warm cache, it is 10 seconds.

I run it very often and it never takes that long, but optimizations are appreciated. Don't think it requires an out of tree solution for that.

Much much much better UX and DX (just run the --help command and see what I am talking about)

I did like the cli interface and progress last time I remember running this version.

Support for metadata. Now there is also a description, link to homepage, license, and properly formatted version ({tag}-unstable-{date})

Extra metadata is always nice. But, I felt like the desire for a few extra pieces of information from github made decisions to do shortcuts (ie cut other providers instead of just deal with missing information on some plugins)

Infinite room for easier implementation of new features - the old script is impossible to modify without breaking something and losing all hair.

This doesn't ring true to me when it's an out of tree solution that is depended on, imo. I've already been playing around recently with updating/fixing the existing script and doing it in smaller reviewable chunks.

(in the next PR) fetching latest git tags instead of commit! This was almost impossible to implement before, but it is now already implemented in https://github.com/PerchunPak/nixpkgs-updaters-library/pull/2 (thanks @khaneliman!). I just need to put a few function calls to enable it for Vim plugins, but I would prefer to do this in a separate PR.

This is something I still would like to address too. I feel like one of the biggest misses is not respecting plugins that use releases/versioning to signal they are ready for distribution.

In the future, we may automatically get new features and bugfixes that I could implement in nupd. For example, https://github.com/PerchunPak/nixpkgs-updaters-library/pull/2 or https://github.com/NixOS/nixpkgs/pull/481733 which requires zero changes to the script.

This is actually a worry for me and not seen as a positive. In tree will be more susceptible to surprising changes from a dependency instead of being in control of itself entirely.

We lose:

Automatic run of nvim-treesitter grammars updater when nvim-treesitter itself updates. I don't really see this feature as that important, if we can do vim-plugins-updater update && nvim-treesitter-updater update. Alternatively, we can just introduce writeShellScript with the alias.

This still seems like a quick fix and doesn't need to be lost.

Referencing the plugin by its name. It was possible because nixpkgs-plugin-update's function for parsing the CLI argument had access to the output file. Right now, I do not want to give the current function that access and want to keep it very simple. Added this in https://github.com/NixOS/nixpkgs/pull/481733

Thank you for adding that, i much prefer using the name instead of remember where a plugin came from (since it shouldn't matter to the caller of the script)

Support for non-GitHub plugins in the updater script. There are only 26 non-GitHub Vim plugins in nixpkgs, and adding support for every possible Git hosting platform is too big a maintenance burden. Remember that this rewrite also fetches all metadata for the plugin. It is much easier and better to package those plugins in non-generated and update them using nix-update. It's either we lose metadata info for non-GitHub plugins or just package them manually

I view this is a thing we should probably revert, and address the limitation of, in any proposed updater. At the time, I just wanted to not make you feel like you were wasting time and keep things merging to keep morale up. But, over time it feels like it goes against the entire purpose of the non-generated folder structure. It should be reserved for plugins that require real builds that should have cached artifacts or need manual version pinning behavior that the updater can't handle. Preferably, we would just have an updater that properly supports versioning and we can move them back into the set (like we do for luaPackages).

Auto-commit. Personally, I hate that feature. But I can add a print at the end with git commit commands (committing it from nix devshell sets author to an empty string, so I don't really see the reason to execute it automatically). But what to print when the user updates multiple plugins?

Auto committing is very convenient and not sure why you would hate that... when I run all my various ecosystem updaters in nixpkgs I want it all committed with proper commit conventions and descriptions, ready to push.

An infinite number of sketchy bugs that are hidden everywhere (yes, I do hate nixpkgs-plugin-update).

For something I run very often for adding, updating single and batch plugins for both vimPlugins and luaPackages... I don't think there's anything crazy hiding in the small amount of python we have. From the refactoring branch I have, there's mostly just dead code / redundant stuff that can be simplified.

I echo #481439 (comment) in that it doesn't feel like a clear "win" to migrate to an out of tree source controlled by a single person. That's been one of my biggest mental hurdles to this when the other, simpler, option of just bringing the changes in tree, from the library that started as "easier to develop out of tree".

@GaetanLepage

Copy link
Copy Markdown
Contributor

We get:

Much faster execution time - updating all plugins takes less than my git status (at that moment). Without cache, it takes only 4 minutes (compared to the old script that executed in ~1h or more). With a warm cache, it is 10 seconds.

I run it very often and it never takes that long, but optimizations are appreciated. Don't think it requires an out of tree solution for that.

Much much much better UX and DX (just run the --help command and see what I am talking about)

I did like the cli interface and progress last time I remember running this version.

Support for metadata. Now there is also a description, link to homepage, license, and properly formatted version ({tag}-unstable-{date})

Extra metadata is always nice. But, I felt like the desire for a few extra pieces of information from github made decisions to do shortcuts (ie cut other providers instead of just deal with missing information on some plugins)

Infinite room for easier implementation of new features - the old script is impossible to modify without breaking something and losing all hair.

This doesn't ring true to me when it's an out of tree solution that is depended on, imo. I've already been playing around recently without updating/fixing the existing script and doing it in smaller reviewable chunks.

(in the next PR) fetching latest git tags instead of commit! This was almost impossible to implement before, but it is now already implemented in https://github.com/PerchunPak/nixpkgs-updaters-library/pull/2 (thanks @khaneliman!). I just need to put a few function calls to enable it for Vim plugins, but I would prefer to do this in a separate PR.

This is something I still would like to address too. I feel like one of the biggest misses is not respecting plugins that use releases/versioning to signal they are ready for distribution.

In the future, we may automatically get new features and bugfixes that I could implement in nupd. For example, https://github.com/PerchunPak/nixpkgs-updaters-library/pull/2 or https://github.com/NixOS/nixpkgs/pull/481733 which requires zero changes to the script.

This is actually a worry for me and not seen as a positive. In tree will be more susceptible to surprising changes from a dependency instead of being in control of itself entirely.

We lose:

Automatic run of nvim-treesitter grammars updater when nvim-treesitter itself updates. I don't really see this feature as that important, if we can do vim-plugins-updater update && nvim-treesitter-updater update. Alternatively, we can just introduce writeShellScript with the alias.

This still seems like a quick fix and doesn't need to be lost.

Referencing the plugin by its name. It was possible because nixpkgs-plugin-update's function for parsing the CLI argument had access to the output file. Right now, I do not want to give the current function that access and want to keep it very simple. Added this in https://github.com/NixOS/nixpkgs/pull/481733

Thank you for adding that, i much prefer using the name instead of remember where a plugin came from (since it shouldn't matter to the caller of the script)

Support for non-GitHub plugins in the updater script. There are only 26 non-GitHub Vim plugins in nixpkgs, and adding support for every possible Git hosting platform is too big a maintenance burden. Remember that this rewrite also fetches all metadata for the plugin. It is much easier and better to package those plugins in non-generated and update them using nix-update. It's either we lose metadata info for non-GitHub plugins or just package them manually

I view this is a thing we should probably revert, and address the limitation of, in any proposed updater. At the time, I just wanted to not make you feel like you were wasting time and keep things merging to keep morale up. But, over time it feels like it goes against the entire purpose of the non-generated folder structure. It should be reserved for plugins that require real builds that should have cached artifacts or need manual version pinning behavior that the updater can't handle. Preferably, we would just have an updater that properly supports versioning and we can move them back into the set (like we do for luaPackages).

Auto-commit. Personally, I hate that feature. But I can add a print at the end with git commit commands (committing it from nix devshell sets author to an empty string, so I don't really see the reason to execute it automatically). But what to print when the user updates multiple plugins?

Auto committing is very convenient and not sure why you would hate that... when I run all my various ecosystem updaters in nixpkgs I want it all committed with proper commit conventions and descriptions, ready to push.

An infinite number of sketchy bugs that are hidden everywhere (yes, I do hate nixpkgs-plugin-update).

For something I run very often for adding, updating single and batch plugins for both vimPlugins and luaPackages... I don't think there's anything crazy hiding in the small amount of python we have. From the refactoring branch I have, there's mostly just dead code / redundant stuff that can be simplified.

I echo #481439 (comment) in that it doesn't feel like a clear "win" to migrate to an out of tree source controlled by a single person. That's been one of my biggest mental hurdles to this when the other, simpler, option of just bringing the changes in tree, from the library that started as "easier to develop out of tree".

I agree with @khaneliman comments. Starting to rely on an external library maintained by a single person looks like switching to a far less robust solution.
Thank you for putting a lot of energy into this @PerchunPak, but I think that there might be a better way.

@mdaniels5757

Copy link
Copy Markdown
Member

Note: the Eval/compare failure is due to the same issue as #481734 (comment).

It will stick around until all merge conflicts are resolved. Once the conflicts are resolved, the job should succeed without further changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: vim Advanced text editor 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

Status: 👀 To Review

Development

Successfully merging this pull request may close these issues.