modules/performance/combinePlugins: propagate dependencies#3099
modules/performance/combinePlugins: propagate dependencies#3099MattSturgeon wants to merge 2 commits intonix-community:mainfrom
Conversation
1ea78a6 to
c2468bc
Compare
|
Seems like this still isn't working. Tests for combined plugins are still failing with missing plenary modules. I wonder if It'd help if I understood why vim plugins packaged with |
modules/top-level/output.nix
Outdated
| # Extract lua modules from propagated inputs | ||
| # as per toLuaModule | ||
| # https://github.com/NixOS/nixpkgs/blob/4f0dadbf/pkgs/development/lua-modules/lib.nix#L73-L85 | ||
| luaModules = config.package.lua.pkgs.requiredLuaModules ( | ||
| propagatedDependencies.propagatedBuildInputs or [ ] | ||
| ); |
There was a problem hiding this comment.
Hm, I was hoping this would help. Perhaps the pathsToLink argument is causing this to not work correctly?
There was a problem hiding this comment.
I've updated this to use the requiredLuaModules attr, but this still doesn't seem to be helping. Looking at the nixpkgs lua wrapper, there may be some more work needed below in the "plugin pack" env package, such as using buildLuaPath?
|
I haven't looked at the code but if you look at the neovim wrapper, it doesn't add all lua dependencies in packpath but wraps neovim with LUA_PATH and LUA_CPATH. |
|
Yeah, looks like the wrapper is using the I'm trying to figure out why our To be specific, if any of the plugins being "combined" have any required lua modules, these do not seem to be included in the |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
It turns out we were testing incorrectly (see #3121). This was not resolved by NixOS/nixpkgs@f9af047 after all. |
ff44fee to
a072eee
Compare
a072eee to
524d7c6
Compare
|
Testing this out in the repl, I can see plenary makes it into the combinedPlugin's However the test still fails: Inspecting what's going on in the plugin pack: Notably, there is no |
2dbb3c2 to
bba9010
Compare
|
I'm not too familiar with
I've updated the PR to manually write the |
| mkdir -p $out/nix-support | ||
| printf "%s\n" "''${inputs[@]}" >> $out/nix-support/propagated-build-inputs |
There was a problem hiding this comment.
It might be possible to use the recordPropagatedDependencies command?
|
Writing the |
bba9010 to
6911f39
Compare
We need to write `$out/nix-support/propagated-build-inputs` in order for the vim/lua tooling to be able to find propagated inputs.
… fix tests" This reverts commit 5a491f4.
6911f39 to
399471d
Compare
|
Seems like nixvim/tests/test-sources/modules/performance/combine-plugins.nix Lines 314 to 380 in 754b8df Ah, nixvim/tests/test-sources/modules/performance/byte-compile-lua.nix Lines 233 to 299 in 754b8df |
|
cc @stasjok |
|
|
An attempt at having
combinePluginscorrectly propagate dependencies from the input plugins.Marking as a draft for now until we can verify it works correctly, but otherwise ready for review.
Fixes #3140