Skip to content
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

Luarocks pyupdater followup #133296

Merged
merged 2 commits into from
Aug 12, 2021
Merged

Conversation

teto
Copy link
Member

@teto teto commented Aug 9, 2021

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

teto and others added 2 commits August 12, 2021 01:14
Cleans up the common interface between the updaters.
Restores the ability to regen the lua packages in parallel.
@teto teto marked this pull request as ready for review August 11, 2021 23:17
@teto teto requested a review from jonringer as a code owner August 11, 2021 23:17
@teto teto force-pushed the luarocks-pyupdater-followup branch from 633cce8 to 5e4ece6 Compare August 11, 2021 23:18
@teto
Copy link
Member Author

teto commented Aug 11, 2021

I've checked all updaters keep working. The lua updater is much much faster with python multiprocessing (the old bash script relied on parallel but it never worked for me). The luarocks update doesn't rewrite_input as vim does but I hope it can some day.

@teto teto merged commit 4de3338 into NixOS:master Aug 12, 2021
@lovesegfault
Copy link
Member

This broke the script for me:

❯ ./maintainers/scripts/update-luarocks-packages 
Traceback (most recent call last):
  File "/home/bemeurer/src/nixpkgs/./maintainers/scripts/update-luarocks-packages", line 193, in <module>
    main()
  File "/home/bemeurer/src/nixpkgs/./maintainers/scripts/update-luarocks-packages", line 188, in main
    update_plugins(editor, args)
  File "/home/bemeurer/src/nixpkgs/maintainers/scripts/pluginupdate.py", line 553, in update_plugins
    update = editor.get_update(args.input_file, args.outfile, args.proc)
  File "/home/bemeurer/src/nixpkgs/./maintainers/scripts/update-luarocks-packages", line 113, in get_update
    cache: Cache = Cache(self.cache_file)
TypeError: __init__() missing 1 required positional argument: 'cache_file_name'

If I revert this change it works again (git revert -m 1 4de33380ef1)

@teto
Copy link
Member Author

teto commented Aug 12, 2021

arf thanks for catching it #133685

@figsoda
Copy link
Member

figsoda commented Aug 13, 2021

pretty sure this broke pkgs/misc/vim-plugins/update.py for me

❯ GITHUB_API_TOKEN=~/gh ./update.py --add allendang/nvim-expand-expr@main
warning: unknown setting 'experimental-features'
847 plugins were checked
updated /home/figsoda/.nixpkgs/pkgs/misc/vim-plugins/generated.nix
committing to nixpkgs "vimPlugins: update"
848 plugins were checked
updated /home/figsoda/.nixpkgs/pkgs/misc/vim-plugins/generated.nix
Traceback (most recent call last):
  File "/home/figsoda/.nixpkgs/pkgs/misc/vim-plugins/./update.py", line 94, in <module>
    main()
  File "/home/figsoda/.nixpkgs/pkgs/misc/vim-plugins/./update.py", line 90, in main
    pluginupdate.update_plugins(editor, args)
  File "/home/figsoda/.nixpkgs/maintainers/scripts/pluginupdate.py", line 575, in update_plugins
    plugin = fetch_plugin_from_pluginline(plugin_line)
  File "/home/figsoda/.nixpkgs/maintainers/scripts/pluginupdate.py", line 350, in fetch_plugin_from_pluginline
    plugin, _ = prefetch_plugin(*parse_plugin_line(plugin_line))
TypeError: pluginupdate.prefetch_plugin() argument after * must be an iterable, not PluginDesc

@teto
Copy link
Member Author

teto commented Aug 13, 2021

Indeed, I had not tested --add, here #133832 is a fix (hopefully)

@figsoda
Copy link
Member

figsoda commented Aug 13, 2021

I think there is still a regression that inserts a bunch of spaces in the generated file

#133844

No worries, its fixed now

@teto
Copy link
Member Author

teto commented Aug 14, 2021

thanks for taking care of this.

@teto teto deleted the luarocks-pyupdater-followup branch September 5, 2021 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants