Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# Lithe-core-rust#94), which desktop 0.8.6 is the first release to ship.
# It is published as a stable release so the Store tracker lists it; the
# Store index records its requires and keeps older hosts on 1.0.1.
PRERELEASE_TAGS: v0.0.1 v1.0.0
PRERELEASE_TAGS: v0.0.1 v1.0.0 v1.2.0
run: |
prerelease=false
for tag in $PRERELEASE_TAGS; do
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
> ([1lck/Lithe-IDEA#2148](https://github.com/1lck/Lithe-IDEA/pull/2148),固定了
> [Lithe-core-rust#94](https://github.com/Lithe-IDEA/Lithe-core-rust/pull/94) 的 Core),桌面端 0.8.6 起包含它。
> 1.1.0 作为正式版本发布并收录到 Lithe Store;Store 按版本的 `requires` 给更早的桌面端继续提供 1.0.1。
> 1.2.0 的 Go 构建和 Go 测试类型图标需要能读取插件包图标的桌面端([1lck/Lithe-IDEA#2169](https://github.com/1lck/Lithe-IDEA/pull/2169)),
> 作为预发布版本发布;桌面端 0.8.6 也能安装它,只是显示通用图标。

## 功能

Expand Down Expand Up @@ -274,7 +276,8 @@ Lithe 主仓库的功能矩阵不收录插件能力,改动插件行为时在

3. `Release` 工作流会核对标签与版本一致、打包并发布 Release(说明里附 SHA-256 和
`docs/releases/v<版本>.md`)。`release.yml` 里 `PRERELEASE_TAGS` 列出的版本会标为预发布版本:
目前是只能装进新版桌面端的 `v0.0.1` 和依赖宿主 #1954、#1964、#1971 的 `v1.0.0`;`v1.0.1` 和 `v1.1.0` 是正式版本。
目前是只能装进新版桌面端的 `v0.0.1`、依赖宿主 #1954、#1964、#1971 的 `v1.0.0` 和图标依赖宿主 #2169 的 `v1.2.0`;
`v1.0.1` 和 `v1.1.0` 是正式版本。
4. Lithe Store 的自动追踪会发现稳定版本并开合并请求,合并后用户即可在 Lithe 中更新。自动追踪会跳过预发布版本;
需要收录时在 Store 中手工提交条目,并使用已发布 ZIP 的实际 SHA-256。

Expand Down
21 changes: 15 additions & 6 deletions docs/feature-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ Go 1.27.4、Delve 1.27.2。`node scripts/e2e-host.mjs` 通过 `TestOfficialGoPlu

## go-run-configuration-types

**能力**:Go 构建和 Go 测试两种运行配置类型,出现在「运行/调试配置」的「+」菜单里,名称、说明、字段标题和选项来自插件的中文翻译。
**能力**:Go 构建和 Go 测试两种运行配置类型,出现在「运行/调试配置」的「+」菜单里,名称、说明、字段标题和选项来自插件的中文翻译,
图标是插件包里的 Go 地鼠加构建或测试标记(浅色和深色各一份)。
Go 构建按“运行种类”执行 `go run` 一个软件包(导入路径或相对路径)、一个 `.go` 文件或一个目录;Go 测试执行 `go test`
一个软件包模式(默认 `./...`)或一个目录下的所有软件包(`<目录>/...`),可用“模式”作为 `-run` 过滤。两种都有“Go 工具实参”,
程序参数、工作目录、环境变量、启动前步骤、存为项目文件和允许多个实例由宿主统一提供。存为项目文件时写进
Expand All @@ -146,19 +147,21 @@ Go 构建按“运行种类”执行 `go run` 一个软件包(导入路径或
**证据**:

- `io.github.lithe-idea.go-support/plugin.json`:`buildSystems` 里 `go` 的 `runConfigurationTypes`(`build`、`test`)和
`requires.runConfigurationTypes`;`l10n/zh-Hans.json` 的 `runConfigurationTypes.go`。
`requires.runConfigurationTypes`;`l10n/zh-Hans.json` 的 `runConfigurationTypes.go`;两种类型的 `icon`
指向 `icons/go-build.svg`、`icons/go-test.svg` 和各自的 `-dark` 文件,出处见 `icons/NOTICE`。
- `scripts/test.mjs`:按契约的展开规则把两种类型的字段拼成命令,用真实的 go 运行软件包、文件、目录的 Go 构建,
以及软件包、目录、模式过滤的 Go 测试。
- `e2e/host/desktop/internal/workbench/official_go_plugin_run_types_e2e_test.go`:宿主端到端测试。
- `e2e/host/desktop/internal/workbench/official_go_plugin_run_types_e2e_test.go`:宿主端到端测试,包括两种类型都读到包里的浅色和深色图标。

**依赖的宿主能力**:`runConfigurationTypes`(API-29,Core Lithe-core-rust#94 的表单、保存和 `build.runConfigurationPlan`;
桌面端 1lck/Lithe-IDEA#2148 的「+」菜单、插件字段和翻译、`.lithe/run/plugin/<ID>.toml`、“允许多个实例”)。
桌面端 1lck/Lithe-IDEA#2148 的「+」菜单、插件字段和翻译、`.lithe/run/plugin/<ID>.toml`、“允许多个实例”);
类型图标需要桌面端 1lck/Lithe-IDEA#2169 读取插件包里的图标,更早的桌面端显示按执行类别的通用图标。

**限制**:

- 不能调试:宿主拒绝调试插件声明的运行类型,调试用「调试」窗口的 Go (Delve)。
- 字段排在宿主的工作目录和环境变量前面,选项是分段按钮而不是下拉框;目录字段不能有默认值,Go 测试的目录不会默认填项目根目录;
名称不会按所选软件包自动生成;类型图标按执行类别显示宿主图标,不显示插件包里的 Go 图标。
名称不会按所选软件包自动生成。
- 还没有的字段:输出目录、构建后运行、模拟终端、重定向输入、以 sudo 运行、模块、测试框架、使用所有自定义构建标记。

**最近验证**:2026-11-18,macOS(Apple Silicon),插件 1.1.0 发布包,宿主 `a8797ae`(1lck/Lithe-IDEA main,包含 #2148),
Expand All @@ -169,9 +172,15 @@ Go 1.27.4。`node scripts/e2e-host.mjs` 通过 `TestOfficialGoPluginRunsGoBuildA
覆盖文件和目录的 Go 构建、软件包模式的 Go 测试。没有覆盖存为项目文件后重新打开项目、允许多个实例、启动前步骤,
也没有做下面的手工验收。

类型图标:2026-11-18,macOS(Apple Silicon),本地打包的插件 1.2.0,宿主 `0ffbbd6`(1lck/Lithe-IDEA#2169 分支,
Core `0a15a98`),Go 1.27.4。`node scripts/e2e-host.mjs` 的三个 workbench 测试和五个 projectgen 测试全部通过;
`TestOfficialGoPluginRunsGoBuildAndGoTestConfigurations` 另外检查两种类型都读到包里的浅色和深色图标、两套配色不同。
#2169 合入前 `e2e/host/lithe-host.json` 仍固定在 `a8797ae`,那里没有读取包图标的代码,新增的图标检查无法编译。

**验证方法**(macOS):

1. 安装插件包,打开含 `go.mod` 的项目,打开「运行/调试配置」点「+」:内置类型之后有 Go 构建和 Go 测试,图标和说明清楚。
1. 安装插件包,打开含 `go.mod` 的项目,打开「运行/调试配置」点「+」:内置类型之后有 Go 构建和 Go 测试,说明清楚;
图标是 Go 地鼠加锤子和 Go 地鼠加测试标记,在浅色和深色外观下都清楚,配置树和标题栏的运行配置列表里也是这两个图标。
2. 新建 Go 构建:运行种类在软件包、文件、目录间切换时只显示对应的一项;三种分别选 `main` 包、`main.go` 和包目录后运行,
程序输出显示在 Run 窗口里,程序参数传给程序;Go 工具实参填 `-race` 时命令里带上它。
3. 新建 Go 测试:默认 `./...` 运行全部测试;改成某个包并填模式后只跑匹配的测试;切到目录后测试这个目录下的所有包;
Expand Down
19 changes: 19 additions & 0 deletions docs/releases/v1.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
1.2.0 给「运行/调试配置」里的 Go 构建和 Go 测试换上各自的图标:Go 地鼠加构建标记或测试标记,浅色和深色外观各有一套。这个版本以预发布版本发布。

功能:
- Go 构建的图标是 Go 地鼠,右上角加构建用的锤子;Go 测试的图标是 Go 地鼠,右上角加红绿两色的测试标记。深色外观换用对应的深色配色。
- 图标显示在「+」菜单、对话框左侧的配置树和标题栏的运行配置列表里,替换原来按执行类别显示的通用图标。

已知限制:
- 显示这两个图标需要支持插件包图标的桌面端(1lck/Lithe-IDEA#2169)。桌面端 0.8.6 也能安装这个版本,两种配置照常使用,图标仍是通用图标。

验证:
- 在 macOS 上用包含 1lck/Lithe-IDEA#2169 的桌面端跑宿主端到端测试:两种配置都读到了包里的浅色和深色图标,运行结果和保存的配置与 1.1.0 相同,插件安装目录不被写入。
- 用包里的四个图标文件在同一个桌面端的无头界面里截图检查「+」菜单,浅色和深色外观下构建和测试图标都按各自配色画出。
- 还没有在 Lithe 里手工验收,状态见 `docs/feature-matrix.md`。

权限:不变。

兼容性:
- 清单只给两种配置的图标加了深色文件,桌面端 0.8.6 可以安装。显示图标需要 1lck/Lithe-IDEA#2169。
- 图标改编自 JetBrains IntelliJ Community 的图标(Apache-2.0),出处和改动说明见包里的 `icons/NOTICE`。
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,17 @@ func TestOfficialGoPluginRunsGoBuildAndGoTestConfigurations(t *testing.T) {
t.Fatalf("kind %s = %+v, want %q among %+v", key.Type, kind, want, s.types)
}
}
// Both kinds draw the package's gopher icons in their own colors, the -dark file on a dark
// theme, instead of the icon of their execution.
for _, key := range []core.RunTypeKey{build, test} {
kind := s.runTypeKind(key)
light, lightRead := runTypePackageIcon(&h.app.pluginIcons, officialGoPluginID, kind.Icon, false)
dark, darkRead := runTypePackageIcon(&h.app.pluginIcons, officialGoPluginID, kind.Icon, true)
if !lightRead || !darkRead || len(light.Layers) == 0 || len(dark.Layers) == 0 || light.Layers[0].Fill == dark.Layers[0].Fill {
t.Fatalf("kind %s icon %+v: light read %v with %d layers, dark read %v with %d layers; want both package files, colored apart",
key.Type, kind.Icon, lightRead, len(light.Layers), darkRead, len(dark.Layers))
}
}

// Go Build: the run kind starts on a package; its path and the program arguments run
// `go run ./cmd/echo one two`.
Expand Down
2 changes: 1 addition & 1 deletion e2e/host/lithe-host.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"./internal/workbench": "^TestOfficialGoPlugin(BuildsAndServesAModule|DebugsEachProjectOfAWorkspaceWithDelve|RunsGoBuildAndGoTestConfigurations)$"
},
"requiredEnvironment": {
"LITHE_TEST_GO_PLUGIN_ARCHIVE": "go-support-<version>-darwin.zip to install, for example dist/go-support-1.1.0-darwin.zip"
"LITHE_TEST_GO_PLUGIN_ARCHIVE": "go-support-<version>-darwin.zip to install, for example dist/go-support-1.2.0-darwin.zip"
},
"repositoryEnvironment": {
"LITHE_PLUGIN_GO_DIR": "io.github.lithe-idea.go-support"
Expand Down
Loading
Loading