Skip to content

enable structuredAttrs for vimPlugins#336042

Merged
teto merged 2 commits intoNixOS:stagingfrom
teto:teto/vimPlugins-structuredAttrs
Sep 23, 2024
Merged

enable structuredAttrs for vimPlugins#336042
teto merged 2 commits intoNixOS:stagingfrom
teto:teto/vimPlugins-structuredAttrs

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 teto requested a review from figsoda as a code owner August 20, 2024 10:56
@github-actions github-actions bot added 8.has: documentation This PR adds or changes documentation 6.topic: vim Advanced text editor labels Aug 20, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches. labels Aug 20, 2024
@teto teto force-pushed the teto/vimPlugins-structuredAttrs branch from 0d711ca to e9b1047 Compare August 20, 2024 12:31
@github-actions github-actions bot removed the 8.has: documentation This PR adds or changes documentation label Aug 20, 2024
@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

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.

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 Python is a high-level, general-purpose programming language. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: vscode A free and versatile code editor that supports almost every major programming language. 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 Python is a high-level, general-purpose programming language. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 6.topic: ocaml OCaml is a general-purpose, high-level, multi-paradigm programming language. 6.topic: vscode A free and versatile code editor that supports almost every major programming language. 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 teto requested a review from GaetanLepage September 23, 2024 12:52
@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
@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

Labels

6.topic: vim Advanced text editor 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 1001-2500 This PR causes many rebuilds on Darwin and should most likely target the staging branches. 10.rebuild-linux: 501+ This PR causes many rebuilds on Linux and should normally target the staging branches. 10.rebuild-linux: 1001-2500 This PR causes many rebuilds on Linux and should target the staging branches.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants