-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pluginupdate.py: fix bugs and add improvements; vimPlugins: sort properly #353786
Conversation
08a39df
to
a58e7d3
Compare
a58e7d3
to
cb15b92
Compare
Thank you for this ! |
Ruff - an extremely fast Python linter and code formatter, written in Rust.
I fixed many hidden bugs and made some small improvements. The main reason this was separated from NixOS#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.
cb15b92
to
e9b1d2d
Compare
sys.path.insert( | ||
0, os.path.join(ROOT.parent.parent.parent.parent.parent, "maintainers", "scripts") | ||
) | ||
import pluginupdate | ||
|
||
GET_PLUGINS = f"""(with import <localpkgs> {{}}; | ||
GET_PLUGINS = f"""( | ||
with import <localpkgs> {{ }}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also manually formatted this with nixfmt-rfc-style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for splitting out the PR, it has been much easier to review it.
Also, this is a very useful work, good job :)
@@ -50,7 +50,7 @@ | |||
lib.filterAttrs (n: v: v != null) checksums | |||
)""" | |||
|
|||
HEADER = "# This file has been generated by ./pkgs/applications/editors/kakoune/plugins/update.py. Do not edit!" | |||
HEADER = "# This file has been @generated by ./pkgs/applications/editors/kakoune/plugins/update.py. Do not edit!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this @
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saw that the same does poetry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, fine by me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! Good job :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks for tackling this
|
ran it locally. Seemed ok. |
thanks for the work. Now onto single plugin updates :p |
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
topluginupdate.py
) to prevent such weird issues and duplication of code.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)CC @NixOS/neovim
Add a 👍 reaction to pull requests you find important.