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

[VSC-1521] use idf tools export to get env vars #1343

Merged
merged 9 commits into from
Nov 22, 2024

Conversation

brianignacio5
Copy link
Collaborator

Description

Use idf_tools.py export --format key-value to get ESP-IDF variables required in environment variables.

This should fix missing ESP_IDF_VERSION from extension tasks and use PATH from idf_tools.py (which is already done but could replace extension implementation.)

Type of change

Please delete options that are not relevant.

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

Steps to test this pull request

Probably the best way to verify that variables are present is to open ESP-IDF: Open ESP-IDF Terminal and do echo $ESP_IDF_VERSION or other environment variable from idf_tools.py export output.

You can also test with any command like ESP-IDF: Build your project but harder to see if variables are available.

  • Expected behaviour:

All variables from idf_tools.py export --format key-value should be available in extension commands like ESP-IDF: Open ESP-IDF Terminal

Test Configuration:

  • ESP-IDF Version: 4.4 , 4.4.8, 5.0.4 5.4
  • OS (Windows,Linux and macOS): macOS Windows

Checklist

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

@brianignacio5 brianignacio5 added this to the 1.9.0 milestone Nov 18, 2024
@brianignacio5 brianignacio5 self-assigned this Nov 18, 2024
Copy link

github-actions bot commented Nov 18, 2024

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.

@Fabricio-ESP
Copy link
Collaborator

I installed the extension and I keep getting error when attempting to build the example project.
image
Error after build.txt

@brianignacio5
Copy link
Collaborator Author

brianignacio5 commented Nov 20, 2024

I have updated the PR with changes to fix this issue. Please take a look again @Fabricio-ESP

@Fabricio-ESP Fabricio-ESP changed the title use idf tools export to get env vars [VSC-1521] use idf tools export to get env vars Nov 21, 2024
Copy link
Collaborator

@radurentea radurentea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I would have liked if the ESP-IDF version would return the entire version, but I see this is what is being returned by the "export" command. I've tested it with esp idf "5.3.1" version and the version I see in doctor command is "5.3"

Copy link
Collaborator

@Fabricio-ESP Fabricio-ESP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed working on Windows and Linux, running IDF 5.0, 5.3 and 5.4

@brianignacio5 brianignacio5 merged commit cdb24ff into master Nov 22, 2024
6 checks passed
@brianignacio5 brianignacio5 deleted the bugfix/idf-tools-export-vars branch November 22, 2024 00:49
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.

3 participants