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

enable structuredAttrs for vimPlugins #336042

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

teto
Copy link
Member

@teto teto commented Aug 20, 2024

  • buildVimPlugin: deprecate addRtp
  • buildVimPlugin: enable structuredAttrs

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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.

Add a 👍 reaction to pull requests you find important.

@teto
Copy link
Member Author

teto commented Aug 20, 2024

Should probably target staging

4 packages failed to build:
vimPlugins.hardhat-nvim vimPlugins.idris2-nvim vimPlugins.nvim-dap-ui vimPlugins.sg-nvim

1526 packages built:

@teto teto marked this pull request as draft August 22, 2024 10:41
@teto teto changed the base branch from master to staging August 22, 2024 10:41
@teto teto marked this pull request as ready for review August 22, 2024 10:42
@PerchunPak
Copy link
Member

PerchunPak commented Aug 23, 2024

Build logs for failed builds:
https://gist.github.com/PerchunPak/e30576af1044a7639f0d38de0b18735e

Only sg-nvim fails on master (ab682c4) - #332957 (no fix PR yet)

Copy link
Member

@PerchunPak PerchunPak left a comment

Choose a reason for hiding this comment

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

Honestly, I don't know the reason behind those failures, but this should not be merged until this is resolved. We test only a small portion of plugins, which is why I suspect there are even more hidden breakages.

overrideAttrs = f: addRtp (drv.overrideAttrs f);
};
{
addRtp = drv: lib.warn "`addRtp` is deprecated, does nothing." drv;
Copy link
Member

Choose a reason for hiding this comment

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

Why not keep the migration help?

Copy link
Member Author

Choose a reason for hiding this comment

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

no one is using addRtp and it breaks overrideAttrs in some ways. It has been deprecated for a few releases now, it's me being nice for the last release and if no one complains about it after next release, remove it completely.

@teto
Copy link
Member Author

teto commented Aug 23, 2024

Honestly, I don't know the reason behind those failures, but this should not be merged until this is resolved. We test only a small portion of plugins, which is why I suspect there are even more hidden breakages.

These are clearly not linked to this PR. sg.nvim was broken due to the rust bump. The hard-hat one probably by a PR merge without a nixpkgs-review.

@PerchunPak
Copy link
Member

The hard-hat one probably by a PR merge without a nixpkgs-review.

All of them (except for sg.nvim), get built without any issues on master, and only after cherry-picking this PR, there are failures:

~/dev/nixpkgs @7f871ed07194 ❯ nix build .#vimPlugins.hardhat-nvim .#vimPlugins.idris2-nvim .#vimPlugins.nvim-dap-ui --keep-going --rebuild
fetching git input 'git+file:///home/perchun/dev/nixpkgs'
fetching git input 'git+file:///home/perchun/dev/nixpkgs'
fetching git input 'git+file:///home/perchun/dev/nixpkgs'
checking outputs of '/nix/store/i8zjszpaba1ifbfab7vyygh16sxgyvz9-vimplugin-hardhat.nvim-2024-07-28.drv'...
checking outputs of '/nix/store/kfwava78f9638azfbwgcb58d917asxx4-vimplugin-idris2-nvim-2023-09-05.drv'...
checking outputs of '/nix/store/07jjsfarj6yj7mw9l7wd56qh8dkabnik-vimplugin-nvim-dap-ui-2024-07-13.drv'...

@teto teto marked this pull request as draft August 24, 2024 13:37
@teto
Copy link
Member Author

teto commented Sep 22, 2024

Honestly, I don't know the reason behind those failures, but this should not be merged until this is resolved. We test only a small portion of plugins, which is why I suspect there are even more hidden breakages.

due to structuredAttrs dependencies is now passed as an array instead of string, which breaks the neovim test hook bash substitution, ie., neovim sees only one dependency instead of all the dependencies. Should be easy to fix.

@teto teto force-pushed the teto/vimPlugins-structuredAttrs branch 2 times, most recently from e39e6e0 to 824249b Compare September 23, 2024 08:51
@github-actions github-actions bot added 6.topic: python 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: ocaml 6.topic: vscode labels Sep 23, 2024
@teto teto force-pushed the teto/vimPlugins-structuredAttrs branch from 824249b to b16cd97 Compare September 23, 2024 08:59
@github-actions github-actions bot removed 6.topic: python 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: ocaml 6.topic: vscode labels Sep 23, 2024
it has been doing nothing for a few years now. I doubt it's being used anywhere outside nixpkgs. Will remove it after release
it's a cool feature, let's enable it before release to find issues early

the neovimRequireCheckHook needed changes since now 'dependencies' is
seen as a bash array instead of a string:
1. we first expand it as a string
2. we replace ' ' with ',' (as before)
@teto teto force-pushed the teto/vimPlugins-structuredAttrs branch from b16cd97 to e9f4eb9 Compare September 23, 2024 09:23
@teto teto marked this pull request as ready for review September 23, 2024 11:59
@teto
Copy link
Member Author

teto commented Sep 23, 2024

@PerchunPak it fixes build for hardhat and the one problematic plugins you mentioned (I just built htose, haven't run a nixpkgs-review on it). I think t's ready

Copy link
Contributor

@GaetanLepage GaetanLepage left a comment

Choose a reason for hiding this comment

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

LGTM

@teto teto merged commit aa6e6f3 into NixOS:staging Sep 23, 2024
25 checks passed
@teto teto deleted the teto/vimPlugins-structuredAttrs branch September 23, 2024 17:07
@PerchunPak
Copy link
Member

A bit late, but sacrificed a few GBs of my internet for nixpkgs-review

https://gist.github.com/PerchunPak/55a46813c8e47565e4cf3bbf8e2da49c

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.

5 participants