-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
vimPluginsUpdater: rewrite to use nupd #380691
base: master
Are you sure you want to change the base?
Conversation
Now update of all plugins is faster than my git status! Also, please don't merge any new plugins until this is merged |
51984bc
to
1287ee2
Compare
1287ee2
to
3dffe72
Compare
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"' |
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.
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
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.
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
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.
Hmm... alright :S Not a fun regression, but we rarely do individual updates anyways, I suppose.
Do you plan to leave a single commit for this ? |
_default_input_file: Path = field(init=False, default=ROOT / "input.csv") | ||
_default_output_file: Path = field(init=False, default=ROOT / "output.json") |
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.
Can we use better names than input/output
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.
Changed to generated-input.csv
and generated.json
This comment was marked as outdated.
This comment was marked as outdated.
fe7934a
to
f7d2070
Compare
No new regressions so far
|
One thing that really bothered us about the previous updater was inability to pin plugins to releases. Does this allow pinning packages to use release tags? (Completely understand if that was out of scope on initial rewrite, just hoping) |
This was out of scope, but it is simple enought to implement later |
|
What are all the failures from ? First one I checked doesn't fail on master. I'm seeing hash mismatches on a couple so far in a nixpkgs review. |
|
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.
Not reformatting the entire docs will make this PR reviewable.
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 moved formatting changes to a separate commit, hope this will make it reviewable
""" | ||
) | ||
@define | ||
class MyImpl(ABCBase[MyEntry, MyEntryInfo]): |
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.
class MyImpl(ABCBase[MyEntry, MyEntryInfo]): | |
class Impl(ABCBase[Entry, EntryInfo]): |
Otherwise the code reads like it got straight copied from the example in the docs.
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.
Changed to VimImpl
, VimEntry
, VimEntryInfo
(the same prefix that was used before)
d866356
to
2a806d4
Compare
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 am quite unfamiliar with the paradigm you chose for the update.py
python script.
I would need to read more to really understand how it works.
If another reviewer is more technically able than me on this technology and wishes to review this PR, please go on :)
"# GENERATED by ./pkgs/applications/editors/vim/plugins/update.py. Do not edit!" | ||
) | ||
@classmethod | ||
def parse(cls, inp: str) -> t.Self: |
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.
What is inp
suppose to stand for?
Maybe I am missing something obvious.
In any case, I feel like a more explicit variable name would be better.
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.
This function parses a GitHub URL to a GitHub repo object
It gets called e.g. on values from generated-input.csv or if user provided some plugins to update
The context of this function is very informative, if you look directly at file, not at diff
class GHRepoInfo:
@classmethod # classmethods usually initialize a class in which they live
def parse(cls, inp: str) -> t.Self:
# | | |
# | | └- returns an instance of self
# | └- an input == anything that will be parsed
# └- parse something, e.g. gh URL to the object
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.
Thanks for the clarification. Indeed it is very fine.
My only comment was about the name of the inp
variable. I was not able to tell that it means "input".
Please, just rename it to input
.
The rest is perfectly clear and straightforward.
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.
Would be helpful to include docstrings throughout.
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.
Would be helpful to include docstrings throughout.
I am not sure how to write it to not be
def do_x_thing():
"""Does X thing."""
Yeah, I will need to write docs for nupd eventually |
On masterGenerated using Command:
|
On masterGenerated using Command:
|
The upstream was deprecated for two years and then removed. Consider using Lualine
2a806d4
to
b285086
Compare
On this PRGenerated using Command:
|
3998f46
to
1b64abc
Compare
The new updater doesn't do this automatically, but it is still has to be done after nvim-treesitter update
1b64abc
to
d2622ad
Compare
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.