Skip to content

Commit

Permalink
remove ccpp extension dependency (#1103)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianignacio5 authored Jan 25, 2024
1 parent 71784fe commit 872e4d2
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 59 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 5 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="https://nightly.link/espressif/vscode-esp-idf-extension/workflows/ci/master/esp-idf-extension.vsix.zip">Visual Studio Code</a> or <a href="https://nightly.link/espressif/vscode-esp-idf-extension/workflows/ci/master/esp-idf-extension-open.vsix.zip">OpenVSX</a>. You can use this VSIX to test the current github master of the extension by pressing <kbd>F1</kbd> and type `Install from VSIX` and then select the downloaded `.vsix` file to install.
**Nightly builds** for <a href="https://nightly.link/espressif/vscode-esp-idf-extension/workflows/ci/master/esp-idf-extension.vsix.zip">Visual Studio Code</a>. You can use this VSIX to test the current github master of the extension by pressing <kbd>F1</kbd> 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.

Expand Down
1 change: 0 additions & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <kbd>F5</kbd> to Run with Debugger, this will launch a new VSCode Extension Development Host to debug the extension.
Expand Down
2 changes: 1 addition & 1 deletion docs/C_CPP_CONFIGURATION.md
Original file line number Diff line number Diff line change
@@ -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?
Expand Down
1 change: 0 additions & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <kbd>F5</kbd> to Run with Debugger, this will launch a new VS Code Extension Development Host to debug the extension.
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/using-docker-container.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
23 changes: 2 additions & 21 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
2 changes: 0 additions & 2 deletions templates/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"idf.gitPath": "/usr/bin/git"
},
"extensions": [
"ms-vscode.cpptools",
"espressif.esp-idf-extension"
],
},
Expand All @@ -38,7 +37,6 @@
"idf.gitPath": "/usr/bin/git"
},
"extensions": [
"ms-vscode.cpptools",
"espressif.esp-idf-extension"
],
}
Expand Down

0 comments on commit 872e4d2

Please sign in to comment.