Draft
Conversation
Leverages the `ms-python.python` extension and its node API in order to softly detect if the extension is present. If present it will activate it, search for the "correct" environment and install the package there. The choice of the environment is purely dependant on the rules imposed in `ms-python.python`. The user can select an interpreter via the the command palette, but this is a suboptimal Fortran user experience, since detection and messages about missing fortls pop up before the user can do that (realistically at least). In addition, changes in Python environments are not propagated. Watch events need to be added and detection/installation/execution needs be redone in such cases. This only takes care of the installation process but does nothing for the detection/execution of the binaries. Consequently, if replacing naively `pipInstall` with `installPythonPackage` things will fail. The detection, execution and installation need to me rewritten in a cohesive way without duplication. Paths need to be cached and resolve wrt user inputs from the configs. For multi-root workspaces, with different Python environments this could trigger a cascade of installs, which might or might not be the intended behaviour. BREAKING CHANGE: using `@vscode/python-extension` requires bumping the minimum vscode engine and types to ^1.78.0. Outdated vscode installations will not work anymore! Fixes #1273
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1290 +/- ##
=======================================
Coverage 81.65% 81.65%
=======================================
Files 13 13
Lines 2436 2437 +1
Branches 202 202
=======================================
+ Hits 1989 1990 +1
Misses 442 442
Partials 5 5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Leverages the
ms-python.pythonextension and its node APIin order to softly detect if the extension is present.
If present it will activate it, search for the "correct" environment
and install the package there.
The choice of the environment is purely dependant on the rules
imposed in
ms-python.python. The user can select an interpretervia the the command palette, but this is a suboptimal Fortran user
experience, since detection and messages about missing fortls
pop up before the user can do that (realistically at least).
In addition, changes in Python environments are not propagated.
Watch events need to be added and detection/installation/execution
needs be redone in such cases.
This only takes care of the installation process but does nothing
for the detection/execution of the binaries. Consequently, if replacing
naively
pipInstallwithinstallPythonPackagethings will fail.The detection, execution and installation need to me rewritten
in a cohesive way without duplication.
Paths need to be cached and resolve wrt user inputs from the configs.
For multi-root workspaces, with different Python environments this
could trigger a cascade of installs, which might or might not be the
intended behaviour.
BREAKING CHANGE: using
@vscode/python-extensionrequires bumping the minimum vscode engine and types to ^1.78.0.Outdated vscode installations will not work anymore!
Fixes #1273