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

✨ Hoist linker (ld) errors to VS Code 'Problems' window (VSC-1502) #1317

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

GillesZunino
Copy link
Contributor

Description

When building a project in VS Code ESP IDF Extension (v 1.8.1), any linker error is reported in the terminal. These errors are not reported in the 'Problems' list of VS Code. Users have to sift through the build log and extract linker errors. This can also confuse new users as ESP IDF will say "build failed" and the problems list will be empty.

image

Fixes #1315

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Steps to test this pull request

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

  1. Open any ESP-IDF project in VS Code,
  2. Ensure there is at least one or more linker (ld) errors. A simple way to create an ld error is to rename 'app_main' to 'app_mainXXX',
  3. Build project in VS Code by clicking the wrench icon (Build).
  • Expected behaviour:
  1. Linker (ld) errors appear in the VS Code 'Problems' window.
  2. Errors are clickable and will navigate to the adequate source file, at the correct line

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Perform the steps 1 to 3 above
  • Add missing variables (extern int foo) in the code and observe the error is properly captured

Test Configuration:

  • ESP-IDF Version: v5.3.0, v5.3.1
  • OS: Windows, Linux (on WSL)

Dependent components impacted by this PR:

N/A

Checklist

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

@GillesZunino GillesZunino changed the title Hoist linker (ld) errors to VS Code 'Problems' window ✨ Hoist linker (ld) errors to VS Code 'Problems' window Sep 24, 2024
@brianignacio5
Copy link
Collaborator

Thank you for the fix !

@brianignacio5 brianignacio5 merged commit bdadcd0 into espressif:master Oct 8, 2024
6 checks passed
@github-actions github-actions bot changed the title ✨ Hoist linker (ld) errors to VS Code 'Problems' window ✨ Hoist linker (ld) errors to VS Code 'Problems' window (VSC-1502) Oct 8, 2024
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.

[Feature Request]: Add linker (ld) failures to VS Code 'Problems' window (VSC-1492)
2 participants