Skip to content

Commit e91c6b1

Browse files
authored
Remove standalone utility (#767)
It's gotten very little use, is obscenely big for the very little functionality it has, and it forces this weird shared library structure that npm/TS was not meant to handle easily. Removing it will make maintenance of the whole extension easier.
1 parent a427ac6 commit e91c6b1

Some content is hidden

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

42 files changed

+16
-8708
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -3,70 +3,8 @@ name: CI
33
on: [pull_request, push]
44

55
jobs:
6-
build-mac:
7-
name: Build - macOS
8-
runs-on: macos-13
9-
steps:
10-
- uses: actions/checkout@v4
11-
with:
12-
fetch-depth: 0
13-
- uses: actions/setup-node@v4
14-
with:
15-
node-version: "20.x"
16-
- uses: actions/setup-java@v4
17-
with:
18-
java-version: 17
19-
distribution: "temurin"
20-
- run: ./gradlew build updateVersions updateAllDependencies -PbuildServer
21-
name: Build with Gradle
22-
- run: |
23-
npm install
24-
npm run compile
25-
npm run lint
26-
npm run packageMac
27-
name: Build Standalone Utility
28-
working-directory: wpilib-utility-standalone
29-
- name: Import Developer ID Certificate
30-
uses: wpilibsuite/import-signing-certificate@v2
31-
with:
32-
certificate-data: ${{ secrets.APPLE_CERTIFICATE_DATA }}
33-
certificate-passphrase: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
34-
keychain-password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
35-
if: |
36-
(github.repository_owner == 'wpilibsuite') &&
37-
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
38-
- name: Sign Standalone Utility
39-
run: npm run signMac
40-
working-directory: wpilib-utility-standalone
41-
if: |
42-
(github.repository_owner == 'wpilibsuite') &&
43-
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
44-
- name: Notarize Standalone Utility
45-
uses: wpilibsuite/xcode-notarize@v3
46-
with:
47-
product-path: "wpilib-utility-standalone/build/wpilibutility-darwin-universal/wpilibutility.app"
48-
appstore-connect-username: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
49-
appstore-connect-teamid: ${{ secrets.APPLE_NOTARIZATION_TEAMID }}
50-
appstore-connect-password: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
51-
if: |
52-
(github.repository_owner == 'wpilibsuite') &&
53-
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
54-
- name: Staple Notarization Ticket
55-
run: xcrun stapler staple -v wpilibutility.app
56-
working-directory: wpilib-utility-standalone/build/wpilibutility-darwin-universal
57-
if: |
58-
(github.repository_owner == 'wpilibsuite') &&
59-
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
60-
- run: tar -C build/wpilibutility-darwin-universal -pcvzf wpilibutility-mac.tar.gz .
61-
working-directory: wpilib-utility-standalone
62-
name: Create Archive
63-
- uses: actions/upload-artifact@v4
64-
with:
65-
name: Mac
66-
path: ${{ github.workspace }}/wpilib-utility-standalone/wpilibutility-mac.tar.gz
67-
68-
build-linux:
69-
name: Build - Linux
6+
build-vsix:
7+
name: Build - VSIX
708
runs-on: ubuntu-latest
719
steps:
7210
- uses: actions/checkout@v4
@@ -79,69 +17,7 @@ jobs:
7917
with:
8018
java-version: 17
8119
distribution: "temurin"
82-
- run: ./gradlew build updateVersions updateAllDependencies -PbuildServer
83-
name: Build with Gradle
84-
- run: |
85-
npm install
86-
npm run compile
87-
npm run lint
88-
npm run packageLinux
89-
name: Build Standalone Utility
90-
working-directory: wpilib-utility-standalone
91-
- run: tar -C build/wpilibutility-linux-x64 -pcvzf wpilibutility-linux.tar.gz .
92-
working-directory: wpilib-utility-standalone
93-
name: Archive Utility
94-
- uses: actions/upload-artifact@v4
95-
with:
96-
name: Linux
97-
path: ${{ github.workspace }}/wpilib-utility-standalone/wpilibutility-linux.tar.gz
98-
99-
build-windows:
100-
name: Build - Windows Standalone
101-
runs-on: windows-latest
102-
steps:
103-
- uses: actions/checkout@v4
104-
with:
105-
fetch-depth: 0
106-
- uses: actions/setup-node@v4
107-
with:
108-
node-version: "20.x"
109-
- uses: actions/setup-java@v4
110-
with:
111-
java-version: 17
112-
distribution: "temurin"
113-
- run: ./gradlew build updateVersions updateAllDependencies -PbuildServer
114-
name: Build with Gradle
115-
- run: |
116-
npm install
117-
npm run compile
118-
npm run lint
119-
npm run packageWindows
120-
name: Build Standalone Utility
121-
working-directory: wpilib-utility-standalone
122-
- run: Compress-Archive -Path wpilibutility-win32-x64\* -DestinationPath wpilibutility-windows.zip
123-
working-directory: wpilib-utility-standalone/build
124-
shell: powershell
125-
- uses: actions/upload-artifact@v4
126-
with:
127-
name: WindowsStandalone
128-
path: ${{ github.workspace }}/wpilib-utility-standalone/build/wpilibutility-windows.zip
129-
130-
build-windows-vsix:
131-
name: Build - Windows VSIX
132-
runs-on: windows-latest
133-
steps:
134-
- uses: actions/checkout@v4
135-
with:
136-
fetch-depth: 0
137-
- uses: actions/setup-node@v4
138-
with:
139-
node-version: "20.x"
140-
- uses: actions/setup-java@v4
141-
with:
142-
java-version: 17
143-
distribution: "temurin"
144-
- run: ./gradlew build updateVersions updateAllDependencies generateTemplateZip generateExamplesZip -PbuildServer
20+
- run: ./gradlew build updateVersions -PbuildServer
14521
name: Build with Gradle
14622
- run: |
14723
npm install
@@ -154,7 +30,7 @@ jobs:
15430
name: Build VSIX
15531
- uses: actions/upload-artifact@v4
15632
with:
157-
name: WindowsVSIX
33+
name: VSIX
15834
path: ${{ github.workspace }}/**/*.vsix
15935
- uses: actions/upload-artifact@v4
16036
with:
@@ -195,7 +71,7 @@ jobs:
19571
release:
19672
name: "Release"
19773
runs-on: ubuntu-latest
198-
needs: [build-mac, build-linux, build-windows, build-windows-vsix]
74+
needs: [build-vsix]
19975
if: startsWith(github.ref, 'refs/tags/v')
20076
steps:
20177
- uses: actions/checkout@v4

.vscode/launch.json

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,6 @@
2525
],
2626
"outFiles": ["${workspaceFolder}/vscode-wpilib/out/test/**/*.js"],
2727
"preLaunchTask": "vscode-web-watch"
28-
},
29-
{
30-
"type": "node",
31-
"request": "launch",
32-
"name": "Standalone: Main",
33-
"protocol": "inspector",
34-
"runtimeExecutable": "${workspaceFolder}/wpilib-utility-standalone/node_modules/.bin/electron",
35-
"runtimeArgs": [
36-
"--remote-debugging-port=9223",
37-
"wpilib-utility-standalone"
38-
],
39-
"outFiles": ["${workspaceFolder}/wpilib-utility-standalone/out/**/*.js"],
40-
"windows": {
41-
"runtimeExecutable": "${workspaceFolder}/wpilib-utility-standalone/node_modules/.bin/electron.cmd"
42-
},
43-
"preLaunchTask": "standalone-watch"
44-
},
45-
{
46-
"name": "Standalone: Renderer",
47-
"type": "chrome",
48-
"request": "attach",
49-
"port": 9223,
50-
"webRoot": "${workspaceFolder}/wpilib-utility-standalone",
51-
"timeout": 30000
52-
}
53-
],
54-
"compounds": [
55-
{
56-
"name": "Standalone: All",
57-
"configurations": ["Standalone: Main", "Standalone: Renderer"]
5828
}
5929
]
6030
}

.vscode/tasks.json

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,6 @@
1717
"isDefault": true
1818
},
1919
"problemMatcher": []
20-
},
21-
{
22-
"type": "npm",
23-
"identifier": "standalone-watch",
24-
"script": "watch",
25-
"problemMatcher": "$tsc-watch",
26-
"path": "wpilib-utility-standalone/",
27-
"isBackground": true,
28-
"presentation": {
29-
"reveal": "never"
30-
},
31-
"group": {
32-
"kind": "build",
33-
"isDefault": true
34-
}
3520
}
3621
]
3722
}

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![CI](https://github.com/wpilibsuite/vscode-wpilib/actions/workflows/main.yml/badge.svg)](https://github.com/wpilibsuite/vscode-wpilib/actions/workflows/main.yml)
44

5-
This repository contains the WPILib VS Code extension, along with the standalone electron project that contains some of the functionality of the extension.
5+
This repository contains the WPILib VS Code extension.
66

77
## Build Dependencies
88

@@ -18,19 +18,15 @@ This repository contains the WPILib VS Code extension, along with the standalone
1818
In order to properly build, there is some setup that needs to occur.
1919

2020
1. Go into `vscode-wpilib` and run `npm install`
21-
2. Go into into `wpilib-utility-standalone` and run `npm install`
22-
3. From the root, run `./gradlew updateAllDependencies`. This will grab the templates and examples from WPILib, and move the shared dependencies from the vscode extension to the standalone utility. This command will need to be reran any time you update the shared dependencies in the vscode project.
23-
4. Open the root folder in VS Code.
21+
2. From the root, run `./gradlew build`. This will grab the templates and examples from WPILib, copy them into the vscode extension. This command will need to be reran any time you update the shared dependencies in the vscode project.
22+
3. Open the root folder in VS Code.
2423

2524
## Building and Debugging
2625

2726
Once you have the project open in VS Code, there are 5 debugging targets set up.
2827

2928
- `Extension` Will launch the extension to debug
3029
- `Extension Tests` Will launch the extension tests
31-
- `Standalone: Main` Will launch the standalone project. The debugger will be attached to the host process
32-
- `Standalone: Renderer` Will attach to the standalone projects renderer process
33-
- `Standalone: All` Will launch the standalone project, and attach to the renderer. This will attach 2 separate debuggers.
3430

3531
In addition, each project has a `compile` and a `lint` npm command. These will compile and lint their respective projects. Please run these before submitting any PR, as CI will check these. In addition, VS Code's lint does not detect the same lint errors as running lint manually would.
3632

build.gradle

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ dependencies {
4444
javaSource 'edu.wpi.first.wpilibj:commands:+:@zip'
4545
}
4646

47-
4847
task extractCppDependencies(type: Copy) {
4948
dependsOn configurations.cppSource
5049

@@ -86,45 +85,14 @@ def downloadXRPVendordep = tasks.register('downloadXRPVendordep', Download) {
8685
overwrite true
8786
}
8887

89-
task copyFromVsCodeToStandaloneResources(type: Copy) {
90-
dependsOn extractCppDependencies
91-
dependsOn extractJavaDependencies
92-
dependsOn downloadNewCommands
93-
dependsOn downloadRomiVendordep
94-
dependsOn downloadXRPVendordep
95-
from ('vscode-wpilib/resources/java') {
96-
into 'java'
97-
}
98-
from ('vscode-wpilib/resources/cpp') {
99-
into 'cpp'
100-
}
101-
from ('vscode-wpilib/resources/gradle') {
102-
into 'gradle'
103-
}
104-
from ('vscode-wpilib/resources/vendordeps') {
105-
into 'vendordeps'
106-
}
107-
into 'wpilib-utility-standalone/resources'
108-
}
109-
110-
task copyFromVsCodeToStandaloneSrc(type: Copy) {
111-
from ('vscode-wpilib/src/riolog/shared') {
112-
into 'riolog/shared'
113-
}
114-
from ('vscode-wpilib/src/shared') {
115-
into 'shared'
116-
}
117-
into 'wpilib-utility-standalone/src'
118-
}
88+
build.dependsOn extractCppDependencies
89+
build.dependsOn extractJavaDependencies
90+
build.dependsOn downloadNewCommands
91+
build.dependsOn downloadRomiVendordep
92+
build.dependsOn downloadXRPVendordep
11993

12094
apply from: 'templatebuilder.gradle'
12195

122-
123-
task updateAllDependencies() {
124-
dependsOn copyFromVsCodeToStandaloneResources
125-
dependsOn copyFromVsCodeToStandaloneSrc
126-
}
127-
12896
if (project.hasProperty("publishVersion")) {
12997
wpilibVersioning.version.set(project.publishVersion)
13098
}
@@ -133,7 +101,6 @@ wpilibVersioning.version.finalizeValue()
133101

134102
ext.pubVersion = wpilibVersioning.version.get()
135103

136-
137104
if (pubVersion == '') {
138105
pubVersion = '0.0.1-unknown'
139106
}

templatebuilder.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ ext.generateCpp = { templateFile, outputDir, templateFolderRaw ->
108108
}
109109

110110
task generateTemplatesFolder {
111-
dependsOn copyFromVsCodeToStandaloneResources
112-
113111
def outputDir = new File(project.buildDir, "templates")
114112

115113
outputs.dir outputDir
@@ -136,11 +134,10 @@ task generateTemplatesZip(type: Zip) {
136134
dependsOn generateTemplatesFolder
137135
from new File(project.buildDir, "templates")
138136
archiveFileName = 'templates.zip'
137+
build.dependsOn it
139138
}
140139

141140
task generateExamplesFolder {
142-
dependsOn copyFromVsCodeToStandaloneResources
143-
144141
def outputDir = new File(project.buildDir, "examples")
145142

146143
outputs.dir outputDir
@@ -167,5 +164,6 @@ task generateExamplesZip(type: Zip) {
167164
dependsOn generateExamplesFolder
168165
from new File(project.buildDir, "examples")
169166
archiveFileName = 'examples.zip'
167+
build.dependsOn it
170168
}
171169

versions.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
def versionFiles = [new File('vscode-wpilib/package.json'), new File('wpilib-utility-standalone/package.json')]
1+
def versionFiles = [new File('vscode-wpilib/package.json')]
22
def oldVersionFile = new File("$buildDir/existingVersions.json")
33

44
task updateVersions(type: Task) {

wpilib-utility-standalone/.eslintignore

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

wpilib-utility-standalone/.eslintrc.js

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

wpilib-utility-standalone/.gitignore

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

0 commit comments

Comments
 (0)