From 27a8d7683130ea84a045adde3364c5cd45351ac8 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Tue, 3 Sep 2024 22:42:56 +1000 Subject: [PATCH] refactor: move extensions/* to frontend/* (#2585) --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 4 ++-- CONTRIBUTING.md | 4 ++-- Justfile | 12 ++++++------ bin/hermit.hcl | 2 +- {extensions => frontend}/intellij/build.gradle.kts | 0 {extensions => frontend}/intellij/gradle.properties | 0 .../intellij/settings.gradle.kts | 0 .../xyz/block/ftl/intellij/CustomLsp4jClient.kt | 0 .../src/main/kotlin/xyz/block/ftl/intellij/FTL.kt | 0 .../block/ftl/intellij/FTLLspServerDescriptor.kt | 0 .../xyz/block/ftl/intellij/FTLLspServerService.kt | 0 .../ftl/intellij/FTLLspServerSupportProvider.kt | 0 .../kotlin/xyz/block/ftl/intellij/FTLSettings.kt | 0 .../xyz/block/ftl/intellij/FTLSettingsComponent.kt | 0 .../block/ftl/intellij/FTLSettingsConfigurable.kt | 0 .../ftl/intellij/toolWindow/FTLMessagesPanel.kt | 0 .../ftl/intellij/toolWindow/FTLToolWindowFactory.kt | 0 .../intellij/src/main/resources/META-INF/plugin.xml | 0 .../src/main/resources/META-INF/pluginIcon.svg | 0 {extensions => frontend}/vscode/.gitignore | 0 {extensions => frontend}/vscode/.vscode-test.mjs | 0 {extensions => frontend}/vscode/.vscode/launch.json | 0 .../vscode/.vscode/settings.json | 0 {extensions => frontend}/vscode/.vscode/tasks.json | 0 {extensions => frontend}/vscode/.vscodeignore | 0 {extensions => frontend}/vscode/LICENSE | 0 {extensions => frontend}/vscode/README.md | 0 {extensions => frontend}/vscode/biome.json | 0 {extensions => frontend}/vscode/images/icon.png | Bin {extensions => frontend}/vscode/package.json | 0 {extensions => frontend}/vscode/src/client.ts | 0 {extensions => frontend}/vscode/src/config.ts | 0 .../vscode/src/extension.js.map | 0 {extensions => frontend}/vscode/src/extension.ts | 0 {extensions => frontend}/vscode/src/status.js.map | 0 {extensions => frontend}/vscode/src/status.ts | 0 {extensions => frontend}/vscode/tsconfig.json | 0 {extensions => frontend}/vscode/webpack.config.js | 0 pnpm-lock.yaml | 2 +- pnpm-workspace.yaml | 2 +- 41 files changed, 14 insertions(+), 14 deletions(-) rename {extensions => frontend}/intellij/build.gradle.kts (100%) rename {extensions => frontend}/intellij/gradle.properties (100%) rename {extensions => frontend}/intellij/settings.gradle.kts (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/CustomLsp4jClient.kt (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTL.kt (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerDescriptor.kt (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerService.kt (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerSupportProvider.kt (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettings.kt (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsComponent.kt (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsConfigurable.kt (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLMessagesPanel.kt (100%) rename {extensions => frontend}/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLToolWindowFactory.kt (100%) rename {extensions => frontend}/intellij/src/main/resources/META-INF/plugin.xml (100%) rename {extensions => frontend}/intellij/src/main/resources/META-INF/pluginIcon.svg (100%) rename {extensions => frontend}/vscode/.gitignore (100%) rename {extensions => frontend}/vscode/.vscode-test.mjs (100%) rename {extensions => frontend}/vscode/.vscode/launch.json (100%) rename {extensions => frontend}/vscode/.vscode/settings.json (100%) rename {extensions => frontend}/vscode/.vscode/tasks.json (100%) rename {extensions => frontend}/vscode/.vscodeignore (100%) rename {extensions => frontend}/vscode/LICENSE (100%) rename {extensions => frontend}/vscode/README.md (100%) rename {extensions => frontend}/vscode/biome.json (100%) rename {extensions => frontend}/vscode/images/icon.png (100%) rename {extensions => frontend}/vscode/package.json (100%) rename {extensions => frontend}/vscode/src/client.ts (100%) rename {extensions => frontend}/vscode/src/config.ts (100%) rename {extensions => frontend}/vscode/src/extension.js.map (100%) rename {extensions => frontend}/vscode/src/extension.ts (100%) rename {extensions => frontend}/vscode/src/status.js.map (100%) rename {extensions => frontend}/vscode/src/status.ts (100%) rename {extensions => frontend}/vscode/tsconfig.json (100%) rename {extensions => frontend}/vscode/webpack.config.js (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ec125abf5d..bbbf6602ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,7 +152,7 @@ jobs: - name: VSCode extension pnpm install run: just pnpm-install - name: VSCode extension lint - working-directory: extensions/vscode + working-directory: frontend/vscode run: pnpm run lint - name: VSCode extension pnpm build and package run: just package-extension diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99ccaf72db..610e5a28a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -176,8 +176,8 @@ jobs: set -euo pipefail version="$(git describe --tags --abbrev=0 | sed 's/^v//')" echo "Publishing version $version" - jq --arg version "$version" '.version = $version' extensions/vscode/package.json > extensions/vscode/package.json.tmp - mv extensions/vscode/package.json.tmp extensions/vscode/package.json + jq --arg version "$version" '.version = $version' frontend/vscode/package.json > frontend/vscode/package.json.tmp + mv frontend/vscode/package.json.tmp frontend/vscode/package.json just publish-extension env: VSCE_PAT: ${{ secrets.VSCE_PAT }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 44577617ed..5eb249da4e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -158,7 +158,7 @@ This will automatically create a migration file in `backend/controller/sql/schem ## VSCode extension -The preferred way to develop the FTL VSCode extension is to open a VSCode instance in the `extensions/vscode` directory. This will load the extension in a new VSCode window. From there, the `launch.json` and `tasks.json` files are configured to run the extension in a new window. +The preferred way to develop the FTL VSCode extension is to open a VSCode instance in the `frontend/vscode` directory. This will load the extension in a new VSCode window. From there, the `launch.json` and `tasks.json` files are configured to run the extension in a new window. ### Building the extension @@ -174,7 +174,7 @@ To package the extension, run: just package-extension ``` -This will create a `.vsix` file in the `extensions/vscode` directory. +This will create a `.vsix` file in the `frontend/vscode` directory. ### Publishing the extension diff --git a/Justfile b/Justfile index 7150092d2b..c6d0cbe304 100644 --- a/Justfile +++ b/Justfile @@ -10,7 +10,7 @@ SCHEMA_OUT := "backend/protos/xyz/block/ftl/v1/schema/schema.proto" ZIP_DIRS := "go-runtime/compile/build-template go-runtime/compile/external-module-template go-runtime/compile/main-work-template internal/projectinit/scaffolding go-runtime/scaffolding jvm-runtime/java/scaffolding jvm-runtime/kotlin/scaffolding" CONSOLE_ROOT := "frontend/console" FRONTEND_OUT := "{{CONSOLE_ROOT}}/dist/index.html" -EXTENSION_OUT := "extensions/vscode/dist/extension.js" +EXTENSION_OUT := "frontend/vscode/dist/extension.js" PROTOS_IN := "backend/protos/xyz/block/ftl/v1/schema/schema.proto backend/protos/xyz/block/ftl/v1/console/console.proto backend/protos/xyz/block/ftl/v1/ftl.proto backend/protos/xyz/block/ftl/v1/schema/runtime.proto" PROTOS_OUT := "backend/protos/xyz/block/ftl/v1/console/console.pb.go backend/protos/xyz/block/ftl/v1/ftl.pb.go backend/protos/xyz/block/ftl/v1/schema/runtime.pb.go backend/protos/xyz/block/ftl/v1/schema/schema.pb.go {{CONSOLE_ROOT}}/src/protos/xyz/block/ftl/v1/console/console_pb.ts {{CONSOLE_ROOT}}/src/protos/xyz/block/ftl/v1/ftl_pb.ts {{CONSOLE_ROOT}}/src/protos/xyz/block/ftl/v1/schema/runtime_pb.ts {{CONSOLE_ROOT}}/src/protos/xyz/block/ftl/v1/schema/schema_pb.ts" @@ -88,22 +88,22 @@ build-frontend: pnpm-install # Rebuild VSCode extension build-extension: pnpm-install - @mk {{EXTENSION_OUT}} : extensions/vscode/src extensions/vscode/package.json -- "cd extensions/vscode && rm -f ftl-*.vsix && pnpm run compile" + @mk {{EXTENSION_OUT}} : frontend/vscode/src frontend/vscode/package.json -- "cd frontend/vscode && rm -f ftl-*.vsix && pnpm run compile" # Install development version of VSCode extension install-extension: build-extension - @cd extensions/vscode && vsce package && code --install-extension ftl-*.vsix + @cd frontend/vscode && vsce package && code --install-extension ftl-*.vsix # Build and package the VSCode extension package-extension: build-extension - @cd extensions/vscode && vsce package --no-dependencies + @cd frontend/vscode && vsce package --no-dependencies # Publish the VSCode extension publish-extension: package-extension - @cd extensions/vscode && vsce publish --no-dependencies + @cd frontend/vscode && vsce publish --no-dependencies build-intellij-plugin: - @cd extensions/intellij && gradle buildPlugin + @cd frontend/intellij && gradle buildPlugin # Kotlin runtime is temporarily disabled; these instructions create a dummy zip in place of the kotlin runtime jar for # the runner. diff --git a/bin/hermit.hcl b/bin/hermit.hcl index 2fd9a139b6..482702cd7a 100644 --- a/bin/hermit.hcl +++ b/bin/hermit.hcl @@ -6,6 +6,6 @@ env = { "OTEL_GRPC_PORT": "4317", "OTEL_HTTP_PORT": "4318", "OTEL_METRIC_EXPORT_INTERVAL": "5000", - "PATH": "${HERMIT_ENV}/scripts:${HERMIT_ENV}/frontend/console/node_modules/.bin:${HERMIT_ENV}/extensions/vscode/node_modules/.bin:${PATH}", + "PATH": "${HERMIT_ENV}/scripts:${HERMIT_ENV}/frontend/console/node_modules/.bin:${HERMIT_ENV}/frontend/vscode/node_modules/.bin:${PATH}", } sources = ["env:///bin/packages", "https://github.com/cashapp/hermit-packages.git"] diff --git a/extensions/intellij/build.gradle.kts b/frontend/intellij/build.gradle.kts similarity index 100% rename from extensions/intellij/build.gradle.kts rename to frontend/intellij/build.gradle.kts diff --git a/extensions/intellij/gradle.properties b/frontend/intellij/gradle.properties similarity index 100% rename from extensions/intellij/gradle.properties rename to frontend/intellij/gradle.properties diff --git a/extensions/intellij/settings.gradle.kts b/frontend/intellij/settings.gradle.kts similarity index 100% rename from extensions/intellij/settings.gradle.kts rename to frontend/intellij/settings.gradle.kts diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/CustomLsp4jClient.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/CustomLsp4jClient.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/CustomLsp4jClient.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/CustomLsp4jClient.kt diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTL.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTL.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTL.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTL.kt diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerDescriptor.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerDescriptor.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerDescriptor.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerDescriptor.kt diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerService.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerService.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerService.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerService.kt diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerSupportProvider.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerSupportProvider.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerSupportProvider.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLLspServerSupportProvider.kt diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettings.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettings.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettings.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettings.kt diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsComponent.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsComponent.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsComponent.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsComponent.kt diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsConfigurable.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsConfigurable.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsConfigurable.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/FTLSettingsConfigurable.kt diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLMessagesPanel.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLMessagesPanel.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLMessagesPanel.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLMessagesPanel.kt diff --git a/extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLToolWindowFactory.kt b/frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLToolWindowFactory.kt similarity index 100% rename from extensions/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLToolWindowFactory.kt rename to frontend/intellij/src/main/kotlin/xyz/block/ftl/intellij/toolWindow/FTLToolWindowFactory.kt diff --git a/extensions/intellij/src/main/resources/META-INF/plugin.xml b/frontend/intellij/src/main/resources/META-INF/plugin.xml similarity index 100% rename from extensions/intellij/src/main/resources/META-INF/plugin.xml rename to frontend/intellij/src/main/resources/META-INF/plugin.xml diff --git a/extensions/intellij/src/main/resources/META-INF/pluginIcon.svg b/frontend/intellij/src/main/resources/META-INF/pluginIcon.svg similarity index 100% rename from extensions/intellij/src/main/resources/META-INF/pluginIcon.svg rename to frontend/intellij/src/main/resources/META-INF/pluginIcon.svg diff --git a/extensions/vscode/.gitignore b/frontend/vscode/.gitignore similarity index 100% rename from extensions/vscode/.gitignore rename to frontend/vscode/.gitignore diff --git a/extensions/vscode/.vscode-test.mjs b/frontend/vscode/.vscode-test.mjs similarity index 100% rename from extensions/vscode/.vscode-test.mjs rename to frontend/vscode/.vscode-test.mjs diff --git a/extensions/vscode/.vscode/launch.json b/frontend/vscode/.vscode/launch.json similarity index 100% rename from extensions/vscode/.vscode/launch.json rename to frontend/vscode/.vscode/launch.json diff --git a/extensions/vscode/.vscode/settings.json b/frontend/vscode/.vscode/settings.json similarity index 100% rename from extensions/vscode/.vscode/settings.json rename to frontend/vscode/.vscode/settings.json diff --git a/extensions/vscode/.vscode/tasks.json b/frontend/vscode/.vscode/tasks.json similarity index 100% rename from extensions/vscode/.vscode/tasks.json rename to frontend/vscode/.vscode/tasks.json diff --git a/extensions/vscode/.vscodeignore b/frontend/vscode/.vscodeignore similarity index 100% rename from extensions/vscode/.vscodeignore rename to frontend/vscode/.vscodeignore diff --git a/extensions/vscode/LICENSE b/frontend/vscode/LICENSE similarity index 100% rename from extensions/vscode/LICENSE rename to frontend/vscode/LICENSE diff --git a/extensions/vscode/README.md b/frontend/vscode/README.md similarity index 100% rename from extensions/vscode/README.md rename to frontend/vscode/README.md diff --git a/extensions/vscode/biome.json b/frontend/vscode/biome.json similarity index 100% rename from extensions/vscode/biome.json rename to frontend/vscode/biome.json diff --git a/extensions/vscode/images/icon.png b/frontend/vscode/images/icon.png similarity index 100% rename from extensions/vscode/images/icon.png rename to frontend/vscode/images/icon.png diff --git a/extensions/vscode/package.json b/frontend/vscode/package.json similarity index 100% rename from extensions/vscode/package.json rename to frontend/vscode/package.json diff --git a/extensions/vscode/src/client.ts b/frontend/vscode/src/client.ts similarity index 100% rename from extensions/vscode/src/client.ts rename to frontend/vscode/src/client.ts diff --git a/extensions/vscode/src/config.ts b/frontend/vscode/src/config.ts similarity index 100% rename from extensions/vscode/src/config.ts rename to frontend/vscode/src/config.ts diff --git a/extensions/vscode/src/extension.js.map b/frontend/vscode/src/extension.js.map similarity index 100% rename from extensions/vscode/src/extension.js.map rename to frontend/vscode/src/extension.js.map diff --git a/extensions/vscode/src/extension.ts b/frontend/vscode/src/extension.ts similarity index 100% rename from extensions/vscode/src/extension.ts rename to frontend/vscode/src/extension.ts diff --git a/extensions/vscode/src/status.js.map b/frontend/vscode/src/status.js.map similarity index 100% rename from extensions/vscode/src/status.js.map rename to frontend/vscode/src/status.js.map diff --git a/extensions/vscode/src/status.ts b/frontend/vscode/src/status.ts similarity index 100% rename from extensions/vscode/src/status.ts rename to frontend/vscode/src/status.ts diff --git a/extensions/vscode/tsconfig.json b/frontend/vscode/tsconfig.json similarity index 100% rename from extensions/vscode/tsconfig.json rename to frontend/vscode/tsconfig.json diff --git a/extensions/vscode/webpack.config.js b/frontend/vscode/webpack.config.js similarity index 100% rename from extensions/vscode/webpack.config.js rename to frontend/vscode/webpack.config.js diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 66e83a6afd..b380f029a2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,7 +6,7 @@ settings: importers: - extensions/vscode: + frontend/vscode: dependencies: lookpath: specifier: ^1.2.2 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fe7847d7eb..a10b9048c6 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,3 @@ packages: - "frontend/console" - - "extensions/vscode" + - "frontend/vscode"