fix version switch by persist sys python in idfSetup #1384
+24
−6
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
Because ESP-IDF version now computes the virtual env python path from a
idf.pythonInstallPath
and current ESP-IDF version, there is an issue for v4.4.8 (uses embed Python 3.8) and v5.3.1 (use embed Python 3.11) calculates the wrong env path because this embed python is not persisted in idfSetup in extension global context. This leads to a wrong python env path calculated which failed the verification when showing the list of available IDF setups in the version switcher orESP-IDF: Configure ESP-IDF extension
command setup wizard.Fixes #1378
Type of change
Steps to test this pull request
ESP-IDF: Clear ESP-IDF Saved Setups
command.ESP-IDF: Configure ESP-IDF extension
to find existing ESP-IDF setup for v5.x.x. This will add this setup to the global extension context.ESP-IDF: Configure ESP-IDF extension
to find existing ESP-IDF setup for v4.4.x. This will add this setup to the global extension context.See that both ESP-IDF v5.3.1 and v4.4.8 are being shown in the list of existing setups in
ESP-IDF: Configure ESP-IDF extension
command setup wizard and status bar version switcher.See that both ESP-IDF v5.3.1 and v4.4.8 are being shown in the list of existing setups in
ESP-IDF: Configure ESP-IDF extension
command setup wizard and status bar version switcher.How has this been tested?
Manual testing as described above.
Test Configuration:
Checklist