-
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
base: main
Are you sure you want to change the base?
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:
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
.Because of the separation of vscode's
getExtensions
API and config reading logic, I chose to augmentDefaultLSType
with fallback information in case Pyrefly is disabled. This letsconfigSettings
pick the correct jedi/pylance without knowing if Pyrefly will be enabled or disabled.Test Plan:
still can't get pyright to work in the local extension build but I do see my breakpoints hit and the correct languageServer set
lowerquality.mp4