From 872e4d2b6a2d9f0ac2974e6e244b5a0899a33bfe Mon Sep 17 00:00:00 2001 From: "Brian A. Ignacio" Date: Thu, 25 Jan 2024 16:16:04 +0800 Subject: [PATCH] remove ccpp extension dependency (#1103) --- .github/workflows/ci.yml | 9 --------- .github/workflows/release.yml | 24 +++++------------------ README.md | 2 +- docs/CONTRIBUTING.md | 1 - docs/C_CPP_CONFIGURATION.md | 2 +- docs/INSTALL.md | 1 - docs/tutorial/using-docker-container.md | 2 +- gulpfile.js | 23 ++-------------------- package.json | 5 ++--- templates/.devcontainer/devcontainer.json | 2 -- 10 files changed, 12 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96693860f..98292f6bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,15 +43,6 @@ jobs: name: test-result.xml path: test-result.xml - - name: Package open .vsix - run: yarn packageWithoutDependencies - - - name: Upload no dependencies .vsix File - uses: actions/upload-artifact@v1 - with: - name: esp-idf-extension-open.vsix - path: esp-idf-extension-open.vsix - - name: Package .vsix run: yarn package diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2106f2784..281e484d5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,9 +23,6 @@ jobs: - name: Install Dependencies run: yarn - - name: Package open .vsix - run: yarn run packageWithoutDependencies - - name: Create Release id: create_release uses: actions/create-release@v1.0.0 @@ -50,22 +47,6 @@ jobs: id: version run: echo "version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT - - name: Upload no dependencies release asset - id: upload-open-release-asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./esp-idf-extension-open.vsix - asset_name: esp-idf-extension-open-${{ steps.version.outputs.version }}.vsix - asset_content_type: application/zip - - - name: OpenVSX release - run: yarn run open-vsx-release - env: - OPENVSX_MARKETPLACE_TOKEN: ${{ secrets.OPENVSX_MARKETPLACE_TOKEN }} - - name: VSIX Package run: yarn run package @@ -84,3 +65,8 @@ jobs: run: yarn run release env: VS_MARKETPLACE_TOKEN: ${{ secrets.VS_MARKETPLACE_TOKEN }} + + - name: OpenVSX release + run: yarn run open-vsx-release + env: + OPENVSX_MARKETPLACE_TOKEN: ${{ secrets.OPENVSX_MARKETPLACE_TOKEN }} diff --git a/README.md b/README.md index 8ad0dfd89..21d6fa901 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Develop, build, flash, monitor, [debug](./docs/DEBUGGING.md) and [more](./docs/FEATURES.md) with Espressif chips using Espressif IoT Development Framework [(ESP-IDF)](https://github.com/espressif/esp-idf) -**Nightly builds** for Visual Studio Code or OpenVSX. You can use this VSIX to test the current github master of the extension by pressing F1 and type `Install from VSIX` and then select the downloaded `.vsix` file to install. +**Nightly builds** for Visual Studio Code. You can use this VSIX to test the current github master of the extension by pressing F1 or click menu `View` -> `Command Palette...`, type `Install from VSIX` and then select the previously downloaded `.vsix` file to install the extension. Make sure to review our [documentation](./docs/ONBOARDING.md) first to properly use the extension. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 97492b13a..c39047793 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -7,7 +7,6 @@ There are many ways that you can contribute, and this document will provide you ## Build from Source Code - Install [Node.js](https://nodejs.org/en/) -- Make sure have the [C/C++ Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) from Visual Studio Code Marketplace. - Clone this repository `git clone --recursive https://github.com/espressif/vscode-esp-idf-extension.git` - Install all the dependencies using `yarn`. - Open the project in Visual Studio Code and press F5 to Run with Debugger, this will launch a new VSCode Extension Development Host to debug the extension. diff --git a/docs/C_CPP_CONFIGURATION.md b/docs/C_CPP_CONFIGURATION.md index 7358907bd..80a3abec2 100644 --- a/docs/C_CPP_CONFIGURATION.md +++ b/docs/C_CPP_CONFIGURATION.md @@ -1,6 +1,6 @@ # Configuration of c_cpp_properties.json File -The [C/C++ Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) is used to provide C and C++ syntax highlight, code navigation and Go to declaration/definition within C and C++ files. +The [C/C++ Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) can be used to provide C and C++ syntax highlight, code navigation and Go to declaration/definition within C and C++ files. The default configuration file is located in `{PROJECT_DIR}/.vscode/c_cpp_properties.json` and can be generated by using **ESP-IDF: Create Project from Extension Template** command or using the **ESP-IDF: Add .vscode Configuration Folder** command. ## Why configure this file? diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 1dee678c9..bbbb3eb48 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -24,7 +24,6 @@ To install from `.vsix` File: ## Build from Source Code - Install [Node.js](https://nodejs.org/en/) -- Make sure have the [C/C++ Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) from Visual Studio Code Marketplace. - Clone this repository `git clone --recursive https://github.com/espressif/vscode-esp-idf-extension.git` - Install all the dependencies, using `yarn` - Press F5 to Run with Debugger, this will launch a new VS Code Extension Development Host to debug the extension. diff --git a/docs/tutorial/using-docker-container.md b/docs/tutorial/using-docker-container.md index af8462bdc..1cafc787f 100644 --- a/docs/tutorial/using-docker-container.md +++ b/docs/tutorial/using-docker-container.md @@ -191,7 +191,7 @@ For more information about `devcontainer.json`, please refer to the comments. "idf.gitPath": "/usr/bin/git" }, /* An array of extensions that should be installed into the container. */ - "extensions": ["ms-vscode.cpptools", "espressif.esp-idf-extension"], + "extensions": ["espressif.esp-idf-extension"], /* start the container with privileged mode, else the devices cannot be accessed on the docker image. */ "runArgs": ["--privileged"] diff --git a/gulpfile.js b/gulpfile.js index 7e8b44eb0..d79b0b237 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -112,29 +112,10 @@ function validateLocalizationFiles(done) { done(); } -async function addExtensionDependencies(done) { - const packageJson = await readJSON("package.json"); - packageJson.extensionDependencies = ["ms-vscode.cpptools"]; - await writeJSON("package.json", packageJson, { spaces: 2 }); - done(); -} - -async function removeExtensionDependencies(done) { - const packageJson = await readJSON("package.json"); - if (packageJson.extensionDependencies) { - packageJson.extensionDependencies = undefined; - await writeJSON("package.json", packageJson, { spaces: 2}); - } - done(); -} - -const preBuild = gulp.series(clean, addI18n, validateLocalizationFiles); -const build = gulp.series(preBuild, addExtensionDependencies); -exports.clean = gulp.series(clean, removeExtensionDependencies); +const build = gulp.series(clean, addI18n, validateLocalizationFiles); +exports.clean = clean; exports.build = build; exports.validateLocalization = validateLocalizationFiles; exports.publish = gulp.series(build, vscePublish); exports.vscePkg = gulp.series(build, vscePackage); exports.default = build; -exports.removeExtensionDependencies = removeExtensionDependencies; -exports.noDepBuild = gulp.series(preBuild, removeExtensionDependencies); diff --git a/package.json b/package.json index 7713e0e65..17875bd14 100644 --- a/package.json +++ b/package.json @@ -1490,13 +1490,12 @@ "compile": "rimraf out && tsc -p ./", "watch": "webpack --watch --mode development", "test": "yarn compile && node ./out/test/runTest.js --VERBOSE 2>&1", - "package": "gulp build && vsce package --yarn -o esp-idf-extension.vsix && gulp removeExtensionDependencies", + "package": "gulp build && vsce package --yarn -o esp-idf-extension.vsix", "release": "vsce publish --yarn -p ${VS_MARKETPLACE_TOKEN} --packagePath esp-idf-extension.vsix", - "open-vsx-release": "ovsx publish esp-idf-extension-open.vsix -p ${OPENVSX_MARKETPLACE_TOKEN}", + "open-vsx-release": "ovsx publish esp-idf-extension.vsix -p ${OPENVSX_MARKETPLACE_TOKEN}", "clean": "gulp clean", "validateLocalization": "gulp validateLocalization", "webpack": "webpack --mode production", - "packageWithoutDependencies": "gulp noDepBuild && vsce package --yarn -o esp-idf-extension-open.vsix", "ui-test": "yarn compile && extest setup-and-run -y -i -u -l DEBUG -o testFiles/testWorkspace/.vscode/settings.json 'out/ui-test/*-test.js'", "ci-test": "yarn compile && extest setup-and-run './out/ui-test/*-test.js' -u -s test-resources -l DEBUG" }, diff --git a/templates/.devcontainer/devcontainer.json b/templates/.devcontainer/devcontainer.json index e7b65465f..0eab69fd1 100644 --- a/templates/.devcontainer/devcontainer.json +++ b/templates/.devcontainer/devcontainer.json @@ -24,7 +24,6 @@ "idf.gitPath": "/usr/bin/git" }, "extensions": [ - "ms-vscode.cpptools", "espressif.esp-idf-extension" ], }, @@ -38,7 +37,6 @@ "idf.gitPath": "/usr/bin/git" }, "extensions": [ - "ms-vscode.cpptools", "espressif.esp-idf-extension" ], }