-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Expose interpreter path using API #11294
Comments
formulahendry/vscode-code-runner#604 (comment): We've to make sure all these 4 cases work,
Proposed changesCode runner In the new version of code runner, We would check if user is using the old or the new python extension using the new setting.
Python extension
How to check from extension A if user is using the old version of extension B or the new one Introduce a flag in Python extension
"featureFlags": {
"usingNewInterpreterStorage": true
} So you can access the flag using, const extension = vscode.extensions.getExtension('ms-python.python')!;
const flagValue = extension.packageJSON.featureFlags.usingNewInterpreterStorage; Code runner Please add a similar flag in const extension = vscode.extensions.getExtension('ms-python.python')!;
if (!extension.isActive) {
await extension.activate();
}
const pythonPath = extension.exports.settings.getInterpreterPath(resource); Note we will have to release Code runnner extension first, followed by the extension release. (which is targeted before May 12) |
THIS WILL SOON BE REMOVED. CHECK #12596 FOR THE UPDATED DESIGN PROPOSAL
This code snippet shows how to use the new API, could be helpful.
Update the API as follows by adding a
settings
section,The text was updated successfully, but these errors were encountered: