-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Disable language services if Pyrefly extension installed + active #24987
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
Disable language services if Pyrefly extension installed + active #24987
Conversation
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
Thanks for the quick review @rchiodo! I did not realize you would see draft PRs yet... I just updated the summary so it should make more sense. |
When you did this part:
Did you clone into the extensions folder for vscode? I think that's what those directions are asking you to do? @karthiknadig would know more. Pylance would have to be installed in the extensions folder I think for your testing to work |
This error:
Usually happens when pyright and pylance are enabled at the same time. It might also happen if pylance is started twice for some reason. |
@kinto0 Please look into and accept the CLA. Otherwise we can't merge this. |
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
@microsoft-github-policy-service agree [company="meta"] |
@microsoft-github-policy-service agree company="meta" |
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.
kinto0:kinto/disable-with-pyrefly
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
…-python into kinto/disable-with-pyrefly
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
…d on + vice-versa) Summary: ms-python insiders came out last night and it is not looking good for my [patch](microsoft/vscode-python#24987). When I put up the PR, I was not able to test pylance fully and put too much faith in the test framework (it's really good but not this good apparently). It works great on a window reload, but that isn't good enough for testing. two issues: - installing pyrefly refreshes something but does not keep pylance disabled (green = pylance syntax highlighting) {F1977750850} I'm not sure what causes this. these settings are [re-checked on any extension install](https://github.com/microsoft/vscode-python/blob/a3dd3aa1bca82be1fb5c44f04c689233010eaeab/src/client/languageServer/watcher.ts#L345) (hence the flicker) and we [check for existence of pyrefly](https://github.com/microsoft/vscode-python/blob/a3dd3aa1bca82be1fb5c44f04c689233010eaeab/src/client/common/configSettings.ts#L283). - changing the disableLanguageServices setting does not actually trigger the change {F1977750864} This is an easier fix: I must've messed up testing it [here](microsoft/vscode-python#24987 (comment)) In the meantime, this hack fixes both of these issues from within pyrefly with no side effects, but only if a workspace is opened (it does not work on the default workspace [because settings are not watched there](https://github.com/microsoft/vscode-python/blob/a3dd3aa1bca82be1fb5c44f04c689233010eaeab/src/client/languageServer/watcher.ts#L295)) Reviewed By: SamChou19815 Differential Revision: D74327314 fbshipit-source-id: 7d97476572731e8771af44af60c81d0d2334054d
For #24850
Summary:
Background:
A new typechecker called Pyrefly will be featured at Pycon with a talk, website/sandbox (still WIP), and extension (still WIP). This extension will provide ultrafast typechecking and language services. When the Pyrefly extension is installed,
ms-python.python
should not start Jedi or Pylance unlesspython.pyrefly.disableLanguageServices
is set totrue
.Test Plan:
https://github.com/user-attachments/assets/395bacbb-7ad0-4357-b084-cd5e88062801