This repository has been archived by the owner on Dec 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Removing dependency on pythonPath setting #384
Open
luabud
wants to merge
3
commits into
microsoft:dev
Choose a base branch
from
luabud:fixpythonpathdep
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smmatte
reviewed
Oct 27, 2020
.vscode/settings.json
Outdated
}, | ||
"python.linting.pylintArgs": [ | ||
"--init-hook", | ||
"import sys; sys.path.extend([\"\"c:\\\\Users\\\\luabud\\\\.vscode\\\\extensions\\\\ms-python.devicesimulatorexpress-2020.0.36321\\\\out\"\",\"\"c:\\\\Users\\\\luabud\\\\.vscode\\\\extensions\\\\ms-python.devicesimulatorexpress-2020.0.36321\\\\out\\\\micropython\"\",\"\"c:\\\\Users\\\\luabud\\\\.vscode\\\\extensions\\\\ms-python.devicesimulatorexpress-2020.0.36321\\\\out\\\\clue\"\",\"\"c:\\\\Users\\\\luabud\\\\.vscode\\\\extensions\\\\ms-python.devicesimulatorexpress-2020.0.36321\\\\out\\\\base_circuitpython\"\"])" |
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.
This is your local path, please remove
isadorasophia
approved these changes
Apr 6, 2021
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.
🤩
originalPythonExecutablePath = getConfig(CONFIG.PYTHON_PATH); | ||
const extension = vscode.extensions.getExtension("ms-python.python"); | ||
const usingNewInterpreterStorage = extension.packageJSON?.featureFlags?.usingNewInterpreterStorage; | ||
if (usingNewInterpreterStorage) { |
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.
Add a comment explaining that the python extension is deprecating the old path? As we are still falling back to it if the new interpreter storage is not set
const execCommand = extension.exports.settings.getExecutionDetails ? | ||
extension.exports.settings.getExecutionDetails().execCommand : | ||
extension.exports.settings.getExecutionCommand(); | ||
originalPythonExecutablePath = execCommand.join(" "); |
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.
Suggested change
originalPythonExecutablePath = execCommand.join(" "); | |
originalPythonExecutablePath = execCommand.join(" "); | |
nit: extra tab 😁
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
The Python extension is deprecating the python.pythonPath setting, which the DSX extension relies on.
Type of change
Please delete options that are not relevant.
Limitations:
Testing:
This is what I've done to test the changes:
Run "Developer: Reload Window"
Added a breakpoint to line 183 of src\service\setupService.ts to see the value of originalPythonExecutablePath changing to the right environment that was selected in the workspace.
Checklist:
npm run format
and passes the checks innpm run check