-
-
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
vtsls: init at 0.2.3 #319501
base: master
Are you sure you want to change the base?
vtsls: init at 0.2.3 #319501
Conversation
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.
Please see #229475
Awesome! Will adapt as soon as I'm able to @SuperSandro2000. |
As per #290715, What are your thoughts @SuperSandro2000? |
I went with the option of maintaining a |
|
||
sourceRoot = "${src.name}/packages/server"; | ||
|
||
npmDeps = importNpmLock { |
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.
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'm sorry for the delay, I have been flooded with e-mails recently.
@SuperSandro2000 what do you mean with "IFD"? If it's the "import from derivation" feature, I'm not familiar with it and how it could relate to this issue.
I'm not quite sure why ofborg is failing to build it, I can locally via nix-build -A vtsls
as well as calling the derivation in my system. Reading again the specifications for this, what I'm doing still makes sense to me, maybe I am misinterpreting something.
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.
@SuperSandro2000, can you give me an update on this?
Far from knowledgeable on this and apologies if this is unhelpful, but this comment feels relevant? #316908 (comment) |
No need for apologies, we're here to help each other.
Perhaps I'm misunderstanding something, but through this method it's been working for me thus far. |
I tried to package vtsls for personal usage. Didn't know this PR existed.
|
npmDeps = importNpmLock { | ||
npmRoot = "${src}/packages/server"; | ||
packageLock = lib.importJSON ./package-lock.json; | ||
}; |
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.
npmDeps = importNpmLock { | |
npmRoot = "${src}/packages/server"; | |
packageLock = lib.importJSON ./package-lock.json; | |
}; | |
npmDeps = importNpmLock { | |
package = lib.importJSON ./package.json; # you need to vendor also this file | |
packageLock = lib.importJSON ./package-lock.json; | |
}; |
IFD is a nix feature allowed by default in nix but forbidden in nixpkgs. My change above eliminates it but introduces other errors that I wasn't able to quickly fix.
Use
nix --option allow-import-from-derivation false build .#vtsls -L --no-eval-cache
from your nixpkgs directory to be sure that there are no IFDs (I'm also assuming flakes with the command above).
Anyway how did you get the package-lock.json
file? Did you use npm i --package-lock-only
? In that case it means that we are using different packages versions than upstream.
I saw that there is a package called pnpm-lock-export
that should convert the original pnpm-lock.yaml
file to a package-lock.json
but it fails with that specific lockfile. There is also pnpm-lock-to-npm-lock but I haven't tried since it's not in Nixpkgs. However I believe you should document in a comment the needed to command to generate the lockfile, or even better, write an update script that does it automatically.
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.
Thank you very much for the insight @aciceri! Yes I had just created a lockfile myself, since I couldn't create one otherwise (as far as I knew).
I'm seeing this quite late however, so now there seems to be an official way to handle workspaces as @lxsymington mentioned promptly mentioned - I'll be looking into that now and follow up the PR with it if things go smooth.
@wizardlink It looks as if this merged PR #323493 may address that? Again apologies if I'm being unhelpful! |
A few days ago another PR was opened for |
Just got some time to take a look into it, I can close this PR in favor of it if anything. |
Description of changes
This package provides a wrapper program for the TypeScript language server, this is an alternative option that a few distributions of NeoVIM are using, such as AstroNvim.
Things done
Added a binary for
@vtsls/language-server
and it's dependencies (@vtsls/language-service
and@vtsls/vscode-fuzzy
).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.