-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Support more recent VSCode Server versions #78
Support more recent VSCode Server versions #78
Conversation
This fixed vscode-server for me on vscode 1.87.2 with remote ssh extension 0.109.0, thanks! |
It fixed the issue for me too on nixos-unstable. The actual issue I was facing was this reported by VS Code when trying to connect to my remote NixOS machine:
Thanks for the fix @Ten0, this should be merged into mainline |
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.
Thanks for putting this together @Ten0 !)
|
||
if [[ -e $patched_file ]]; then | ||
return 0 | ||
fi | ||
|
||
# Backwards compatibility with previous versions of nixos-vscode-server. |
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 propose noting specifically which "previous versions" of VSCode this applies to along with the current date. Presumably we'll want to remove this at some future point, and having that info here could help to make the context more readily apparent.
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.
It's of nixos-vscode-server (this repo). Anything prior to the commit that will ultimately introduce this comment will be relevant, so it seems to be the job of git to maintain this information, reasonably accessible via git blame
.
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.
ah oops, misread! Fair enough... when do you think we should remove this?
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'd say a few months after this is merged, so that everyone had a chance to update this repo and/or their vscode client version.
@@ -144,7 +144,7 @@ The installation path for VS Code server is configurable and the default can dif | |||
|
|||
```nix | |||
{ | |||
services.vscode-server.installPath = "~/.vscode-server-oss"; | |||
services.vscode-server.installPath = "$HOME/.vscode-server-oss"; |
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.
ooc why make this change? is it necessary to fix #79?
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.
Doesn't seem related but was necessary to have something functional.
This also fixed the issue for me with code 1.88 and remote ssh v0.111. |
Works for me.
Client
Via the GUI:
Server
|
@msteen Would you consider following up on your proposal here? I wouldn't like to mute this PR but I'm starting to get annoyed by all the notifications here 😅 |
I can confirm that it helped. Is there anything blocking the merge? |
Last bit of time from @msteen |
I lack a setup to properly test this at the moment. Given multiple confirmations I am just going to merge for now. |
I've got the following error:
{
"locked": {
"lastModified": 1713958148,
"narHash": "sha256-8PDNi/dgoI2kyM7uSiU4eoLBqUKoA+3TXuz+VWmuCOc=",
"owner": "nix-community",
"repo": "nixos-vscode-server",
"rev": "fc900c16efc6a5ed972fb6be87df018bcf3035bc",
"type": "github"
}
} I had this in my config: services.vscode-server = {
enable = true;
installPath = "~/.vscode-server";
# installPath = "~/.vscode-server-insiders";
}; Replacing the services.vscode-server = {
enable = true;
installPath = "$HOME/.vscode-server";
# installPath = "$HOME/.vscode-server-insiders";
}; |
Yeah not sure why ~ used to work but it generally would fail now so I've replaced them all within the PR but of course if they are reintroduced by your config that may break things. |
Should we maybe error or autofix this in the implementation? Noting |
Looks like the install path that was specified here is the default anyway, so there's probably little amount of people who are affected. In addition they managed to fix it pretty quickly. So overall I think I'd prefer to let users migrate to the writing that works than add maintenance complexity by setting a standard that we are fixing the paths. |
Resolves #67
Following this message:
#67 (comment)
It took me some time to free up some time to understand how the script worked and propose this implementation - it's cleaner than that of #68 and seems more stable.
Closes #68
Notably this changes the directory structure a bit, leaving patched files in their respective directories, which feels simpler and cleaner because I don't need to construct global filenames whose construction method depends on the VSCode version. (I'm using
\$(dirname "\$0")
in the intermediate script that replaces the node binary so that it keeps working after the directory is moved).I've tested that this works: