Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

kinto0
Copy link

@kinto0kinto0 commentedApr 16, 2025
edited
Loading

For#24850

Summary:
Background:
A new typechecker called Pyrefly will be featured at Pycon with atalk,website/sandbox (still WIP), andextension (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:

Summary:Test Plan:Reviewers:Subscribers:Tasks:Tags:
@karthiknadigkarthiknadig self-assigned thisApr 16, 2025
@karthiknadigkarthiknadig self-requested a reviewApril 16, 2025 20:45
@kinto0
Copy link
Author

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.

@rchiodo
Copy link

When you did this part:

Followed guidehere. When running extension locally, I don't see any language services ever (before / after my changes). I'd appreciate help testing this integration since I'm not confident the configuration is set correctl

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

@rchiodo
Copy link

This error:

2025-04-16 15:22:19.725 [error] [  'Starting language server, Class name = p, completed in 11208ms, has a falsy return value, , Return Value: undefined',  [Error: command 'pyright.createtypestub' already exists  at cw.registerCommand (file:///private/var/folders/x0/z3j4vbzs3wqd0ynb6q24jglm0000gn/T/AppTranslocation/58C97911-06B4-4CA7-9068-D7D7F655735D/d/Visual%20Studio%20Code%202.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:31527)  at Object.registerCommand (file:///private/var/folders/x0/z3j4vbzs3wqd0ynb6q24jglm0000gn/T/AppTranslocation/58C97911-06B4-4CA7-9068-D7D7F655735D/d/Visual%20Studio%20Code%202.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:157:36729)  at t.ExecuteCommandFeature.register (/Users/kylei/.vscode/extensions/ms-python.python-2025.4.0-darwin-arm64/out/client/extension.js:2:2101514)  at t.ExecuteCommandFeature.initialize (/Users/kylei/.vscode/extensions/ms-python.python-2025.4.0-darwin-arm64/out/client/extension.js:2:2101091)  at P.initializeFeatures (/Users/kylei/.vscode/extensions/ms-python.python-2025.4.0-darwin-arm64/out/client/extension.js:2:2041419)  at P.doInitialize (/Users/kylei/.vscode/extensions/ms-python.python-2025.4.0-darwin-arm64/out/client/extension.js:2:2027694)  at async P.start (/Users/kylei/.vscode/extensions/ms-python.python-2025.4.0-darwin-arm64/out/client/extension.js:2:2024707)  at async Object.start (/Users/kylei/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist/extension.bundle.js:1:148233)  at async _0x317b05._startClient (/Users/kylei/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist/extension.bundle.js:1:84298)  at async _0x317b05._createNewRequest (/Users/kylei/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist/extension.bundle.js:1:83758)  at async _0x317b05._enqueueRequestAndWaitForRun (/Users/kylei/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist/extension.bundle.js:1:83000)  at async _0x317b05.startClient (/Users/kylei/.vscode/extensions/ms-python.vscode-pylance-2025.4.1/dist/extension.bundle.js:1:82482)  at async h.start (/Users/kylei/.vscode/extensions/ms-python.python-2025.4.0-darwin-arm64/out/client/extension.js:2:39831)]]

Usually happens when pyright and pylance are enabled at the same time. It might also happen if pylance is started twice for some reason.

@karthiknadigkarthiknadig added the feature-requestRequest for new features or functionality labelApr 16, 2025
@karthiknadig
Copy link
Member

@kinto0 Please look into and accept the CLA. Otherwise we can't merge this.

kinto0 reacted with thumbs up emoji

Summary:Test Plan:Reviewers:Subscribers:Tasks:Tags:
Summary:Test Plan:Reviewers:Subscribers:Tasks:Tags:
@kinto0
Copy link
Author

@microsoft-github-policy-service agree [company="{your company}"]

@microsoft-github-policy-service agree [company="meta"]

@kinto0
Copy link
Author

@microsoft-github-policy-service agree company="your company"

@microsoft-github-policy-service agree company="meta"

kinto0and others added3 commitsApril 18, 2025 17:57
Summary:Test Plan:Reviewers:Subscribers:Tasks:Tags:
Summary:Test Plan:Reviewers:Subscribers:Tasks:Tags:
@kinto0kinto0 marked this pull request as ready for reviewApril 18, 2025 23:36
rchiodo
rchiodo previously approved these changesApr 18, 2025
Copy link

@Crazy40528Crazy40528 left a 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:
Summary:Test Plan:Reviewers:Subscribers:Tasks:Tags:
Summary:Test Plan:Reviewers:Subscribers:Tasks:Tags:
Summary:Test Plan:Reviewers:Subscribers:Tasks:Tags:
@vs-code-engineeringvs-code-engineeringbot added this to theApril 2025 milestoneApr 22, 2025
@karthiknadigkarthiknadig merged commit7fea432 intomicrosoft:mainApr 23, 2025
46 checks passed
facebook-github-bot pushed a commit to facebook/pyrefly that referenced this pull requestMay 7, 2025
…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: SamChou19815Differential Revision: D74327314fbshipit-source-id: 7d97476572731e8771af44af60c81d0d2334054d
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Crazy40528Crazy40528Crazy40528 left review comments

@DonJayamanneDonJayamanneDonJayamanne approved these changes

@karthiknadigkarthiknadigkarthiknadig approved these changes

@rchiodorchiodorchiodo left review comments

Assignees

@karthiknadigkarthiknadig

Labels
feature-requestRequest for new features or functionality
Projects
None yet
Milestone
April 2025
Development

Successfully merging this pull request may close these issues.

5 participants
@kinto0@rchiodo@karthiknadig@DonJayamanne@Crazy40528

[8]ページ先頭

©2009-2025 Movatter.jp