coder / code-server

VS Code in the browser
https://coder.com
MIT License
66.51k stars 5.45k forks source link

pylance can not work in code-server #6749

Closed lingyueling closed 2 months ago

lingyueling commented 2 months ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

1.sh code-server --install-extension /home/lingyue.ly/ms-python.vscode-pylance-2024.3.100.vsix 2.enable the pylance extension in the workspace 3.reload workspace

Expected

the pylance should work with the code-server

Actual

pylance client couldn't create connection to server

Logs

[Info  - 10:13:52 AM] (950006) Pylance language server 2024.3.100 (pyright version 1.1.354, commit 6c4b3291) starting
[Info  - 10:13:52 AM] (950006) Server root directory: file:///home/lingyue.ly/.local/share/code-server/extensions/ms-python.vscode-pylance-2024.3.100/dist
[Error - 10:13:52 AM] Server initialization failed.
  Message: Request initialize failed with message: You may install and use any number of copies of the software only with Microsoft Visual Studio, Visual Studio for Mac, Visual Studio Code, Azure DevOps, Team Foundation Server, and successor Microsoft products and services (collectively, the “Visual Studio Products and Services”) to develop and test your applications. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. You may not: work around any technical limitations in the software that only allow you to use it in certain ways; reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software, except and to the extent required by third party licensing terms governing use of certain open source components that may be included in the software; remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software; use the software in any way that is against the law or to create or propagate malware; or share, publish, distribute, or lease the software (except for any distributable code, subject to the terms above), provide the software as a stand-alone offering for others to use, or transfer the software or this agreement to any third party.

  Code: -32603 
[Error - 10:13:52 AM] Pylance client: couldn't create connection to server.
  Message: Request initialize failed with message: You may install and use any number of copies of the software only with Microsoft Visual Studio, Visual Studio for Mac, Visual Studio Code, Azure DevOps, Team Foundation Server, and successor Microsoft products and services (collectively, the “Visual Studio Products and Services”) to develop and test your applications. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. You may not: work around any technical limitations in the software that only allow you to use it in certain ways; reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software, except and to the extent required by third party licensing terms governing use of certain open source components that may be included in the software; remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software; use the software in any way that is against the law or to create or propagate malware; or share, publish, distribute, or lease the software (except for any distributable code, subject to the terms above), provide the software as a stand-alone offering for others to use, or transfer the software or this agreement to any third party.

  Code: -32603

Screenshot/Video

No response

Does this bug reproduce in native VS Code?

No, this works as expected in native VS Code

Does this bug reproduce in GitHub Codespaces?

Yes, this is also broken in GitHub Codespaces

Are you accessing code-server over a secure context?

Notes

No response

benz0li commented 2 months ago

@lingyueling Use Jedi.

See also https://github.com/coder/code-server/issues/6323.

code-asher commented 2 months ago

Yeah, unfortunate that Pylance does not support open source builds. Closing since there is nothing we can do.