Skip to content
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 (Microsoft): enable on darwin #89150

Closed
wants to merge 1 commit into from

Conversation

mjlbach
Copy link
Contributor

@mjlbach mjlbach commented May 29, 2020

Motivation for this change

Closes #89139

Now that #88750 is merged adding dotnet core support, Microsoft's python language server ( #85930) should be able to be built on darwin. I'm not super familiar with packaging for nix on darwin. Definitely would appreciate any pointers or review.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.


mkdir $out/bin
makeWrapper $out/lib/Microsoft.Python.LanguageServer $out/bin/python-language-server
'';

postFixup = ''
postFixup = stdenv.lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am very unsure if this is ok. These are dylibs on darwin and are bundled with python-language-server (not in these locations)

@@ -0,0 +1,1321 @@
# This file is autogenerated.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not happy about the level of duplication here, but I thought I'd start with the safest thing first.

@mjlbach mjlbach changed the title Enable python-language-server on darwin python-language-server (Microsoft): enable on darwin May 29, 2020
@sorenmacbeth
Copy link

anyway we could get this merged in?

@mjlbach
Copy link
Contributor Author

mjlbach commented Aug 27, 2020

@sorenmacbeth I don't think there are any blockers, not sure about the dylib situation as I noted in my comments. Also, of note, happy to get this merged but I now recommend using pyright as this language server has been abandoned by MS in favor of pyright/pylance

@tssm
Copy link
Contributor

tssm commented Sep 18, 2020

@sorenmacbeth Pyright is already in Nixpkgs as nodePackages.pyright if you want to try it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable Microsoft python language server on Darwin
4 participants