Repository navigation
vimPlugins: add transitive dependencies to check environment #545516
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |||||||||||||||||||||
| makeSetupHook, | ||||||||||||||||||||||
| linkFarm, | ||||||||||||||||||||||
| config, | ||||||||||||||||||||||
| neovimUtils, | ||||||||||||||||||||||
| }: | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| /* | ||||||||||||||||||||||
|
|
@@ -523,7 +524,14 @@ rec { | |||||||||||||||||||||
| finalAttrs: oldAttrs: | ||||||||||||||||||||||
| let | ||||||||||||||||||||||
| getRequiredLuaModules = attrs: attrs.requiredLuaModules or attrs.passthru.requiredLuaModules or [ ]; | ||||||||||||||||||||||
| modules = getRequiredLuaModules finalAttrs; | ||||||||||||||||||||||
| checkPlugins = lib.filter (p: p.passthru.vimPlugin or false) (finalAttrs.checkInputs or [ ]); | ||||||||||||||||||||||
| checkDependencies = lib.unique ( | ||||||||||||||||||||||
| findDependenciesRecursively ((finalAttrs.dependencies or [ ]) ++ checkPlugins) | ||||||||||||||||||||||
| ); | ||||||||||||||||||||||
| vimPackageInfo = neovimUtils.makeVimPackageInfo ( | ||||||||||||||||||||||
| lib.filter (p: p.passthru.vimPlugin or false) checkDependencies | ||||||||||||||||||||||
| ); | ||||||||||||||||||||||
|
saadndm marked this conversation as resolved.
|
||||||||||||||||||||||
| modules = lib.unique (getRequiredLuaModules finalAttrs ++ vimPackageInfo.luaDependencies); | ||||||||||||||||||||||
|
saadndm marked this conversation as resolved.
|
||||||||||||||||||||||
| luaEnv = lua.withPackages (_: modules); | ||||||||||||||||||||||
| in | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
|
|
@@ -552,6 +560,9 @@ rec { | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| nvimRequireCheckLuaPath = lib.optionalString (modules != [ ]) (lua.pkgs.getLuaPath luaEnv); | ||||||||||||||||||||||
| nvimRequireCheckLuaCPath = lib.optionalString (modules != [ ]) (lua.pkgs.getLuaCPath luaEnv); | ||||||||||||||||||||||
| nvimRequireCheckPackPath = neovimUtils.packDir { | ||||||||||||||||||||||
| plugins = vimPackageInfo.vimPackage; | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
|
Comment on lines
561
to
+565
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. issue: keep check-only dependencies out of builds with The new pack path and transitive Lua paths still reference
Suggested change
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| passthru = (oldAttrs.passthru or { }) // { | ||||||||||||||||||||||
| vimPlugin = true; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just keep one codepath for simplicity.
Aka we always create a
nvimRequireCheckPackPathso we can get rid of theifand theelsepart.