From 41ba8408255c8a7a5dc2112cf13688b5e4375079 Mon Sep 17 00:00:00 2001 From: Yao Jingxi <23722032@bjtu.edu.cn> Date: Sun, 22 Nov 2026 13:42:14 +0800 Subject: [PATCH] =?UTF-8?q?chore(plugin-sdk-go):=20Go=20SDK=20=E5=8D=87?= =?UTF-8?q?=E5=88=B0=20Go=201.27.4=EF=BC=8C=E5=92=8C=E6=A1=8C=E9=9D=A2?= =?UTF-8?q?=E7=AB=AF=E7=BB=9F=E4=B8=80=EF=BC=8CPlugin=20SDKs=20=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E5=8A=A0=E4=B8=8A=20Go=20SDK=20=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - shared/plugins/sdk/go/go.mod 从 go 1.22 改为 go 1.27.4。go fix 在 1.27.4 下没有建议,SDK 代码和对外接口不变。 - Plugin SDKs 工作流新增 Go SDK 任务:setup-go 读 go.mod 的版本,跑 README 写的 test -race、gofmt -l 和 vet; SDK 没有依赖,不开缓存。端到端任务也用同一个 Go 构建 Go 示例,不再用 runner 自带的 Go。 - 契约 README 的 sdk/go 一段、插件总览、原生构建指南和四个 SDK 的 README 把 Go 1.22 改为 1.27.4; 插件总览不再说 CI 不跑 Go SDK 的检查。 - 插件协议更新记录的“待合入”加上本 PR。 --- .github/workflows/plugins-verify.yml | 29 +++++++++++++++++++ shared/plugins/README.md | 12 ++++---- shared/plugins/contract/v1/README.md | 2 +- .../plugins/guides/native-build-workflows.md | 4 +-- .../plugins/reference/protocol-changelog.md | 1 + shared/plugins/sdk/go/README.md | 3 +- shared/plugins/sdk/go/go.mod | 2 +- shared/plugins/sdk/java/README.md | 2 +- shared/plugins/sdk/node/README.md | 2 +- shared/plugins/sdk/rust/README.md | 2 +- 10 files changed, 45 insertions(+), 14 deletions(-) diff --git a/.github/workflows/plugins-verify.yml b/.github/workflows/plugins-verify.yml index ec307ec8..23ff4ce2 100644 --- a/.github/workflows/plugins-verify.yml +++ b/.github/workflows/plugins-verify.yml @@ -104,6 +104,30 @@ jobs: cargo fmt --manifest-path shared/plugins/sdk/rust/Cargo.toml --all -- --check cargo clippy --locked --manifest-path shared/plugins/sdk/rust/Cargo.toml --all-targets -- -D warnings + sdk-go: + name: Go SDK + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v7 + # The SDK supports the Go release its go.mod names, the one the desktop + # builds with. It has no dependencies, so there is nothing to cache. + - uses: actions/setup-go@v7 + with: + go-version-file: shared/plugins/sdk/go/go.mod + cache: false + + - name: Test + run: go -C shared/plugins/sdk/go test -race ./... + - name: Check formatting and vet + run: | + unformatted="$(gofmt -l shared/plugins/sdk/go)" + if [ -n "$unformatted" ]; then + printf '::error::Run gofmt -w on these files:\n%s\n' "$unformatted" + exit 1 + fi + go -C shared/plugins/sdk/go vet ./... + sdk-e2e: name: SDK end-to-end with Rust Core runs-on: ubuntu-latest @@ -125,6 +149,11 @@ jobs: distribution: temurin java-version: '21' - uses: dtolnay/rust-toolchain@1.100.0 + # The Go sample builds with the release the SDK's go.mod names. + - uses: actions/setup-go@v7 + with: + go-version-file: shared/plugins/sdk/go/go.mod + cache: false - uses: actions/cache@v6 with: diff --git a/shared/plugins/README.md b/shared/plugins/README.md index c545a7da..3ab8db3d 100644 --- a/shared/plugins/README.md +++ b/shared/plugins/README.md @@ -109,7 +109,7 @@ Schema 只检查 JSON 结构。ID 引用、权限、激活事件、模板变量 | SDK | 版本 | 运行时 | Release | 怎么放进插件 | | --- | --- | --- | --- | --- | | [Rust](sdk/rust/README.md) | 0.4.0 | Rust 1.87+ | [`sdk-rust-v0.4.0`](https://github.com/Lithe-IDEA/Lithe-core-rust/releases/tag/sdk-rust-v0.4.0):`lithe-plugin-sdk-rust-0.4.0.crate` 和 `.sha256` | 用 Git 依赖锁定标签(`Cargo.lock` 记录 commit),或解压后作为 `path` 依赖;编译成每个平台各一份的插件后端可执行文件 | -| [Go](sdk/go/README.md) | 未发布 | Go 1.22+ | Go 模块标签 `shared/plugins/sdk/go/v<版本>`,由 Go 模块代理分发,没有 Release 附件;还没有打过标签 | `go get` 锁定标签或 commit(`go.sum` 记录内容哈希);编译成每个平台各一份的插件后端可执行文件 | +| [Go](sdk/go/README.md) | 未发布 | Go 1.27.4+ | Go 模块标签 `shared/plugins/sdk/go/v<版本>`,由 Go 模块代理分发,没有 Release 附件;还没有打过标签 | `go get` 锁定标签或 commit(`go.sum` 记录内容哈希);编译成每个平台各一份的插件后端可执行文件 | | [Node.js](sdk/node/README.md) | 0.5.0 | Node.js 20.3+ | [`sdk-node-v0.5.0`](https://github.com/Lithe-IDEA/Lithe-core-rust/releases/tag/sdk-node-v0.5.0):`lithe-plugin-sdk-node-0.5.0.tgz` 和 `.sha256` | 解压后把 `package/` 复制进插件包,用相对路径导入 | | [Java](sdk/java/README.md) | 0.5.0 | Java 8+ | [`sdk-java-v0.5.0`](https://github.com/Lithe-IDEA/Lithe-core-rust/releases/tag/sdk-java-v0.5.0):`lithe-plugin-sdk-java-0.5.0.jar` 和 `.sha256` | shade 进后端 JAR | @@ -210,10 +210,10 @@ fixture 放在 `fixtures/<功能>/` 下,文件按演示的能力命名,例 | `npm run --prefix shared/plugins/sdk/node test:types` | Node.js SDK 的 TypeScript 使用方检查;先运行 `npm ci --prefix shared/plugins/sdk/node --ignore-scripts` 安装开发依赖 | | `mvn -B -ntp -f shared/plugins/sdk/java/pom.xml verify` | Java SDK 的单元测试;加 `-Djvm=` 可指定运行测试的 Java(CI 用 Java 8) | | `cargo test --locked --manifest-path shared/plugins/sdk/rust/Cargo.toml` | Rust SDK 的单元测试(CI 用 Rust 1.87,另用仓库 `rust-toolchain.toml` 固定的版本跑 `cargo fmt` 和 `cargo clippy`) | -| `go -C shared/plugins/sdk/go test -race ./...` | Go SDK 的单元测试;另用 `go -C shared/plugins/sdk/go vet ./...` 和 `gofmt -l shared/plugins/sdk/go` 检查。CI 目前不跑这三条,只在端到端测试里构建 Go 示例 | +| `go -C shared/plugins/sdk/go test -race ./...` | Go SDK 的单元测试;另用 `go -C shared/plugins/sdk/go vet ./...` 和 `gofmt -l shared/plugins/sdk/go` 检查。CI 用 `go.mod` 写的 Go 版本跑这三条 | | `node shared/plugins/scripts/sdk-e2e.mjs` | 端到端测试:先构建四个 SDK 的示例后端,再运行 `cargo test -p lithe-core --features plugin-sdk-e2e` 的 `plugin_sdk_node`、`plugin_sdk_java`、`plugin_sdk_rust`、`plugin_sdk_go` 和 `plugin_sdk_build` 五个测试,对象是**当前工作树的 Core**;总是包含原生构建工作流和快捷键导入场景 | -端到端测试需要 Rust、Go 1.22+(`PATH` 上的 `go`)、Node.js 20.3+、Java(`LITHE_PLUGIN_SDK_JAVA_RUNTIME` 指定,或 `PATH` 上的 `java`)和 Maven。场景文件在 [`sdk/e2e/`](sdk/e2e):Node.js 和 Java 跑同一套构建后端场景,Rust 和 Go 跑同一套插件后端场景(`plugin_sdk/backend.rs`),测试代替宿主应答凭据请求。`LITHE_PLUGIN_SDK_JAVA_SAMPLE`、`LITHE_PLUGIN_SDK_JAVA_NATIVE_SAMPLE`、`LITHE_PLUGIN_SDK_RUST_SAMPLE` 和 `LITHE_PLUGIN_SDK_GO_SAMPLE` 可以指定已构建好的示例,跳过构建。 +端到端测试需要 Rust、Go 1.27.4+(`PATH` 上的 `go`)、Node.js 20.3+、Java(`LITHE_PLUGIN_SDK_JAVA_RUNTIME` 指定,或 `PATH` 上的 `java`)和 Maven。场景文件在 [`sdk/e2e/`](sdk/e2e):Node.js 和 Java 跑同一套构建后端场景,Rust 和 Go 跑同一套插件后端场景(`plugin_sdk/backend.rs`),测试代替宿主应答凭据请求。`LITHE_PLUGIN_SDK_JAVA_SAMPLE`、`LITHE_PLUGIN_SDK_JAVA_NATIVE_SAMPLE`、`LITHE_PLUGIN_SDK_RUST_SAMPLE` 和 `LITHE_PLUGIN_SDK_GO_SAMPLE` 可以指定已构建好的示例,跳过构建。 发版:先改版本号(Node.js 改 `shared/plugins/sdk/node/package.json`;Java 运行 `mvn -f shared/plugins/sdk/java/pom.xml versions:set -DnewVersion=<版本> -DgenerateBackupPoms=false`,三个 pom 一起改;Rust 改 `shared/plugins/sdk/rust/Cargo.toml` 的 `workspace.package.version` 并更新 `Cargo.lock`),合并后推送对应标签 `sdk-node-v<版本>`、`sdk-java-v<版本>` 或 `sdk-rust-v<版本>`。仓库根的发版工作流 `.github/workflows/plugins-release-{node,java,rust}-sdk.yml` 由标签触发,检查标签和版本一致,测试通过后把包和 `.sha256` 发到 Core 仓库的 Releases。Go SDK 没有版本文件,也没有发版工作流:合并后推送标签 `shared/plugins/sdk/go/v<版本>` 就是发布,Go 模块代理按需从标签取源码;校验和数据库会记住每个版本的内容,所以标签推送后不能移动或删除,版本号也不能重用。发版后更新本页和各 SDK README 里的版本号。 @@ -330,7 +330,7 @@ A plugin that uses only language servers, run, and test needs no backend. When y | SDK | Version | Runtime | Release | How it goes into the plugin | | --- | --- | --- | --- | --- | | [Rust](sdk/rust/README.md) | 0.4.0 | Rust 1.87+ | [`sdk-rust-v0.4.0`](https://github.com/Lithe-IDEA/Lithe-core-rust/releases/tag/sdk-rust-v0.4.0): `lithe-plugin-sdk-rust-0.4.0.crate` and `.sha256` | Pin the tag as a Git dependency (`Cargo.lock` records the commit), or unpack it as a `path` dependency; compile one backend executable per platform | -| [Go](sdk/go/README.md) | Unreleased | Go 1.22+ | Go module tags `shared/plugins/sdk/go/v`, served by the Go module proxy with no Release assets; not tagged yet | Pin a tag or commit with `go get` (`go.sum` records the content hash); compile one backend executable per platform | +| [Go](sdk/go/README.md) | Unreleased | Go 1.27.4+ | Go module tags `shared/plugins/sdk/go/v`, served by the Go module proxy with no Release assets; not tagged yet | Pin a tag or commit with `go get` (`go.sum` records the content hash); compile one backend executable per platform | | [Node.js](sdk/node/README.md) | 0.5.0 | Node.js 20.3+ | [`sdk-node-v0.5.0`](https://github.com/Lithe-IDEA/Lithe-core-rust/releases/tag/sdk-node-v0.5.0): `lithe-plugin-sdk-node-0.5.0.tgz` and `.sha256` | Unpack it, copy `package/` into the plugin package, and import it by relative path | | [Java](sdk/java/README.md) | 0.5.0 | Java 8+ | [`sdk-java-v0.5.0`](https://github.com/Lithe-IDEA/Lithe-core-rust/releases/tag/sdk-java-v0.5.0): `lithe-plugin-sdk-java-0.5.0.jar` and `.sha256` | Shade it into the backend JAR | @@ -431,10 +431,10 @@ When a change touches the contract, a capability version, or the plugin function | `npm run --prefix shared/plugins/sdk/node test:types` | Node.js SDK TypeScript consumer check; first run `npm ci --prefix shared/plugins/sdk/node --ignore-scripts` to install the development dependencies | | `mvn -B -ntp -f shared/plugins/sdk/java/pom.xml verify` | Java SDK unit tests; add `-Djvm=` to choose the Java that runs them (CI uses Java 8) | | `cargo test --locked --manifest-path shared/plugins/sdk/rust/Cargo.toml` | Rust SDK unit tests (CI uses Rust 1.87, plus the release `rust-toolchain.toml` pins for `cargo fmt` and `cargo clippy`) | -| `go -C shared/plugins/sdk/go test -race ./...` | Go SDK unit tests; also check with `go -C shared/plugins/sdk/go vet ./...` and `gofmt -l shared/plugins/sdk/go`. CI does not run these three yet; it only builds the Go sample in the end-to-end tests | +| `go -C shared/plugins/sdk/go test -race ./...` | Go SDK unit tests; also check with `go -C shared/plugins/sdk/go vet ./...` and `gofmt -l shared/plugins/sdk/go`. CI runs all three on the Go release that `go.mod` names | | `node shared/plugins/scripts/sdk-e2e.mjs` | End-to-end tests: builds the sample backends of the four SDKs, then runs the five tests `plugin_sdk_node`, `plugin_sdk_java`, `plugin_sdk_rust`, `plugin_sdk_go`, and `plugin_sdk_build` of `cargo test -p lithe-core --features plugin-sdk-e2e` against the **Core in the current working tree**; it always includes the native build workflow and shortcut import scenarios | -The end-to-end tests need Rust, Go 1.22+ (`go` on `PATH`), Node.js 20.3+, Java (set `LITHE_PLUGIN_SDK_JAVA_RUNTIME`, or have `java` on `PATH`), and Maven. The scenario files are in [`sdk/e2e/`](sdk/e2e): Node.js and Java run the same build backend scenarios, Rust and Go run the same plugin backend scenario (`plugin_sdk/backend.rs`), and the test answers credential requests in place of the host. `LITHE_PLUGIN_SDK_JAVA_SAMPLE`, `LITHE_PLUGIN_SDK_JAVA_NATIVE_SAMPLE`, `LITHE_PLUGIN_SDK_RUST_SAMPLE`, and `LITHE_PLUGIN_SDK_GO_SAMPLE` can point at already built samples to skip building them. +The end-to-end tests need Rust, Go 1.27.4+ (`go` on `PATH`), Node.js 20.3+, Java (set `LITHE_PLUGIN_SDK_JAVA_RUNTIME`, or have `java` on `PATH`), and Maven. The scenario files are in [`sdk/e2e/`](sdk/e2e): Node.js and Java run the same build backend scenarios, Rust and Go run the same plugin backend scenario (`plugin_sdk/backend.rs`), and the test answers credential requests in place of the host. `LITHE_PLUGIN_SDK_JAVA_SAMPLE`, `LITHE_PLUGIN_SDK_JAVA_NATIVE_SAMPLE`, `LITHE_PLUGIN_SDK_RUST_SAMPLE`, and `LITHE_PLUGIN_SDK_GO_SAMPLE` can point at already built samples to skip building them. Releasing: first bump the version (Node.js in `shared/plugins/sdk/node/package.json`; for Java run `mvn -f shared/plugins/sdk/java/pom.xml versions:set -DnewVersion= -DgenerateBackupPoms=false`, which updates all three poms; for Rust change `workspace.package.version` in `shared/plugins/sdk/rust/Cargo.toml` and update `Cargo.lock`), then after merging push the tag `sdk-node-v`, `sdk-java-v`, or `sdk-rust-v`. The release workflows `.github/workflows/plugins-release-{node,java,rust}-sdk.yml` at the repository root start from the tag, check that it matches the version, and, once tests pass, publish the package and its `.sha256` to the Core repository's Releases. The Go SDK has no version file and no release workflow: after merging, pushing the tag `shared/plugins/sdk/go/v` is the release, and the Go module proxy fetches the source from the tag on demand. The checksum database remembers each version's content, so never move or delete a pushed tag or reuse a version. After a release, update the version numbers in this page and in each SDK README. diff --git a/shared/plugins/contract/v1/README.md b/shared/plugins/contract/v1/README.md index 273064a0..9a1b72c9 100644 --- a/shared/plugins/contract/v1/README.md +++ b/shared/plugins/contract/v1/README.md @@ -5097,7 +5097,7 @@ ends only its call, reported like any unexpected failure. [`sdk/go`](https://github.com/Lithe-IDEA/Lithe-core-rust/blob/main/shared/plugins/sdk/go/README.md) is the Go SDK for [plugin backends](#plugin-backend), which ship as packaged executables. It implements this protocol with its host services and `litheKeymapImport`, but -neither build nor VCS providers. It needs Go 1.22 or newer, uses only the +neither build nor VCS providers. It needs Go 1.27.4 or newer, uses only the standard library, and is released as Go module tags (`shared/plugins/sdk/go/v`) that plugins pin through `go.sum`. It enforces the same rules: on Unix it moves the protocol to a duplicate of the diff --git a/shared/plugins/guides/native-build-workflows.md b/shared/plugins/guides/native-build-workflows.md index ed2ed25d..65df6fcc 100644 --- a/shared/plugins/guides/native-build-workflows.md +++ b/shared/plugins/guides/native-build-workflows.md @@ -82,7 +82,7 @@ node --test shared/plugins/scripts/*.test.mjs node shared/plugins/scripts/sdk-e2e.mjs ``` -`sdk-e2e.mjs` 先构建四个 SDK 的示例后端,再用 `cargo test -p lithe-core --features plugin-sdk-e2e` 运行 `plugin_sdk_node`、`plugin_sdk_java`、`plugin_sdk_rust`、`plugin_sdk_go` 和 `plugin_sdk_build`,被测对象是当前工作树里的 Core,所以改 Core 与改 SDK 或契约可以在同一个 PR 里一起验证。运行需要 Rust、Node.js 20.3 或更高版本、Go 1.22 或更高版本、Java(用 `LITHE_PLUGIN_SDK_JAVA_RUNTIME` 指定,或放在 `PATH` 上的 `java`)和 Maven。 +`sdk-e2e.mjs` 先构建四个 SDK 的示例后端,再用 `cargo test -p lithe-core --features plugin-sdk-e2e` 运行 `plugin_sdk_node`、`plugin_sdk_java`、`plugin_sdk_rust`、`plugin_sdk_go` 和 `plugin_sdk_build`,被测对象是当前工作树里的 Core,所以改 Core 与改 SDK 或契约可以在同一个 PR 里一起验证。运行需要 Rust、Node.js 20.3 或更高版本、Go 1.27.4 或更高版本、Java(用 `LITHE_PLUGIN_SDK_JAVA_RUNTIME` 指定,或放在 `PATH` 上的 `java`)和 Maven。 这些测试通过真实 Core 规划与解码,覆盖构建非零退出码、精确筛选、运行前构建、准备计划、进度、取消后的工具清理、并行工作区隔离,以及包含 SDK 和 JAR 的完整包文件不变。它们不代替原生界面、真实 Maven/JDT 工程或桌面端实机验证。 @@ -180,7 +180,7 @@ node --test shared/plugins/scripts/*.test.mjs node shared/plugins/scripts/sdk-e2e.mjs ``` -`sdk-e2e.mjs` first builds the four SDKs' sample backends, then runs `plugin_sdk_node`, `plugin_sdk_java`, `plugin_sdk_rust`, `plugin_sdk_go`, and `plugin_sdk_build` with `cargo test -p lithe-core --features plugin-sdk-e2e`. The code under test is the Core in the working tree, so a change to Core and a change to an SDK or the contract are verified together in one PR. It needs Rust, Node.js 20.3 or newer, Go 1.22 or newer, Java (set with `LITHE_PLUGIN_SDK_JAVA_RUNTIME`, or `java` on `PATH`), and Maven. +`sdk-e2e.mjs` first builds the four SDKs' sample backends, then runs `plugin_sdk_node`, `plugin_sdk_java`, `plugin_sdk_rust`, `plugin_sdk_go`, and `plugin_sdk_build` with `cargo test -p lithe-core --features plugin-sdk-e2e`. The code under test is the Core in the working tree, so a change to Core and a change to an SDK or the contract are verified together in one PR. It needs Rust, Node.js 20.3 or newer, Go 1.27.4 or newer, Java (set with `LITHE_PLUGIN_SDK_JAVA_RUNTIME`, or `java` on `PATH`), and Maven. These tests plan and decode through a real Core and cover a non-zero build exit code, exact filtering, build before run, preparation plans, progress, tool cleanup after cancellation, isolation between parallel workspaces, and an unchanged complete package including the SDK and JAR. They do not replace verification of the native UI, real Maven/JDT projects, or the desktop on a real machine. diff --git a/shared/plugins/reference/protocol-changelog.md b/shared/plugins/reference/protocol-changelog.md index 32634cf5..804a6081 100644 --- a/shared/plugins/reference/protocol-changelog.md +++ b/shared/plugins/reference/protocol-changelog.md @@ -14,6 +14,7 @@ ## 待合入 +- [#171](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/171),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`pluginAPIVersion` 0 内的说明修正(Go SDK):Go SDK 需要的最低 Go 版本从 1.22 提高到 1.27.4,和桌面端构建用的 Go 一致。`shared/plugins/sdk/go/go.mod` 改为 `go 1.27.4`,契约 README 的 Official backend SDK 中 `sdk/go` 一段、插件总览、原生构建指南和四个 SDK 的 README 随之更新。插件升级到这个版本的 SDK 后,自己的 `go.mod` 也要写 `go 1.27.4` 或更高。SDK 代码和对外接口不变,没有新增版本号、宿主方法、通知或协议字段。 - [#151](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/151),[@xiaoyumuxi](https://github.com/xiaoyumuxi),`pluginAPIVersion` 0 内的补充(API-05、API-35、API-40):远程工作区上下文的 `authority` 新增 `platform: { os, arch }`,取值同托管运行时(`os` 为 `linux`,`arch` 为 `arm64` 或 `x86_64`),本地上下文没有这个字段。新增宿主方法 `workspace/getHostPaths`:返回远程上下文的根目录在远端主机上的绝对 POSIX 路径 `hostPath`,可选的 `rootIDs`(1–256 个不重复的根目录 ID)决定返回哪些根目录和顺序;它是 `workspace.metadata` 下单独的方法授权,本地上下文返回 `plugin.host.authorityUnsupported`,未知根目录返回 `plugin.host.notFound`;声明 `workspace.metadata` 的插件,启动计划的 `backend.hostServices` 因此多出 `lithe/host/workspace/getHostPaths`,宿主传给 `lsp.startServer` 时去掉自己没有注册处理器的方法授权,后端调用它们得到 `plugin.host.permissionDenied`。新增失败码 `plugin.host.remoteDisconnected`(`-32078`,操作进行中与远端主机断开)和 `plugin.host.platformUnavailable`(`-32079`,插件没有适合远端平台的程序包或托管运行时)。插件函数中转不再拒绝远程工作区的上下文,导出的 `context: "workspace"` 指两种来源的工作区,Core 不读也不改写参数和结果里的路径。四个官方 SDK 新增远端平台读取、`getHostPaths`、按来源选择进程所用路径的辅助方法和两个失败码,`path` 与 `hostPath` 是不同类型。没有新增能力版本、通知或 SDK 版本。 - [#150](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/150),[@Mucheen](https://github.com/Mucheen),`runConfigurationTypes` 0 内的行为修正(API-29)。`build.runConfigurationPlan` 在工作目录为工作区根且没有匹配实例时,用唯一生效的文件字段解析后的工作区内目标定位最深的构建实例。`./` 等价于工作区根,指向工作区外的链接不参与定位。进程工作目录和执行前任务选择规则保持原样。没有新增宿主方法、通知或协议版本。 diff --git a/shared/plugins/sdk/go/README.md b/shared/plugins/sdk/go/README.md index 8656c7fb..30d05f59 100644 --- a/shared/plugins/sdk/go/README.md +++ b/shared/plugins/sdk/go/README.md @@ -28,7 +28,7 @@ It covers the same protocols as the [Rust SDK](../rust/README.md), and the same Core end-to-end scenario checks both. The SDK owns the wire format, negotiation, cancellation, and error mapping; your code supplies only handlers. It uses only the Go standard library, runs every call on a -goroutine of its own, and needs Go 1.22 or newer. +goroutine of its own, and needs Go 1.27.4 or newer. This SDK has no build provider or VCS provider API; write build providers with the [Node.js](../node/README.md) or [Java](../java/README.md) SDK, and VCS @@ -563,6 +563,7 @@ gofmt -l . ``` and, from the root of this repository, `node shared/plugins/scripts/sdk-e2e.mjs`. +CI runs the first three on the Go release that `go.mod` names. The unit tests drive a session through in-process pipes with a scripted host; `lithe/host_services_test.go` checks the host services against the diff --git a/shared/plugins/sdk/go/go.mod b/shared/plugins/sdk/go/go.mod index dba9ceee..aacf769a 100644 --- a/shared/plugins/sdk/go/go.mod +++ b/shared/plugins/sdk/go/go.mod @@ -1,3 +1,3 @@ module github.com/Lithe-IDEA/Lithe-core-rust/shared/plugins/sdk/go -go 1.22 +go 1.27.4 diff --git a/shared/plugins/sdk/java/README.md b/shared/plugins/sdk/java/README.md index 359ab9be..b65ddc35 100644 --- a/shared/plugins/sdk/java/README.md +++ b/shared/plugins/sdk/java/README.md @@ -518,7 +518,7 @@ This builds the SDK and the sample for Java 8 with any newer JDK, then runs the JUnit tests. Add `-Djvm=/path/to/java8/bin/java` to run the tests on a Java 8 runtime, as CI does. -The end-to-end script needs Rust, Node.js 20.3 or newer, Go 1.22 or newer, Java +The end-to-end script needs Rust, Node.js 20.3 or newer, Go 1.27.4 or newer, Java (`LITHE_PLUGIN_SDK_JAVA_RUNTIME` or `java` on `PATH`) and Maven; `LITHE_PLUGIN_SDK_JAVA_SAMPLE` and `LITHE_PLUGIN_SDK_JAVA_NATIVE_SAMPLE` name already built sample JARs. diff --git a/shared/plugins/sdk/node/README.md b/shared/plugins/sdk/node/README.md index 180e9d97..77fde6dd 100644 --- a/shared/plugins/sdk/node/README.md +++ b/shared/plugins/sdk/node/README.md @@ -571,5 +571,5 @@ node shared/plugins/scripts/sdk-e2e.mjs The tests use a bounded in-memory host (`test/harness.mjs`), which plugin authors can copy to test their own backends without starting Lithe. The -end-to-end script needs Rust, Node.js 20.3 or newer, Go 1.22 or newer, Java +end-to-end script needs Rust, Node.js 20.3 or newer, Go 1.27.4 or newer, Java (`LITHE_PLUGIN_SDK_JAVA_RUNTIME` or `java` on `PATH`) and Maven. diff --git a/shared/plugins/sdk/rust/README.md b/shared/plugins/sdk/rust/README.md index b3081f72..02f759f2 100644 --- a/shared/plugins/sdk/rust/README.md +++ b/shared/plugins/sdk/rust/README.md @@ -650,6 +650,6 @@ The unit tests drive a session through in-process pipes with a scripted host; `plugin-sdk/tests/host_services.rs` checks the host services against the contract's fixture. The end-to-end check builds the sample, installs it as a package, and runs it through a real Core session of this checkout. It needs -Rust, Node.js 20.3 or newer, Go 1.22 or newer, Java +Rust, Node.js 20.3 or newer, Go 1.27.4 or newer, Java (`LITHE_PLUGIN_SDK_JAVA_RUNTIME` or `java` on `PATH`) and Maven; `LITHE_PLUGIN_SDK_RUST_SAMPLE` names an already built `sample-backend`.