-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
vscode-langservers-extracted: repackage with buildNpmPackage #234888
vscode-langservers-extracted: repackage with buildNpmPackage #234888
Conversation
1433450
to
aad9ec4
Compare
a77d337
to
18c313c
Compare
27ba61f
to
d4abf5f
Compare
d4abf5f
to
5d9720b
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/2333 |
pkgs/development/tools/language-servers/vscode-langservers-extracted/default.nix
Outdated
Show resolved
Hide resolved
5d9720b
to
46d58de
Compare
pkgs/development/tools/language-servers/vscode-langservers-extracted/default.nix
Outdated
Show resolved
Hide resolved
08f4212
to
e45eeed
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/nodepackages-vscode-langservers-extracted-not-building/29201/1 |
Looks like it's now broken on darwin
|
Is vscode dependency necessary here? Now it requires to enable unfree packages in order to build it. |
Unless vscodium exposes the servers (it might, but that's a deviation from what this package is upstream), vscode is necessary. Upstream builds the latest vscode and pulls the language servers from it. It doesn't actually have the source for the servers or have them as dependencies, it extracts them from the vscode build (hence the name) and thinly wraps them. This is always how the package worked, it was just broken before (apparently since it was first added to Now, Microsoft does actually publish the language servers individually, and they do get updated (despite the claims of upstream, which are, ironically, dated). They are also all MIT. It's probably better to toss them in |
In fact, we already have all but the markdown server packaged. This all serves to highlight something of which I was already aware: this package was silly from the start 😅. |
The packaged versions seem awfully out of date if they refer to the same versions as npm though :/ |
I personally use only json-language-server. It was working fine. I'm sure that I was using nodePackages.vscode-langservers-extended.
Those are very old versions. |
I overrided this package with |
If there's an uncaught exception, it definitely isn't working. |
If I understand correctly, that's true when we are using github repository as a source. It contains build scripts to extract it from vscode. But the package published to npm have the code included (because that's the purpose of it — provide an easy method to install language servers without vscode). Usually I'm all for building from source. But I'm not sure about this case.
Maybe someone else will comment. I tested only json-language-server. It works when builded either with vscode or vscodium. |
Fixes a build failure on Darwin, see: NixOS/nixpkgs#234888 (comment) As mentioned in that thread using a catch-all package did not make a lot of sense in the first place, best to only pull in relevant packages.
Description of changes
Repackages nodePackages.vscode-langervers-extracted to be built using buildNpmPackage as per #229475. It was previously broken, and probably was since it was first added since there is no build script. Due to the background nature of LSPs, I guess nobody thought to check. This doesn't expose
vscode-eslint-language-server
as that requires the vscode-eslint package, which was not in the scope of this PR.CC @winterqt
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)