-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fish-lsp: init at 1.0.8-1 #330996
base: master
Are you sure you want to change the base?
fish-lsp: init at 1.0.8-1 #330996
Conversation
Note sure why both ofborg |
Result of 2 packages built:
|
Looks like all tests have passed. Is there anything else I should do to get this merged? |
Thanks for putting in the work to do this, i've just spent the last few hours trying to do it myself before i found this. Does anyone know the timeline until this will be merged? |
4724218
to
9cd6531
Compare
9cd6531
to
621087c
Compare
621087c
to
ff2cba6
Compare
b802375
to
d39b3b4
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/4785 |
|
fish | ||
which |
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.
are these needed at build time or at runtime?
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.
Hi @Scrumplex,
Thank you for having look at the PR. Definitely need it for build time. I think they may be required for runtime as well.
fish
is required for thesh:build-wasm
script which runs https://github.com/ndonfris/fish-lsp/blob/master/scripts/build-fish-wasm.fish
Error withoutfish
> Running phase: buildPhase
> Executing yarnBuildHook
> yarn run v1.22.22
> $ run-s sh:build-time sh:build-wasm
> warning You don't appear to have an internet connection. Try the --offline flag to use the cache for registry queries.
> $ fish ./scripts/build-time.fish
> /bin/sh: fish: not found
> error Command failed with exit code 127.
> info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
> ERROR: "sh:build-time" exited with 127.
> error Command failed with exit code 1.
which
is required to generate the completion. See https://github.com/ndonfris/fish-lsp/blob/master/src/utils/builtins.ts (findShell
spawnswhich fish
)
Error withoutwhich
> Running phase: installPhase
> /bin/sh: which: not found
> /nix/store/aam03bwd19cadd1ad6qw26gr7h7hkh7m-fish-lsp-unstable-2024-07-26/share/fish-lsp/out/utils/builtins.js:88
> return result.stdout.toString().split('\n');
> ^
>
> TypeError: Cannot read properties of null (reading 'toString')
> at createFunctionNamesList (/nix/store/aam03bwd19cadd1ad6qw26gr7h7hkh7m-fish-lsp-unstable-2024-07-26/share/fish-lsp/out/utils/builtins.js:88:26)
> at Object.<anonymous> (/nix/store/aam03bwd19cadd1ad6qw26gr7h7hkh7m-fish-lsp-unstable-2024-07-26/share/fish-lsp/out/utils/builtins.js:90:29)
> at Module._compile (node:internal/modules/cjs/loader:1469:14)
> at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
> at Module.load (node:internal/modules/cjs/loader:1288:32)
> at Module._load (node:internal/modules/cjs/loader:1104:12)
> at Module.require (node:internal/modules/cjs/loader:1311:19)
> at require (node:internal/modules/helpers:179:18)
> at Object.<anonymous> (/nix/store/aam03bwd19cadd1ad6qw26gr7h7hkh7m-fish-lsp-unstable-2024-07-26/share/fish-lsp/out/utils/translation.js:38:20)
> at Module._compile (node:internal/modules/cjs/loader:1469:14)
>
> Node.js v20.17.0
> installShellCompletion: installed shell completion file `/nix/store/aam03bwd19cadd1ad6qw26gr7h7hkh7m-fish-lsp-unstable-2024-07-26/share/fish/vendor_completions.d/fish-lsp.fish' does not exist or has zero size
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 should add those packages to the wrapper if they are sometimes used at runtime.
Like this patch:
diff --git a/pkgs/by-name/fi/fish-lsp/package.nix b/pkgs/by-name/fi/fish-lsp/package.nix
index bc9ceb51ecb8..cefbdbaf366a 100644
--- a/pkgs/by-name/fi/fish-lsp/package.nix
+++ b/pkgs/by-name/fi/fish-lsp/package.nix
@@ -36,9 +36,7 @@ stdenv.mkDerivation rec {
nodejs
installShellFiles
makeWrapper
- # fish-lsp dependencies
fish
- which
];
yarnBuildScript = "setup";
@@ -54,7 +52,8 @@ stdenv.mkDerivation rec {
cp -r . $out/share/fish-lsp
makeWrapper ${lib.getExe nodejs} "$out/bin/fish-lsp" \
- --add-flags "$out/share/fish-lsp/out/cli.js"
+ --add-flags "$out/share/fish-lsp/out/cli.js" \
+ --prefix PATH : "${lib.makeBinPath [fish which]}"
${lib.optionalString stdenv.buildPlatform.canExecute stdenv.hostPlatform ''
installShellCompletion --cmd fish-lsp \
d39b3b4
to
6d3b68f
Compare
makeWrapper ${lib.getExe nodejs} "$out/bin/fish-lsp" \ | ||
--add-flags "$out/share/fish-lsp/out/cli.js" | ||
${lib.optionalString stdenv.buildPlatform.canExecute stdenv.hostPlatform '' |
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.
Forgot parenthesis. Sorry!
${lib.optionalString stdenv.buildPlatform.canExecute stdenv.hostPlatform '' | |
${lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' |
Description of changes
Adds
fish-lsp
#305493Uses
yarnConfigHook
andyarnBuildHook
instead ofmkYarnPackage
Supersedes #320463 #330320
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.