Skip to content

Commit c4c38b6

Browse files
Release/v2.0 (#1704)
* Pre-release of v2.0.0 (#1627) * draft eim integration * update init extension auto config * rm global state idf setups * do not show invalid extension when showOnboardingOnInit is false * rm duplicate code * update welcome show * fix new projext examples esp idf loading * update default esp_ide json file * add eim verify idf setup functions * update to eim_idf json file name * save settings as env variables * rm settings use customExtraVars instead * fix save docker settings * check empty customExtraVars PATH * fix getConfigurationSettings * rm old setup * fix lint * rm setup webpack update python in project test * use customextravars first * add selected workspace global config * use process env if customextra vars not available * default tools path * test doctor command * write customExtraVars from process env if available * fix workspace arg * update menuconfig test rm doc cmd * add PYTHON env var * log doctor command output clean project first * add missing timeout * test debug vscode * add PYTHON env var * add env PYTHON save settings * fallback on global state setups * escape activation script path if spaces * move IDF_PATH to workspace state, move frameworks settings to customExtraVars * update rm global setups * use env vars if idfSetups not defined, rm redudant code downloadManager and tests * read esp idf setups from esp_idf.json * await getConfigurationAccess * add logger init * fix IDF_TOOLS_PATH not defined if default * add PYTHON to env variables * change checkIdfSetup to isIdfSetupValid rm IEspIdfTool fields * remove env systemDriver use C in Windows default eim_idf json path * log activation script output * change to error logs * update activationScript split regex * fix IDF_PYTHON_ENV_PATH to envDict * loadIdfSetup save idf.gitPath * add path to prepareEnv * fix idf size ui * add idf setups in doctor command * add validation for eim load env setup * idfSetupToUse add validation * fix load idf.currentSetup * rm idf.espIdfPath from docs rm duplicate idfSetups use old idf.espIdfPath if no idf.currentSetup * add download extract install run eim from extension * fx linux exe call * use env shell for activation script * allow pick mirror eim download, add l10n for msg * fix errors * fix env vars in clang validate * use latest vscode-extension-tester * use eimPath field in eim_idf json to open existing executable if exists * rm idf setup validation, only in doctor cmd * fix checkPyVenv object * rm idf.toolsPath reference * use idf toolsPath old setting to find esp_idf json file * rm use of ESP_IDF_VERSION in status bar * add missing v for idf version * update walkthrough install step * add idf.eimExecutableArgs for eim gui or cli * use & intead of launch process * make sure that eim_unified_release is not cached, rm quote * close notifications befor doctor cmd * mv dismiss to before * fix lint * fix ts issues * use default tools path instead of temp for eim download * add default EIM locations to match Espressif IDE and use EIM_PATH * test json reporter no use of docker * add expected test env vars * add results in console too, rm actions idf fix doctor test * replace user path in doctor test * test using e2e ui reports * test extester mocha options * update options as object * update reporter option * try to parse json from console * fix console output parsing * update console output parse error handle * clean json step * update test log to test locally * rm text after closing json * update end regex * update parsing with test data * fail on test error * update bulma packages and use new syntax * fix eim call (#1699) * fix eraseFlash task issues * fix yarn compile * test using 5.4.2 * test use espressif install-esp-idf-action in ci * rm use of export sh in ci * Update eim call after download * try to use eim from PATH if available * fix lint issues * fix size cmd * fix workspace erase flash task * desc order idf setups add changelog release notes * update release notes * fix reference to old settings in hint viewer langTool and serial functions * fix docs * fix openocd paths for devkits * update docs and screenshots add wsl eim run install new project load idf setup within progress status * rm ref to old examples cmd for new project wizard * changes in walkthrough and docs * fix docs zh cn * fix doc * fix zh doc * update wsl download run eim * fix terminal focus eim
1 parent b226eeb commit c4c38b6

File tree

266 files changed

+5148
-11413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+5148
-11413
lines changed

.github/actions/idf/Dockerfile

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/actions/idf/action.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/actions/idf/entrypoint.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/actions/idf/ui-entrypoint.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,45 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
submodules: "recursive"
19-
- uses: actions/setup-node@v4
19+
20+
- name: Install ESP-IDF
21+
uses: espressif/install-esp-idf-action@v1
2022
with:
21-
node-version: 20
23+
version: "v5.4.2"
2224

23-
- name: Install Node Dependencies
24-
run: yarn
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
2529

26-
- name: Lint Check
27-
run: yarn lint
30+
- name: Install Yarn dependencies
31+
run: |
32+
yarn
33+
yarn install
2834
29-
- name: Run test
30-
uses: ./.github/actions/idf
31-
id: idftest
35+
- name: Run Yarn script with xvfb
36+
run: |
37+
export GIT_VERSION=$(git --version | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
38+
export IDF_VERSION=$(idf.py --version | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
39+
export PY_VERSION=$(python --version | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
40+
export PIP_VERSION=$(python -m pip --version | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
41+
export PY_PKGS=$(python -m pip list --format json)
42+
xvfb-run --auto-servernum yarn test
3243
33-
- name: Get the test output
34-
run: echo "${{ steps.idftest.outputs.result }}" | tee test-result.xml
44+
- name: Publish Test Report
45+
uses: dorny/test-reporter@v2
46+
if: always()
47+
with:
48+
name: Mocha Tests
49+
path: ./out/results/test-results.json
50+
reporter: mocha-json
3551

3652
- name: Upload if failed test results
3753
uses: actions/upload-artifact@v4
3854
if: failure()
3955
with:
40-
name: test-result.xml
41-
path: test-result.xml
56+
name: test-result.json
57+
path: ./out/results/test-results.json
4258

4359
- name: Package .vsix
4460
run: yarn package

.github/workflows/ui-test.yml

Lines changed: 89 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,9 @@ jobs:
1818
submodules: "recursive"
1919

2020
- name: Install ESP-IDF
21-
run: |
22-
ESP_IDF_VERSION="v5.3.2"
23-
sudo apt update
24-
sudo apt install -y python3-pip git wget flex bison gperf python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util
25-
wget https://dl.espressif.com/github_assets/espressif/esp-idf/releases/download/${ESP_IDF_VERSION}/esp-idf-${ESP_IDF_VERSION}.zip -O esp-idf.zip
26-
unzip esp-idf.zip -d ~/
27-
rm esp-idf.zip
28-
mv ~/esp-idf-${ESP_IDF_VERSION} ~/esp-idf
29-
~/esp-idf/install.sh
21+
uses: espressif/install-esp-idf-action@v1
22+
with:
23+
version: "v5.4.2"
3024

3125
- name: Setup Node.js
3226
uses: actions/setup-node@v4
@@ -40,9 +34,92 @@ jobs:
4034
4135
- name: Run Yarn script with xvfb
4236
run: |
43-
export IDF_TOOLS_PATH=~/.espressif
44-
export IDF_PATH=~/esp-idf
45-
source ~/esp-idf/export.sh && xvfb-run --auto-servernum yarn ci-test
37+
xvfb-run --auto-servernum yarn ci-test 2>&1 | tee test-output.log
38+
39+
# Extract JSON from the output and save to file
40+
echo "Extracting JSON from test output..."
41+
if grep -q "Extension 'espressif.esp-idf-extension' was successfully uninstalled!" test-output.log; then
42+
sed -n '/Extension '\''espressif.esp-idf-extension'\'' was successfully uninstalled!/,$p' test-output.log > after-uninstall.log
43+
grep -n '{' after-uninstall.log | head -1 | cut -d: -f1 > start-line.txt
44+
grep -n '}' after-uninstall.log | tail -1 | cut -d: -f1 > end-line.txt
45+
if [ -s start-line.txt ] && [ -s end-line.txt ]; then
46+
start_line=$(cat start-line.txt)
47+
end_line=$(cat end-line.txt)
48+
sed -n "${start_line},${end_line}p" after-uninstall.log > ./out/ui-test-results.json
49+
sed 's/}[^,]*$/}/' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
50+
sed '/INFO:/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
51+
sed '/Screenshots of failures can be found in:/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
52+
sed '/\x1b\[/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
53+
sed '/\[33m/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
54+
sed '/\[0m/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
55+
sed '/test-resources\/screenshots\//d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
56+
echo "JSON results extracted and saved to ./out/ui-test-results.json"
57+
echo "Debug: Last 10 lines of the JSON file:"
58+
tail -10 ./out/ui-test-results.json
59+
else
60+
echo "Could not find JSON boundaries"
61+
fi
62+
rm -f after-uninstall.log start-line.txt end-line.txt ./out/temp.json
63+
else
64+
echo "Uninstall message not found, trying to extract JSON from entire output..."
65+
if grep -q '{' test-output.log; then
66+
grep -n '{' test-output.log | head -1 | cut -d: -f1 > start-line.txt
67+
grep -n '}' test-output.log | tail -1 | cut -d: -f1 > end-line.txt
68+
if [ -s start-line.txt ] && [ -s end-line.txt ]; then
69+
start_line=$(cat start-line.txt)
70+
end_line=$(cat end-line.txt)
71+
sed -n "${start_line},${end_line}p" test-output.log > ./out/ui-test-results.json
72+
sed 's/}[^,]*$/}/' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
73+
sed '/INFO:/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
74+
sed '/Screenshots of failures can be found in:/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
75+
sed '/\x1b\[/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
76+
sed '/\[33m/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
77+
sed '/\[0m/d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
78+
sed '/test-resources\/screenshots\//d' ./out/ui-test-results.json > ./out/temp.json && mv ./out/temp.json ./out/ui-test-results.json
79+
echo "JSON results extracted and saved to ./out/ui-test-results.json"
80+
echo "Debug: Last 10 lines of the JSON file:"
81+
tail -10 ./out/ui-test-results.json
82+
else
83+
echo "Could not find JSON boundaries"
84+
fi
85+
rm -f start-line.txt end-line.txt ./out/temp.json
86+
else
87+
echo "No JSON found in test output"
88+
fi
89+
fi
90+
91+
- name: Print UI Test Results
92+
run: |
93+
echo "=== UI Test Results ==="
94+
if [ -f "./out/ui-test-results.json" ]; then
95+
echo "UI Test Results:"
96+
cat ./out/ui-test-results.json | jq '.' || echo "Could not parse UI test results"
97+
elif [ -f "./test-results.json" ]; then
98+
echo "UI Test Results:"
99+
cat ./test-results.json | jq '.' || echo "Could not parse UI test results"
100+
else
101+
echo "No UI test results file found"
102+
echo "Checking for other test output files:"
103+
find . -name "*test*results*" -o -name "*ui-test-results.json*" | head -10
104+
fi
105+
106+
- name: Publish UI Test Report
107+
uses: dorny/test-reporter@v2
108+
if: always()
109+
with:
110+
name: UI Tests
111+
path: ./out/ui-test-results.json
112+
reporter: mocha-json
113+
114+
- name: Upload UI test results
115+
uses: actions/upload-artifact@v4
116+
if: always()
117+
with:
118+
name: ui-test-results
119+
path: |
120+
./out/ui-test-results.json
121+
./test-resources/screenshots/
122+
test-output.log
46123
47124
- name: Upload screenshots
48125
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
dist
22
esp_idf_docs_index_lang_*.json
3-
esp_idf_versions_cache.json
43
local-utils
54
out
65
node_modules
@@ -11,7 +10,7 @@ testFiles/blink
1110
!testFiles/dist
1211
testFiles/tools
1312
testFiles/testWorkspace/build
14-
testFiles/testWorkspace/sdkconfig.*
13+
testFiles/testWorkspace/sdkconfig*
1514
*.log
1615
.DS_Store
1716
bandit_output.txt

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#files
2-
idf_versions.txt
32
*.log
43
.vscodeignore
54
.style.yapf

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@
88

99
All notable changes to the "Espressif IDF" extension will be documented in this file.
1010

11+
## [2.0.2](https://github.com/espressif/vscode-esp-idf-extension/releases/tag/v2.0.2)
12+
13+
## Features and enhancements
14+
15+
**Replace how ESP-IDF and ESP-IDF Tools is installed and configured in the extension.** The `ESP-IDF: Configure ESP-IDF extension` and extension settings such as `idf.espIdfPath`and `idf.toolsPath` are removed in favor of using our new [Espressif Install Manager (EIM)](https://docs.espressif.com/projects/idf-im-ui/en/latest/). While old ESP-IDF setup should still work to ease the transition, new ESP-IDF setup are expected to use EIM.
16+
See the new [Install documentation](https://docs.espressif.com/projects/vscode-esp-idf-extension/en/latest/installation.html)
17+
18+
- [EIM integration and removal of extension settings such as idf.espIdfPath and idf.toolsPath in favor of environment variables saved as extension global store state](https://github.com/espressif/vscode-esp-idf-extension/pull/1704)
19+
- [Show templates before configuration in New Project Wizard](https://github.com/espressif/vscode-esp-idf-extension/pull/1757)
20+
- [Debug image viewer and also view C image array from files](https://github.com/espressif/vscode-esp-idf-extension/pull/1644) You can configure for OpenCV, LVGL and any custom data types as long as you provide a image C UInt8Array and size length.
21+
- [Remove old debug adapter, ESP-MDF, ESP-Matter and ESP-HomeKit](https://github.com/espressif/vscode-esp-idf-extension/pull/1693). Many of these framework are available in the ESP Component Registry. We are keeping ESP-ADF though.
22+
23+
## Bug Fixes
24+
25+
- [Show ESP-IDF versions in descending order](https://github.com/espressif/vscode-esp-idf-extension/pull/1704)
26+
1127
## [1.11.1](https://github.com/espressif/vscode-esp-idf-extension/releases/tag/v1.11.1)
1228

1329
## Bug Fixes

0 commit comments

Comments
 (0)