-
Notifications
You must be signed in to change notification settings - Fork 320
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
Enhance/hints viewer openocd #1476
base: master
Are you sure you want to change the base?
Conversation
- Refactor code - Add Translations
- fix errors related to errorHints view
- change === to includes - remove checking for openOCD hints, hints from openocd will not be present in text editor
Download the artifacts for this pull request: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some code suggestions to simplify functionality.
"iis.configDir": "", | ||
"idf.pythonInstallPath": "/opt/homebrew/bin/python3", | ||
"idf.espIdfPath": "/Users/radurentea/esp/v5.4/esp-idf", | ||
"idf.toolsPath": "/Users/radurentea/esp/esptools" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove local settings set here.
const openOCDManager = OpenOCDManager.init(); | ||
const version = await openOCDManager.version(); | ||
|
||
if (!version) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think running openOCD just to see if the openOCD hints file exists is not necessary. A simply pathExists
should be faster and easier no ?
return null; | ||
} | ||
|
||
const hintsPath = path.join( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also getting the openOCD Hints YAML path is duplicated both here and in the openocdHInt.ts
.
We could export the function and reuse it here ?
public async initialize(): Promise<void> { | ||
try { | ||
// Check OpenOCD version first | ||
const openOCDManager = OpenOCDManager.init(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can check the yaml file exists first and then check openOCD version. Actually if openOCD has the file, we could argue that openOCD does support the feature.
We could think about this, it could simplify load time here.
Description
This enhancement:
- Focus on the ESP-IDF hints bottom panel
- Mutes "Found Hint" notification for this VS Code session (until VS Code is closed)
Type of change
Steps to test this pull request
v0.12.0-esp32-20250226
). List of error-hints pair is taken from:<ESP_TOOLS_INSTALLATION_PATH>/tools/openocd-esp32/<OPEN_OCD_VERSION>/openocd-esp32/share/openocd/espressif/tools/esp_problems_hints.yml
<ESP_IDF_INSTALLATION_PATH>/<ESP_IDF_VERSION>/esp-idf/tools/idf_py_actions/hints.yml
How has this been tested?
As described above
Test Configuration:
Checklist