vimPlugins: strictly enforce only overrides in overrides.nix#438906
vimPlugins: strictly enforce only overrides in overrides.nix#438906GaetanLepage merged 11 commits intoNixOS:masterfrom
overrides.nix#438906Conversation
06f496d to
7987933
Compare
Why is that btw? Are they not built on hydra and why? I'm not sure whether the semantics are better than before. Could there be a scenario where you'd like to have the same package available as two attributes with some overrides applied? Maybe a different version or something else. In this case, it's not unthinkable to add a new attribute via override. Now, I don't know whether that hypothetical scenario is something you'd like to deal with differently and still keep out of overrides.nix. |
7987933 to
2beca03
Compare
This happened in #377508.
|
|
We should find a way to at least eval them, but possibly even pass them to nixpkgs-review to build. They should not count as rebuilds though. Does that make sense? |
If only that was possible... |
This is certainly something worth considering. My understanding is that the intention of The closest I can see to a variant is (Although I'm not sure if it is intended that there is both a As I've done there, these cases can be handled by adding them to the # plugins/non-generated/foo/default.nix
{ vimPlugins }:
vimPlugins.bar.overrideAttrs {
# ...
}I'll let the vim team decide whether they'd prefer the strict enforcement proposed in this PR or another approach that allows introducing new attributes in
I agree with the reasoning, but it does make it difficult to verify a PR doesn't break anything. I struggle to get nixpkgs-review to build the
That'd be great. I do feel like something should be automatically evaluating and building modified plugins to avoid unnoticed regressions in PRs. I'm guessing this doesn't apply more broadly to all packages with |
pkgs/applications/editors/vim/plugins/non-generated/ssr/default.nix
Outdated
Show resolved
Hide resolved
Follow up to c90c292 Previously we explicitly shadowed `buildVimPlugin` and `buildNeoVimPlugin` to ensure they are not used to build new plugins. This new approach is more robust by checking all attrnames defined in the overlay are already present in `super`.
2beca03 to
5baa740
Compare
|
Thanks @MattSturgeon |
Follow up to #438708 (comment), previously @khaneliman explicitly shadowed
buildVimPluginandbuildNeoVimPluginto ensure they are not used to build new plugins.This PR takes things a step further, by asserting that no attributes are defined in the
overrides.nixoverlay that aren't already present in the overlay'ssuper(akaprev).When initially added, the new assertion picked up the following package definitions:
...which I've resolved as part of this PR.
As the eval CI ignores
vimPlugins, I manually verified that all attributes touched in this PR still evaluate to the exact same derivation as on master. Including everyvimPlugins.nvim-treesitter-parsersderivation.I did this by running
nix-instantiate -A vimPluginson master and this branch, then comparing the out-paths:I've attached the files for transparency:
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.