vscodium icon indicating copy to clipboard operation
vscodium copied to clipboard

Add instructions for PyLance workaround.

Open SebastianGrans opened this issue 4 years ago • 1 comments

Microsoft prevents PyLance language server from running in unofficial builds, but an easy workaround is to modify product.json. See #892.

I added instructions to the Docs.

SebastianGrans avatar Dec 06 '21 13:12 SebastianGrans

As Jedi is always enabled if Pylance is not found wouldn't it be most reasonable to just uninstall/disable PyLance?

I don't have any setting for this done, so it is on Default and when checking the Output Pane, Python group the very first item says:

Starting Jedi language server.

GitMensch avatar Jan 27 '22 07:01 GitMensch

Shouldn't this info just be added to Extensions Compatibility Wiki?

kolya-ay avatar Oct 30 '22 20:10 kolya-ay

I think adding a link to the workaround (or simple instructions to do so) in the "Replacements" section could be appropriate as Pylance is already stated there as only partially compatible.

abstralexis avatar Oct 30 '22 20:10 abstralexis

Also please refer: https://github.com/VSCodium/vscodium/issues/940#issuecomment-1341932901

bxff avatar Dec 08 '22 03:12 bxff

Hello Sebastian! I'm wondering if this method of using Pylance in VSCodium still works. For Linux, you mentioned the directory: /home//.config/VSCodium/product.json There was no such file there. So, I made a copy of product.json from usr/share/codium/resources/app/product.json and changed "nameLong". Unfortunately, it didn't help and I'm still struggling with this problem. Could you help me in this matter?

finnlogin avatar Jun 28 '23 17:06 finnlogin

It looks like this no longer works as of version 2023.8.20.

Equim-chan avatar Aug 12 '23 10:08 Equim-chan

I'm closing this PR. Feel free to open a discussion if you want further talks.

The best solution is to have an open alternative for PyLance instead of trying the make a closed-source extension works...

daiyam avatar Aug 12 '23 10:08 daiyam

It looks like this no longer works as of version 2023.8.20.

Yeah, apparently starting from this version the product.json trick is not longer enough... 😭

sergei-dyshel avatar Aug 14 '23 16:08 sergei-dyshel

If anyone still wants to bother with Pylance, the last working version can be found here.

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/vscode-pylance/2023.6.40/vspackage

No need for the product.json trick. Just install VSCodium, install the extension and you are ready to go.

Save it on your drive! Who knows for how long M$ will keep that link up.

The checksum for the file for posterity.

Name: ms-python.vscode-pylance-2023.6.40.vsix Size: 13884740 bytes (13 MiB) SHA256: 2799d1a108d454a68caacd10245634bf3bad8d667d747e8eec55c8f996486814 SHA1: 832b3ad87e042497a99156f7c7b07717f734c9f0 BLAKE2sp: 089240601221b6fecd13991490c925ac2f11b9ec51e96bd9b00dbbccfde151b7

EndlessFractal avatar Aug 15 '23 23:08 EndlessFractal

Let's just attach it: ms-python.vscode-pylance-2023.6.40.vsix.zip

The hashes are above^.

paulcarroty avatar Aug 16 '23 12:08 paulcarroty

Would it be reasonable to distribute that as a built-in extension by including it in the patchset or do we know/guess that this is/will soon be broken? The only possible downside I currently see are 12 MB...

GitMensch avatar Aug 16 '23 13:08 GitMensch

If anyone still wants to bother with Pylance

Strangely I couldn't find any reasonable data source on differences between Pylance and Pyright (we all know that Pylance is based on Pyright). Does anybody have a clue?

sergei-dyshel avatar Aug 16 '23 14:08 sergei-dyshel

Actually there is some information in Pylance FAQ:

What features are in Pylance but not in Pyright? What is the difference exactly?

Pylance has a handful of valuable features that are not available in Pyright, including semantic highlighting, refactoring code actions (extract variable/extract method), docstrings for built-in/standard library modules, and IntelliCode compatibility. Pylance also ships with a collection of type stubs for popular modules to provide fast and accurate auto-completions and type checking.

sergei-dyshel avatar Aug 16 '23 14:08 sergei-dyshel

Would it be reasonable to distribute that as a built-in extension by including it in the patchset or do we know/guess that this is/will soon be broken?

No! VSCodium doesn't add features compared to Visual Studio Code. Also PyLance is closed-sourced and can be installed only with MS products (https://marketplace.visualstudio.com/items/ms-python.vscode-pylance/license)

daiyam avatar Aug 16 '23 14:08 daiyam