Skip to content
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

fix version switch by persist sys python in idfSetup #1384

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brianignacio5
Copy link
Collaborator

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 or ESP-IDF: Configure ESP-IDF extension command setup wizard.

Fixes #1378

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Steps to test this pull request

  1. Delete current global context IDF Setups by running the ESP-IDF: Clear ESP-IDF Saved Setups command.
  2. Use the 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.
  3. Use the 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.
  4. Click on "ESP-IDF: Configure ESP-IDF extension". See that both ESP-IDF v5.3.1 and v4.4.8 are being shown in the list of existing setups.
  • Expected behaviour:

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.

  • Expected output:

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:

  • ESP-IDF Version: 5.3.1 and v4.4.8
  • OS (Windows,Linux and macOS): Windows (this was not an issue in MacOS or Linux as system python is the same among esp-idf versions)

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

@brianignacio5 brianignacio5 self-assigned this Dec 25, 2024
Copy link

Download the artifacts for this pull request:
You can test these changes by installing this VSIX by click menu View -> Command Palette..., type Install from VSIX and then select downloaded esp-idf-extension.vsix file to install the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to support multiple ESP-IDF versions simultaneously on v1.9.0 extension (VSC-1546)
1 participant