Skip to content

Conversation

@brianignacio5
Copy link
Collaborator

@brianignacio5 brianignacio5 commented Sep 19, 2025

  1. rm serial port chip id error in telemetry
  2. use node os arch instead of executing child process.
  3. check binary is in path before version in idfToolsManager checkBinaryVersion.

Description

This pull request introduces several improvements and refactors across the codebase, focusing mainly on platform detection, error logging, telemetry control, and code clarity. The most significant changes are the simplification of platform and architecture detection logic, enhanced control over error reporting to telemetry, and improved consistency in error handling throughout the project.

Platform detection and architecture handling:

  • Refactored PlatformInformation.GetPlatformInformation() to synchronously determine platform and architecture using os.platform() and os.arch(), removing all asynchronous child process calls and mapping architectures directly. This simplifies platform detection and removes unnecessary complexity. [1] [2]
  • Updated usages of PlatformInformation.GetPlatformInformation() throughout the codebase to reflect the new synchronous implementation. [1] [2] [3]

Error logging and telemetry control:

  • Added a sendToTelemetry option to the ISpawnOptions interface and integrated it into the spawn and Logger.errorNotify functions, allowing fine-grained control over which errors are sent to telemetry. Updated related function calls to utilize this option. [1] [2] [3] [4] [5] [6] [7]
  • Improved error handling in several places to ensure that only relevant errors are sent to telemetry, reducing noise and improving the quality of telemetry data. [1] [2] [3]

General code improvements and bug fixes:

  • Cleaned up error and warning message handling, including more robust detection of warnings and improved output formatting in multiple classes. [1] [2]
  • Improved consistency and readability of code by formatting and splitting long lines, and updating callback parameter types for clarity. [1] [2] [3] [4] [5] [6]
  • Updated logger to capture command metadata for improved error context.

Tool management and validation:

  • Added a check in IdfToolsManager to verify if a binary is in the system path before attempting to retrieve its version, preventing unnecessary errors when tools are missing.

Test and setup adjustments:

  • Updated unit tests and setup imports to reflect changes in platform detection and removed unused imports. [1] [2]

Fixes #XXX

Type of change

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

Steps to test this pull request

Provide a list of steps to test changes in this PR and required output

  1. Click on "New Project Wizard". If any setup is invalid, errors should not be shown in the ESP-IDF output channel.
  2. Run the ESP-IDF: Configure ESP-IDF Extension. The setup should install tools corresponding to the current OS and architecture.
  3. Execute action.
  4. Observe results.
  • Expected behaviour:

  • Expected output:

How has this been tested?

Manual test as above.

Test Configuration:

  • ESP-IDF Version: 5.5.1
  • OS (Windows,Linux and macOS): macOS

Checklist

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

@github-actions
Copy link

github-actions bot commented Sep 22, 2025

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.

@brianignacio5 brianignacio5 changed the title Bugfixes for v1.11.0 based on Telemetry Bugfixes for v1.11.0 based on Telemetry (VSC-1769) Sep 22, 2025
@brianignacio5 brianignacio5 added this to the v1.11.0 milestone Sep 22, 2025
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

@Fabricio-ESP Fabricio-ESP changed the title Bugfixes for v1.11.0 based on Telemetry (VSC-1769) [VSC-1769] Bugfixes for v1.11.0 based on Telemetry Oct 1, 2025
@brianignacio5 brianignacio5 merged commit 95f78ec into master Oct 13, 2025
6 of 7 checks passed
@brianignacio5 brianignacio5 deleted the bugfix/determine-platform-arch branch October 13, 2025 06:27
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.

4 participants