-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
python-language-server: init at 2020-04-24 #85930
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
python-language-server: init at 2020-04-24 #85930
Conversation
similar (stalled) pull requests: #70058 |
@Mic92 that PR follows the same binary-downloading approach I mentioned in the description. This PR should be better. |
Yes. This one seems better. |
This looks great! I'm just wondering if there should be a microsoft somewhere in the package name to distinguish it from the palantir python module. |
pkgs/development/dotnet-modules/python-language-server/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/dotnet-modules/python-language-server/default.nix
Outdated
Show resolved
Hide resolved
pkgs/development/dotnet-modules/python-language-server/default.nix
Outdated
Show resolved
Hide resolved
So I am trying to test it, I have got your branch and could run successfully Let me know if I can help with anything else. |
@mjlbach thanks! Yeah I wondered that too, I looked over Nixpkgs and didn't see too many organization names so I left it out for now, although there's definitely possibility for confusion here. Maybe someone with more Nix experience can make a suggestion about how to disambiguate from Palantir's version. |
@pedrovelho thanks for testing it -- could you clarify what the issue you saw was? If it was related to the maintainers issue that seems to be fixed in the CI now. |
Update: I finally encountered #73810 myself so I was able to push a fix. Would appreciate if you tried it again @pedrovelho. Latest commit has some other changes also. |
I confirm the maintainers issue is gone. It does not work on my machine but I am not sure this is a problem only I have. It is strange but I have the same behavior as vscode-with-extensions, it is like the binary is not executable on my architecture. $ ls /nix/store/nmrdpcsr4hp2inqm0691ndgw9b6cql9i-python-language-server-2020-04-17/lib/Microsoft.Python.LanguageServer
/nix/store/nmrdpcsr4hp2inqm0691ndgw9b6cql9i-python-language-server-2020-04-17/lib/Microsoft.Python.LanguageServer
$ /nix/store/nmrdpcsr4hp2inqm0691ndgw9b6cql9i-python-language-server-2020-04-17/lib/Microsoft.Python.LanguageServer
zsh: no such file or directory: /nix/store/nmrdpcsr4hp2inqm0691ndgw9b6cql9i-python-language-server-2020-04-17/lib/Microsoft.Python.LanguageServer
$ /usr/bin/bash /nix/store/nmrdpcsr4hp2inqm0691ndgw9b6cql9i-python-language-server-2020-04-17/lib/Microsoft.Python.LanguageServer
zsh: no such file or directory: /usr/bin/bash
$ /usr/bin/env bash /nix/store/nmrdpcsr4hp2inqm0691ndgw9b6cql9i-python-language-server-2020-04-17/lib/Microsoft.Python.LanguageServer
/nix/store/nmrdpcsr4hp2inqm0691ndgw9b6cql9i-python-language-server-2020-04-17/lib/Microsoft.Python.LanguageServer: /nix/store/nmrdpcsr4hp2inqm0691ndgw9b6cql9i-python-language-server-2020-04-17/lib/Microsoft.Python.LanguageServer: cannot execute binary file
$ ldd /nix/store/nmrdpcsr4hp2inqm0691ndgw9b6cql9i-python-language-server-2020-04-17/lib/Microsoft.Python.LanguageServer
linux-vdso.so.1 (0x00007fffaed7e000)
libpthread.so.0 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libpthread.so.0 (0x00007fc7153d0000)
libdl.so.2 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libdl.so.2 (0x00007fc7153cb000)
libstdc++.so.6 => not found
libm.so.6 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libm.so.6 (0x00007fc71528b000)
libgcc_s.so.1 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libgcc_s.so.1 (0x00007fc715271000)
libc.so.6 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib/libc.so.6 (0x00007fc7150b2000)
/lib64/ld-linux-x86-64.so.2 => /nix/store/6m2k8kx8h216jlx9dg3lp4m90bz05yck-glibc-2.30/lib64/ld-linux-x86-64.so.2 (0x00007fc7153f3000) I installed it by cloning your fork, checking out your branch, and using the My architecture if it helps. > uname -a
Linux fox 5.4.33 #1-NixOS SMP Fri Apr 17 08:50:26 UTC 2020 x86_64 GNU/Linux |
You want the version under |
pkgs/development/dotnet-modules/python-language-server/default.nix
Outdated
Show resolved
Hide resolved
@ofborg build python-language-server |
Why does this contribution target |
@GrahamcOfBorg build python-language-server |
The darwin issue seems to be in dotnet
|
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.
Builds locally. Diff LGTM, minus commits needing squashed.
nixpkgs-review pr 85930
https://github.com/NixOS/nixpkgs/pull/85930
1 package built:
python-language-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.
Same conclusion as @drewrisinger: squash commits into something sensible that follows CONTRIBUTING.md, and this should be good to go!
And just to make sure: please make sure your "add to maintainers" commit is separate from the actual packaging commit :)
[8 built, 0.0 MiB DL]
https://github.com/NixOS/nixpkgs/pull/85930
1 package built:
python-language-server
@GrahamcOfBorg build python-language-server |
ab3f178
to
5ba390d
Compare
Whoops missed a few, hang on |
5ba390d
to
862b228
Compare
@GrahamcOfBorg build python-language-server |
Sweet. After we land this a separate PR can replace the server used in Sadly |
Issues I still see blocking this:
|
862b228
to
8c36488
Compare
Just addressed both |
@GrahamcOfBorg build python-language-server |
Thank you both for the review! Please hold off on merging for now, I've been trying to use it a bit more and identified another linker problem that can happen at runtime (involving |
@GrahamcOfBorg build python-language-server |
I've been using this for the past week and have thus far not run into any issues! |
1a5286f
to
83e340b
Compare
83e340b
to
5db5f2f
Compare
Oh that reminds me, I've been using it as well and it seems fine after the last couple tweaks. I just re-squashed and re-rebased on master. I think this is ready to merge anytime. |
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.
- reviewed the diff and commit messages
- made sure ofBorg build succeeded for all applicable platforms
- run nix-review for a reasonable amount of time without any failures (or marked preexisting failures as broken)
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Maybe the vscode extension package should be linking to this one instead? |
Motivation for this change
This is the Microsoft implementation of the Language Server Protocol server for Python, used to support IDE features in compatible development environments.
Nixpkgs already includes this, sort of--it's already bundled as part of vscode-extensions. However, the way it is bundled isn't ideal--it's simply downloaded from an API under
https://pvsc.azureedge.net
. I read that this is not recommended, since this URL is more of an internal API for VSCode. Downloading binaries also doesn't let us use the most recent code on the master branch of Github.Instead, this PR a) builds the language server from source and b) exposes it as a top-level application, so it can be installed/used independently of VSCode.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)