diff --git a/desktop/internal/i18n/shared.generated.go b/desktop/internal/i18n/shared.generated.go index 1a128708c..49cacde49 100644 --- a/desktop/internal/i18n/shared.generated.go +++ b/desktop/internal/i18n/shared.generated.go @@ -94,6 +94,7 @@ var sharedCatalogs = map[string]map[string]string{ "desktop.build.cancelled": "Build cancelled", "desktop.build.chooseTask": "Choose a build task first.", "desktop.build.chooseTaskScope": "Choose a project or target this task runs on first.", + "desktop.build.clearDropped": "Clear Saved Values", "desktop.build.commandUnsupported": "This build system answered with a command plan; provider-backed tasks are required here.", "desktop.build.connectionDebugAdapterGone": "The debug adapter “{name}” was disabled or updated before the run was ready, so the run was stopped. Debug it again.", "desktop.build.debugPortTimeout": "The run did not wait for a debugger within {seconds} seconds, so it was stopped. See the Run window for its output.", @@ -101,6 +102,8 @@ var sharedCatalogs = map[string]map[string]string{ "desktop.build.debugTarget": "Debug", "desktop.build.dependenciesHelp": "The build tool reads the dependency tree only when this is first opened, which can take a while as the tool runs. The tree is then kept until the build systems are detected again or Reload is chosen on the build system or on Dependencies.", "desktop.build.detection": "Detection", + "desktop.build.droppedInTeam": "Saved in {file}; change it in the project", + "desktop.build.droppedOptions": "The plugin no longer offers these options, so their saved values have no effect. Use the options or the runtime above where needed.", "desktop.build.emptyOutput": "Run a build task to see output.", "desktop.build.executableMissing": "No usable build executable was found for this build system.", "desktop.build.exited": "Build exited with code {code}.", @@ -129,6 +132,7 @@ var sharedCatalogs = map[string]map[string]string{ "desktop.build.noMatches": "No matching build items", "desktop.build.noOptions": "This build system declares no options.", "desktop.build.noTasks": "No build tasks", + "desktop.build.openToolchains": "Toolchain Settings…", "desktop.build.optionChoiceDefault": "default", "desktop.build.optionChoiceDefaultLabel": "{title} (default)", "desktop.build.optionOverride": "Override", @@ -142,7 +146,13 @@ var sharedCatalogs = map[string]map[string]string{ "desktop.build.runSelected": "Run selected task", "desktop.build.runTarget": "Run {name}", "desktop.build.running": "Running…", + "desktop.build.runtimeHeading": "Runtime", + "desktop.build.runtimeHelp": "Builds and launches use the same runtime. To change it, choose the project's installation in Toolchain settings.", "desktop.build.showSyncOutput": "Show the output in the Run window", + "desktop.build.sourceEnvironment": "{variable} environment variable", + "desktop.build.sourcePath": "System PATH", + "desktop.build.sourceProjectFile": "Project wrapper", + "desktop.build.sourceSetting": "Plugin setting", "desktop.build.stop": "Stop build task", "desktop.build.stopping": "Stopping…", "desktop.build.succeeded": "Build succeeded", @@ -3272,6 +3282,7 @@ var sharedCatalogs = map[string]map[string]string{ "desktop.build.cancelled": "构建已取消", "desktop.build.chooseTask": "请先选择一个构建任务。", "desktop.build.chooseTaskScope": "请先选择此任务可以运行的项目或目标。", + "desktop.build.clearDropped": "清除本机保存的值", "desktop.build.commandUnsupported": "此构建系统返回了命令计划;当前接入需要提供者驱动的任务。", "desktop.build.connectionDebugAdapterGone": "调试适配器“{name}”在运行就绪前被停用或更新,运行已停止。请重新调试。", "desktop.build.debugPortTimeout": "运行在 {seconds} 秒内没有等待调试器连接,已停止。输出见运行窗口。", @@ -3279,6 +3290,8 @@ var sharedCatalogs = map[string]map[string]string{ "desktop.build.debugTarget": "调试", "desktop.build.dependenciesHelp": "第一次展开时才让构建工具读取依赖树,构建工具运行期间可能要等一会儿。读到的依赖会一直保留,直到重新检测构建系统,或在构建系统或“依赖”上选“重新加载”。", "desktop.build.detection": "检测", + "desktop.build.droppedInTeam": "保存在 {file} 中,需在项目里修改", + "desktop.build.droppedOptions": "插件已不再提供以下选项,保存的值不会生效。需要时请改用上面的选项或运行环境。", "desktop.build.emptyOutput": "运行构建任务以查看输出。", "desktop.build.executableMissing": "未找到此构建系统可用的构建程序。", "desktop.build.exited": "构建以代码 {code} 退出。", @@ -3307,6 +3320,7 @@ var sharedCatalogs = map[string]map[string]string{ "desktop.build.noMatches": "没有匹配的构建项", "desktop.build.noOptions": "此构建系统没有声明可配置的选项。", "desktop.build.noTasks": "没有构建任务", + "desktop.build.openToolchains": "工具链设置…", "desktop.build.optionChoiceDefault": "默认", "desktop.build.optionChoiceDefaultLabel": "{title}(默认)", "desktop.build.optionOverride": "覆盖", @@ -3320,7 +3334,13 @@ var sharedCatalogs = map[string]map[string]string{ "desktop.build.runSelected": "运行所选任务", "desktop.build.runTarget": "运行 {name}", "desktop.build.running": "正在运行…", + "desktop.build.runtimeHeading": "运行环境", + "desktop.build.runtimeHelp": "构建和启动使用同一个运行时。要更换,请在工具链设置中为项目选择安装。", "desktop.build.showSyncOutput": "在运行窗口中查看输出", + "desktop.build.sourceEnvironment": "环境变量 {variable}", + "desktop.build.sourcePath": "系统 PATH", + "desktop.build.sourceProjectFile": "项目内的包装脚本", + "desktop.build.sourceSetting": "插件设置", "desktop.build.stop": "停止构建任务", "desktop.build.stopping": "正在停止…", "desktop.build.succeeded": "构建成功", diff --git a/desktop/internal/settingswindow/controller.go b/desktop/internal/settingswindow/controller.go index 84c8cb96b..ec118146a 100644 --- a/desktop/internal/settingswindow/controller.go +++ b/desktop/internal/settingswindow/controller.go @@ -630,6 +630,12 @@ func (c *Controller) OpenVersionControl(application *app.Application, current Va return c.open(application, current, pageVersionControl) } +// OpenToolchains shows the window on the Toolchains page under Build, Execution, Deployment, +// where a build's options dialog leads to choose the project's runtime. +func (c *Controller) OpenToolchains(application *app.Application, current Values) error { + return c.open(application, current, pageToolchains) +} + // OpenAI shows the window on the Generation page, where the commit area's settings button leads. func (c *Controller) OpenAI(application *app.Application, current Values) error { return c.open(application, current, pageAIGeneration) diff --git a/desktop/internal/settingswindow/toolchains_state.go b/desktop/internal/settingswindow/toolchains_state.go index a0cdc76b8..39062e2e5 100644 --- a/desktop/internal/settingswindow/toolchains_state.go +++ b/desktop/internal/settingswindow/toolchains_state.go @@ -1156,7 +1156,9 @@ func toolchainReasonLabel(language i18n.Language, code string) string { } } -func toolchainLayerLabel(language i18n.Language, layer string) string { +// ToolchainLayerLabel names the layer the shared resolver selected an installation from: pinned, +// project, global or automatic. The workbench shows it beside a build's runtime as well. +func ToolchainLayerLabel(language i18n.Language, layer string) string { switch layer { case "pinned": return i18n.Shared(language, "desktop.toolchains.layerPinned") diff --git a/desktop/internal/settingswindow/toolchains_view.go b/desktop/internal/settingswindow/toolchains_view.go index 7d7473f5d..f1f011356 100644 --- a/desktop/internal/settingswindow/toolchains_view.go +++ b/desktop/internal/settingswindow/toolchains_view.go @@ -586,7 +586,7 @@ func (w *window) layerTag(c ui.C, language i18n.Language, result toolchainResult case "global": kind = tagBlue } - w.tag(c, kind, toolchainLayerLabel(language, result.layer)) + w.tag(c, kind, ToolchainLayerLabel(language, result.layer)) } // toolchainName is a tool's display name, its ID when it has none. @@ -844,7 +844,7 @@ func (w *window) toolchainEffective(c ui.C, language i18n.Language, scope *toolc return } w.layerTag(c, language, current, status) - layerLabel := toolchainLayerLabel(language, current.layer) + layerLabel := ToolchainLayerLabel(language, current.layer) for _, option := range t.options(language, scope, tool) { if !option.auto && option.home == current.home { for _, source := range option.sources { @@ -872,7 +872,7 @@ func (w *window) toolchainEffective(c ui.C, language i18n.Language, scope *toolc ui.Text(c, next.version).FontSize(buildSmall).Mono().Weight(gfx.WeightBold).Color(words).Shrink(0) ui.Text(c, " · ").FontSize(buildSmall).Color(words).Shrink(0) ui.Text(c, midTrim(next.home, 60)).FontSize(buildSmall).Mono().Color(words).Shrink(1).Ellipsis() - ui.Text(c, i18n.SharedFormat(language, "desktop.buildSettings.parenthesized", map[string]string{"text": toolchainLayerLabel(language, next.layer)})). + ui.Text(c, i18n.SharedFormat(language, "desktop.buildSettings.parenthesized", map[string]string{"text": ToolchainLayerLabel(language, next.layer)})). FontSize(buildSmall).Color(words).Shrink(0) }) if w.button(c.Part("undo"), buttonLinkSmall, i18n.Shared(language, "desktop.buildSettings.undoChange"), t.saving) { @@ -945,7 +945,7 @@ func (w *window) toolchainTrace(c ui.C, language i18n.Language, tool *toolchain. ui.Column(c).FillWidth().MinWidth(0).PadSides(4, 12, 2, 12).Children(func() { for index, step := range tool.Trace { k := c.KeyInt(index) - layer := toolchainLayerLabel(language, step.Layer) + layer := ToolchainLayerLabel(language, step.Layer) candidate := toolchainTraceCandidate(tool, step.CandidateID) var text string mark, words := "–", b.sub diff --git a/desktop/internal/workbench/build.go b/desktop/internal/workbench/build.go index a06a04671..a13965a8e 100644 --- a/desktop/internal/workbench/build.go +++ b/desktop/internal/workbench/build.go @@ -1501,8 +1501,13 @@ func (a *App) resolveBuildCandidates(ctx context.Context, p *project, directory execution.Executable = selection.Executable execution.Environment = selection.Environment execution.PathPrepend = selection.PathPrepend + execution.Source.Version, execution.Source.Layer = selection.Version, selection.Layer } if execution.Executable != "" { + // A runtime candidate keeps the source of the runtime it named. + if candidate.Kind != "runtime" { + execution.Source.Kind, execution.Source.Variable = candidate.Kind, candidate.Variable + } break } } diff --git a/desktop/internal/workbench/build_options.go b/desktop/internal/workbench/build_options.go index 47e04ab41..e37b73c6b 100644 --- a/desktop/internal/workbench/build_options.go +++ b/desktop/internal/workbench/build_options.go @@ -140,6 +140,12 @@ type buildOptionsEditor struct { loading bool saving bool failure string + // runtimes are the Runtime section's rows, read in the background when the dialog opens on an + // instance; runtimesLoaded says they arrived. + runtimes []buildRuntimeView + runtimesLoaded bool + // dropped are the saved options the build system no longer declares, with their saved values. + dropped []buildDroppedOption } // buildIgnoredPathsEditor is the ignored-paths field of the dialog, one pattern a line, filled with the list @@ -208,6 +214,9 @@ func (a *App) openBuildOptions(p *project, instance *buildInstance) { } p.build.options = editor a.readBuildIgnoredPaths(p, false) + if instance != nil { + a.readBuildInstanceDetails(p, *instance, droppedBuildOptionIDs(instance, editor.fields)) + } } // readBuildIgnoredPaths fills the ignored-paths field with the list Core picks from the stored documents or, @@ -466,6 +475,8 @@ func (a *App) buildOptionsDialog(c ui.C, p *project) { for index := range e.fields { a.drawRunOptionField(k.KeyInt(index), language, &e.fields[index], ready) } + a.buildRuntimeSection(c, language, e) + a.buildDroppedOptionsSection(c, language, p, ready) } if e.loading { ui.Text(c, i18n.Shared(language, "native.loading")).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) diff --git a/desktop/internal/workbench/build_options_runtime.go b/desktop/internal/workbench/build_options_runtime.go new file mode 100644 index 000000000..aa02228be --- /dev/null +++ b/desktop/internal/workbench/build_options_runtime.go @@ -0,0 +1,346 @@ +package workbench + +import ( + "bytes" + "context" + "encoding/json" + "slices" + "strings" + + "github.com/1lck/Lithe-IDEA/desktop/internal/core" + "github.com/1lck/Lithe-IDEA/desktop/internal/i18n" + "github.com/1lck/Lithe-IDEA/desktop/internal/icons" + "github.com/1lck/Lithe-IDEA/desktop/internal/settingswindow" + "github.com/vivaui/viva/ui" +) + +// A build system's options dialog also shows what its options do not: the build tool and the runtimes it +// runs on, as they resolve now (IntelliJ IDEA shows the Maven home and the runner's JRE the same way). A +// build runs on the runtime its invocation names, and a launch prepared by the plugin names the same +// toolchain, so the project has one runtime for both: the section says so and leads to the Toolchains page +// where it is chosen, instead of an option that would change the build's runtime alone. +// +// A plugin update may stop declaring an option the user had saved. Detection then names it in the +// instance's droppedOptions and ignores its value. The dialog lists those options with the value saved, so +// the user can move the value where it now belongs, and removes this machine's values on request; a value +// in the project's shared file is only pointed at, since this client never rewrites that file. + +// buildRuntimeView is one row of the Runtime section: the build tool or a runtime it runs on, with the +// executable it resolves to and where that came from, or why none was found. +type buildRuntimeView struct { + name string + executable string + source buildExecutionSource + failure string +} + +// buildDroppedOption is a saved option the build system no longer declares: the value this machine saved +// for it and the value saved in the project's shared file, either of which may be absent. +type buildDroppedOption struct { + id string + local, team string + hasLocal bool + hasTeam bool +} + +// droppedBuildOptionIDs are the instance's dropped options that its manifest no longer declares. A +// declared option whose value was refused is in droppedOptions too, but its field is in the dialog, where +// the user sets it again. +func droppedBuildOptionIDs(instance *buildInstance, fields []runOptionField) []string { + var ids []string + for _, id := range instance.DroppedOptions { + if !slices.ContainsFunc(fields, func(field runOptionField) bool { return field.id == id }) { + ids = append(ids, id) + } + } + return ids +} + +// readBuildInstanceDetails fills the dialog's Runtime section and the values of its dropped options in the +// background. Both are read for this opening of the dialog only; nothing is stored. +func (a *App) readBuildInstanceDetails(p *project, instance buildInstance, dropped []string) { + session, root, messages := p.build.options.session, p.root, a.text.Build + tool := buildSystemName(&instance) + a.background(p, buildRequestTimeout, func(ctx context.Context) func(*App) { + var values []buildDroppedOption + var readErr error + if len(dropped) > 0 { + values, readErr = a.readDroppedBuildOptions(ctx, root, instance, dropped) + } + runtimes, planErr := a.resolveBuildRuntimes(ctx, p, instance, tool, messages) + if readErr != nil { + a.backgroundFailedIn(ctx, "build_options_dropped", readErr) + } + if planErr != nil { + a.backgroundFailedIn(ctx, "build_options_runtime", planErr) + } + return func(a *App) { + e := &p.build.options + if !e.open || e.session != session { + return + } + if readErr == nil { + e.dropped = values + } + e.runtimes, e.runtimesLoaded = runtimes, true + if planErr != nil { + e.runtimes = []buildRuntimeView{{name: tool, failure: planErr.Error()}} + } + } + }) +} + +// resolveBuildRuntimes is the build tool, named tool, and each runtime it runs on, resolved through the +// candidates Core orders for the instance, the same lookup a build makes but without its version probes. +func (a *App) resolveBuildRuntimes(ctx context.Context, p *project, instance buildInstance, tool string, messages i18n.BuildMessages) ([]buildRuntimeView, error) { + settings, err := a.loadPluginPreferenceSources(ctx, instance.Manifest, p.root) + if err != nil { + return nil, err + } + invocation, err := a.kernel.PlanBuildInvocation(ctx, instance.Manifest, instance.BuildSystemID, core.BuildInvocationRequest{Root: instance.Root, Platform: buildPlatform(), Settings: settings.State.Settings}) + if err != nil { + return nil, err + } + runtimes := make(map[string]buildExecution, len(invocation.RuntimeDependencies)) + views := make([]buildRuntimeView, 0, len(invocation.RuntimeDependencies)+1) + resolve := func(name string, candidates []core.BuildExecutableCandidate, minimum string) (buildExecution, bool) { + view := buildRuntimeView{name: name} + resolved, err := a.resolveBuildCandidates(ctx, p, instance.Root, candidates, minimum, messages, runtimes) + if err != nil { + view.failure = err.Error() + } else { + view.executable, view.source = resolved.Executable, resolved.Source + } + views = append(views, view) + return resolved, err == nil + } + for _, requirement := range invocation.RuntimeDependencies { + name := requirement.DisplayName + if name == "" { + name = requirement.ID + } + if resolved, ok := resolve(name, requirement.Executables, requirement.MinimumVersion); ok { + runtimes[requirement.ID] = resolved + } + } + // The tool comes first in the section, as the thing the runtimes serve. + resolve(tool, invocation.Executables, invocation.MinimumVersion) + views = append(views[len(views)-1:], views[:len(views)-1]...) + return views, nil +} + +// readDroppedBuildOptions is the value each dropped option has in the local and the team document, as the +// instance's root reads it: the root's own value, else the build system's, else its instance default. An +// option that has neither is left out. +func (a *App) readDroppedBuildOptions(ctx context.Context, root string, instance buildInstance, ids []string) ([]buildDroppedOption, error) { + docs, err := a.readBuildOptionDocuments(ctx, root) + if err != nil { + return nil, err + } + var local struct { + Document json.RawMessage `json:"document"` + } + if err := json.Unmarshal(docs.local, &local); err != nil { + return nil, err + } + var options []buildDroppedOption + for _, id := range ids { + option := buildDroppedOption{id: id} + option.local, option.hasLocal = storedBuildOptionValue(local.Document, instance.BuildSystemID, instance.Root, id) + option.team, option.hasTeam = storedBuildOptionValue(docs.team, instance.BuildSystemID, instance.Root, id) + if option.hasLocal || option.hasTeam { + options = append(options, option) + } + } + return options, nil +} + +// storedBuildOptionValue is the value document holds for option id of system at root, as text: a string as +// it is, anything else as compact JSON. +func storedBuildOptionValue(document json.RawMessage, system, root, id string) (string, bool) { + var parsed struct { + Systems map[string]struct { + Options map[string]json.RawMessage `json:"options"` + InstanceDefaults map[string]json.RawMessage `json:"instanceDefaults"` + Instances map[string]map[string]json.RawMessage `json:"instances"` + } `json:"systems"` + } + if len(document) == 0 || json.Unmarshal(document, &parsed) != nil { + return "", false + } + entry, ok := parsed.Systems[system] + if !ok { + return "", false + } + for _, values := range []map[string]json.RawMessage{entry.Instances[root], entry.Options, entry.InstanceDefaults} { + raw, ok := values[id] + if !ok { + continue + } + var text string + if json.Unmarshal(raw, &text) == nil { + return text, true + } + var compact bytes.Buffer + if json.Compact(&compact, raw) != nil { + return string(raw), true + } + return compact.String(), true + } + return "", false +} + +// clearDroppedBuildOptions removes this machine's values of the dropped options, one Core edit each, then +// reads the documents again: an option whose value is also in the project's shared file stays listed. +func (a *App) clearDroppedBuildOptions(p *project) { + e := &p.build.options + instance := p.buildInstanceByID(e.instance) + if !e.open || e.saving || instance == nil { + return + } + var changes []buildOptionChange + ids := make([]string, 0, len(e.dropped)) + for _, option := range e.dropped { + ids = append(ids, option.id) + if option.hasLocal { + changes = append(changes, buildOptionChange{optionID: option.id}) + } + } + if len(changes) == 0 { + return + } + e.saving, e.failure = true, "" + session, target := e.session, *instance + a.saveBuildOptionChanges(p, instance, changes, nil, func(_ json.RawMessage, err error) { + e := &p.build.options + if !e.open || e.session != session { + return + } + e.saving = false + if err != nil { + e.failure = err.Error() + return + } + a.background(p, buildRequestTimeout, func(ctx context.Context) func(*App) { + values, err := a.readDroppedBuildOptions(ctx, p.root, target, ids) + if err != nil { + a.backgroundFailedIn(ctx, "build_options_dropped", err) + } + return func(a *App) { + if e := &p.build.options; e.open && e.session == session && err == nil { + e.dropped = values + } + } + }) + }) +} + +// buildRuntimeSection declares the Runtime section of a build system's options dialog. +func (a *App) buildRuntimeSection(c ui.C, language i18n.Language, e *buildOptionsEditor) { + if !e.runtimesLoaded || len(e.runtimes) == 0 { + return + } + ui.Column(c.Part("runtime")).FillWidth().Gap(6).MarginTop(6).Children(func() { + a.buildRuntimeRows(c, language, e) + }) +} + +// buildRuntimeRows declares the Runtime section's heading, its rows and its help. +func (a *App) buildRuntimeRows(c ui.C, language i18n.Language, e *buildOptionsEditor) { + ui.Row(c).FillWidth().Items(ui.Center).Gap(4).Children(func() { + a.buildOptionsHeading(c, i18n.Shared(language, "desktop.build.runtimeHeading")) + ui.Spacer(c) + if ui.Button(c.Part("toolchains"), i18n.Shared(language, "desktop.build.openToolchains")).Ghost().Small().Clicked() { + c.After(func() { a.openSettingsPage(surfaceButton, settingsToolchainsPage) }) + } + }) + for index, runtime := range e.runtimes { + k := c.KeyInt(index) + ui.Row(k).FillWidth().Items(ui.Center).Gap(8).Children(func() { + ui.Text(k, runtime.name).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis().Shrink(0).MaxWidth(120) + if runtime.failure != "" { + ui.Text(k, runtime.failure).FontSize(a.theme.Metrics.FontSizeS).Color(a.theme.Danger).Ellipsis().Shrink(1).MinWidth(0) + return + } + ui.Text(k, runtime.executable).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis().Shrink(1).MinWidth(0) + ui.Spacer(k) + ui.Text(k, buildExecutionSourceLabel(language, runtime.source)).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis().Shrink(0).MaxWidth(160) + }) + } + ui.Wrap(c, i18n.Shared(language, "desktop.build.runtimeHelp")).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle) +} + +// buildExecutionSourceLabel names where an executable was found: the toolchain's version and resolver +// layer, the environment variable, the system PATH, the plugin's setting or the project's wrapper. +func buildExecutionSourceLabel(language i18n.Language, source buildExecutionSource) string { + switch source.Kind { + case "toolchain": + parts := []string{} + if source.Version != "" { + parts = append(parts, source.Version) + } + if source.Layer != "" { + parts = append(parts, settingswindow.ToolchainLayerLabel(language, source.Layer)) + } + return strings.Join(parts, " · ") + case "environment": + return i18n.SharedFormat(language, "desktop.build.sourceEnvironment", map[string]string{"variable": source.Variable}) + case "command": + return i18n.Shared(language, "desktop.build.sourcePath") + case "setting": + return i18n.Shared(language, "desktop.build.sourceSetting") + case "projectFile": + return i18n.Shared(language, "desktop.build.sourceProjectFile") + default: + return "" + } +} + +// buildDroppedOptionsSection declares the notice of saved options the build system no longer declares. +func (a *App) buildDroppedOptionsSection(c ui.C, language i18n.Language, p *project, ready bool) { + e := &p.build.options + if len(e.dropped) == 0 { + return + } + ui.Column(c.Part("dropped")).FillWidth().Gap(6).MarginTop(6).Children(func() { + a.buildDroppedOptionRows(c, language, p, ready) + }) +} + +// buildDroppedOptionRows declares the notice, one row a dropped option, and Clear when this machine +// holds a value. +func (a *App) buildDroppedOptionRows(c ui.C, language i18n.Language, p *project, ready bool) { + e := &p.build.options + ui.Row(c).FillWidth().Items(ui.Start).Gap(6).Children(func() { + ui.Icon(c, icons.Info).Size(14, 14).Color(a.colors.Warning).Shrink(0) + ui.Wrap(c, i18n.Shared(language, "desktop.build.droppedOptions")).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Shrink(1).MinWidth(0) + }) + local := false + for index, option := range e.dropped { + k := c.KeyInt(index) + value := option.local + if !option.hasLocal { + value = option.team + } + ui.Column(k).FillWidth().Gap(2).Children(func() { + ui.Text(k, option.id+" = "+value).FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Text).Ellipsis() + if option.hasTeam { + ui.Text(k, i18n.SharedFormat(language, "desktop.build.droppedInTeam", map[string]string{"file": buildTeamOptionsFile})). + FontSize(a.theme.Metrics.FontSizeS).Color(a.colors.Subtle).Ellipsis() + } + }) + local = local || option.hasLocal + } + if !local { + return + } + ui.Row(c).FillWidth().Children(func() { + ui.Spacer(c) + if ui.Button(c.Part("clear-dropped"), i18n.Shared(language, "desktop.build.clearDropped")).Outline().Small().Disabled(!ready).Clicked() { + c.After(func() { + a.performed("build.options.clearDropped", surfaceButton) + a.clearDroppedBuildOptions(p) + }) + } + }) +} diff --git a/desktop/internal/workbench/build_options_runtime_test.go b/desktop/internal/workbench/build_options_runtime_test.go new file mode 100644 index 000000000..41343e183 --- /dev/null +++ b/desktop/internal/workbench/build_options_runtime_test.go @@ -0,0 +1,135 @@ +package workbench + +import ( + "context" + "encoding/json" + "os" + "path/filepath" + "slices" + "strings" + "testing" + "time" + + "github.com/1lck/Lithe-IDEA/desktop/internal/core" + "github.com/1lck/Lithe-IDEA/desktop/internal/i18n" +) + +// treeOptionsRuntimeManifest runs the fixture's build tool, a wrapper in the project, on a runtime the +// toolchain resolver selects. +var treeOptionsRuntimeManifest = strings.Replace(treeOptionsStaticManifest, + `"executables": [{"kind": "command", "command": "fixture-build"}],`, + `"executables": [{"kind": "projectFile", "path": "fixturew"}], + "runtimeDependencies": [{"id": "fixture-runtime", "executables": [{"kind": "toolchain", "toolchainID": "fixture-runtime"}]}],`, 1) + +// A build system's options dialog shows the build tool and the runtime it runs on, where each came from, +// and a way to the Toolchains page, where the project's one runtime is chosen. An option saved before the +// plugin stopped declaring it is listed with its value, and Clear removes this machine's value. +func TestBuildOptionsShowTheRuntimeAndDroppedOptions(t *testing.T) { + h, p := openTreeOptionsProjectWith(t, &testKernel{Client: core.NewClient()}, treeOptionsRuntimeManifest) + language := h.app.language() + wrapper := filepath.Join(p.root, "fixturew") + if err := os.WriteFile(wrapper, []byte("#!/bin/sh\n"), 0o755); err != nil { + t.Fatal(err) + } + const runtimeExecutable = "/opt/fixture-runtime/bin/run" + h.app.toolchainResolve = func(_ context.Context, _, _, tool, _ string) (core.ToolchainSelection, error) { + if tool != "fixture-runtime" { + t.Errorf("resolved toolchain %q, want fixture-runtime", tool) + } + return core.ToolchainSelection{Executable: runtimeExecutable, Version: "21.0.2", Layer: "project"}, nil + } + + // The plugin no longer declares legacyHome; its value is still saved on this machine. + local := json.RawMessage(`{"version":1,"document":{"version":1,"systems":{"fixture-profiles":{"options":{"legacyHome":"/opt/fixture-17"}}}}}`) + if err := h.app.storeBuildLocalOptions(p.root, local); err != nil { + t.Fatal(err) + } + h.app.requestBuildReload(p) + awaitStateWithin(t, h, 10*time.Second, "detection to report the dropped option", func() bool { + instance := p.selectedBuildInstance() + return !p.build.loading && instance != nil && slices.Contains(instance.DroppedOptions, "legacyHome") + }) + h.settle() + + h.clickNamed(h.instanceOptions(p)) + awaitStateWithin(t, h, 10*time.Second, "the runtime section and the dropped option", func() bool { + e := &p.build.options + return e.open && !e.loading && e.runtimesLoaded && len(e.dropped) == 1 + }) + h.settle() + runtimes := p.build.options.runtimes + if len(runtimes) != 2 { + t.Fatalf("runtime rows = %+v, want the tool and its runtime", runtimes) + } + if tool := runtimes[0]; tool.name != "Fixture Build" || tool.executable != wrapper || tool.source.Kind != "projectFile" { + t.Fatalf("tool row = %+v, want the project's wrapper", tool) + } + if run := runtimes[1]; run.name != "fixture-runtime" || run.executable != runtimeExecutable || run.source.Kind != "toolchain" { + t.Fatalf("runtime row = %+v, want the toolchain's selection", run) + } + for _, label := range []string{ + i18n.Shared(language, "desktop.build.runtimeHeading"), + runtimeExecutable, + buildExecutionSourceLabel(language, runtimes[1].source), + i18n.Shared(language, "desktop.build.sourceProjectFile"), + // The notice wraps; its first words are on its first line. + strings.Join(strings.Fields(i18n.Shared(language, "desktop.build.droppedOptions"))[:4], " "), + "legacyHome = /opt/fixture-17", + } { + if !h.shows(label) { + t.Fatalf("the dialog does not show %q", label) + } + } + if !strings.Contains(buildExecutionSourceLabel(language, runtimes[1].source), "21.0.2") { + t.Fatalf("the runtime's source %q does not name its version", buildExecutionSourceLabel(language, runtimes[1].source)) + } + if h.hitLabeled(i18n.Shared(language, "desktop.build.openToolchains")).Width == 0 { + t.Fatal("the dialog has no way to the Toolchains page") + } + + h.clickShared("desktop.build.clearDropped") + awaitStateWithin(t, h, 10*time.Second, "the dropped value to be removed", func() bool { + e := &p.build.options + return e.open && !e.saving && len(e.dropped) == 0 + }) + docs, err := h.app.readBuildOptionDocuments(context.Background(), p.root) + if err != nil { + t.Fatal(err) + } + if strings.Contains(string(docs.local), "legacyHome") { + t.Fatalf("local options %s still hold the dropped option", docs.local) + } + awaitStateWithin(t, h, 10*time.Second, "detection without the dropped option", func() bool { + instance := p.selectedBuildInstance() + return !p.build.loading && instance != nil && len(instance.DroppedOptions) == 0 + }) + h.settle() + + // The Toolchains page opens in a window of its own, which a window made without an application cannot + // open; the button reports nothing and keeps the dialog. + h.clickShared("desktop.build.openToolchains") + h.settle() + if h.app.notice != "" || !p.build.options.open { + t.Fatalf("after Toolchain Settings… notice = %q, dialog open %v", h.app.notice, p.build.options.open) + } +} + +// A runtime's source names the toolchain's version and the layer it was selected from, or the variable, +// PATH, setting or wrapper it was found by. +func TestBuildExecutionSourceLabel(t *testing.T) { + language := i18n.English + for _, test := range []struct { + source buildExecutionSource + want string + }{ + {buildExecutionSource{Kind: "toolchain", Version: "17.0.9"}, "17.0.9"}, + {buildExecutionSource{Kind: "environment", Variable: "FIXTURE_HOME"}, i18n.SharedFormat(language, "desktop.build.sourceEnvironment", map[string]string{"variable": "FIXTURE_HOME"})}, + {buildExecutionSource{Kind: "command"}, i18n.Shared(language, "desktop.build.sourcePath")}, + {buildExecutionSource{Kind: "setting"}, i18n.Shared(language, "desktop.build.sourceSetting")}, + {buildExecutionSource{}, ""}, + } { + if got := buildExecutionSourceLabel(language, test.source); got != test.want { + t.Errorf("source %+v = %q, want %q", test.source, got, test.want) + } + } +} diff --git a/desktop/internal/workbench/build_toolbar_options_visual_test.go b/desktop/internal/workbench/build_toolbar_options_visual_test.go index 343c66573..213bbc647 100644 --- a/desktop/internal/workbench/build_toolbar_options_visual_test.go +++ b/desktop/internal/workbench/build_toolbar_options_visual_test.go @@ -3,6 +3,8 @@ package workbench import ( + "context" + "encoding/json" "os" "path/filepath" "strings" @@ -84,3 +86,61 @@ func TestVisualBuildToolbarToggleAndOptionPaths(t *testing.T) { }) } } + +// TestVisualBuildOptionsRuntimeAndDroppedOptions captures a build system's options dialog with its +// Runtime section, the tool and the runtime it runs on with where each came from, and the notice of an +// option saved before the plugin stopped declaring it (#2203). +func TestVisualBuildOptionsRuntimeAndDroppedOptions(t *testing.T) { + out := os.Getenv("LITHE_VISUAL_OUTPUT_DIR") + if out == "" { + t.Skip("set LITHE_VISUAL_OUTPUT_DIR") + } + if err := os.MkdirAll(out, 0o755); err != nil { + t.Fatal(err) + } + for _, scene := range []struct{ theme, language string }{{"light", "zh-CN"}, {"dark", "en-US"}} { + name := scene.theme + "-" + scene.language + t.Run(name, func(t *testing.T) { + preferences, pluginRoot, root := treeOptionsWorkspace(t, treeOptionsRuntimeManifest, scene.theme) + if err := os.WriteFile(filepath.Join(root, "fixturew"), []byte("#!/bin/sh\n"), 0o755); err != nil { + t.Fatal(err) + } + var session *headless.Session + h := newHarnessWithDriver(t, Options{ + Kernel: &testKernel{Client: core.NewClient()}, PluginKernel: &testKernel{Client: core.NewClient()}, + PluginRoot: pluginRoot, Store: preferences, Languages: []string{scene.language}, + }, func(config app.Config) (*app.Driver, func(), error) { + config.Width, config.Height = 1280, 800 + var err error + session, err = headless.Open(config, nil, headless.Options{Scale: 1}) + if err != nil { + return nil, nil, err + } + return session.Driver(), session.Close, nil + }) + h.app.toolchainResolve = func(context.Context, string, string, string, string) (core.ToolchainSelection, error) { + return core.ToolchainSelection{Executable: "/opt/fixture-runtime-21/bin/run", Version: "21.0.2", Layer: "project"}, nil + } + p := showTreeOptionsProject(t, h, root) + local := json.RawMessage(`{"version":1,"document":{"version":1,"systems":{"fixture-profiles":{"options":{"legacyHome":"/opt/fixture-runtime-17"}}}}}`) + if err := h.app.storeBuildLocalOptions(p.root, local); err != nil { + t.Fatal(err) + } + h.app.requestBuildReload(p) + awaitStateWithin(t, h, 10*time.Second, "the dropped option", func() bool { + instance := p.selectedBuildInstance() + return !p.build.loading && instance != nil && len(instance.DroppedOptions) == 1 + }) + h.settle() + h.clickNamed(h.instanceOptions(p)) + h.settleUntil("the options dialog", func() bool { + e := &p.build.options + return e.open && !e.loading && e.runtimesLoaded && len(e.dropped) == 1 + }) + h.settle() + if err := session.Screenshot(filepath.Join(out, "build-instance-runtime-"+name+".png")); err != nil { + t.Fatal(err) + } + }) + } +} diff --git a/desktop/internal/workbench/settings.go b/desktop/internal/workbench/settings.go index 874a4dde5..fb693972a 100644 --- a/desktop/internal/workbench/settings.go +++ b/desktop/internal/workbench/settings.go @@ -399,6 +399,9 @@ const ( // settingsVersionControl is the Version Control page, which the Git console's settings // button opens. settingsVersionControl + // settingsToolchainsPage is the Toolchains page, where a build's options dialog leads to the + // runtime its builds and launches use. + settingsToolchainsPage ) func (a *App) openSettingsPage(surface actionSurface, page settingsPage) { @@ -462,6 +465,8 @@ func (a *App) openSettingsPageWith(surface actionSurface, page settingsPage, que err = a.settingsWindow.OpenAI(a.application, current) case settingsVersionControl: err = a.settingsWindow.OpenVersionControl(a.application, current) + case settingsToolchainsPage: + err = a.settingsWindow.OpenToolchains(a.application, current) default: err = a.settingsWindow.Open(a.application, current) } diff --git a/desktop/internal/workbench/toolchains.go b/desktop/internal/workbench/toolchains.go index 71dc7edb4..762add598 100644 --- a/desktop/internal/workbench/toolchains.go +++ b/desktop/internal/workbench/toolchains.go @@ -20,6 +20,16 @@ type buildExecution struct { Executable string Environment map[string]string PathPrepend []string + // Source is the candidate the executable was found by, which the options dialog shows + // beside a build's runtime. + Source buildExecutionSource +} + +// buildExecutionSource is where an executable came from: the candidate kind Core listed it under +// ("toolchain", "environment", "command", "setting", "projectFile"), the environment variable of +// an environment candidate, and the version and resolver layer of a toolchain selection. +type buildExecutionSource struct { + Kind, Variable, Version, Layer string } // toolchainManifests reads the enabled plugins' manifests off the window diff --git a/scripts/desktop/build-desktop-core.sh b/scripts/desktop/build-desktop-core.sh index 8a6985417..ef6199cca 100755 --- a/scripts/desktop/build-desktop-core.sh +++ b/scripts/desktop/build-desktop-core.sh @@ -284,7 +284,7 @@ PINNED_CORE_REPOSITORY="https://github.com/Lithe-IDEA/Lithe-core-rust.git" # the contract, plugin guides, reference and SDKs live only in shared/plugins; on top of #16 (reported Git queries folded in the console), # #15 (git.write cherryPick, revert and reset fields), #14 (word-level changed ranges of diff # rows), #13, #8, #7, #6 and #4. -PINNED_CORE_REVISION="7ca513446a324b1e9236aa43afa503d5219cb435" +PINNED_CORE_REVISION="42e360168f05a65488b75af6b71a6d347d8f467b" PROFILE="debug" while [[ $# -gt 0 ]]; do case "$1" in diff --git a/shared/i18n/locales/en-US.json b/shared/i18n/locales/en-US.json index 7b86e93cf..bebb98c1e 100644 --- a/shared/i18n/locales/en-US.json +++ b/shared/i18n/locales/en-US.json @@ -11503,6 +11503,16 @@ "desktop.toolchains.globalHelp": "Manage detected and manually added SDKs for all projects. Save writes to the application’s user settings; projects can override the default. Existing processes use the new SDK after restarting.", "desktop.toolchains.project": "Current project", "desktop.build.optionOverride": "Override", + "desktop.build.runtimeHeading": "Runtime", + "desktop.build.runtimeHelp": "Builds and launches use the same runtime. To change it, choose the project's installation in Toolchain settings.", + "desktop.build.openToolchains": "Toolchain Settings…", + "desktop.build.sourceEnvironment": "{variable} environment variable", + "desktop.build.sourcePath": "System PATH", + "desktop.build.sourceSetting": "Plugin setting", + "desktop.build.sourceProjectFile": "Project wrapper", + "desktop.build.droppedOptions": "The plugin no longer offers these options, so their saved values have no effect. Use the options or the runtime above where needed.", + "desktop.build.droppedInTeam": "Saved in {file}; change it in the project", + "desktop.build.clearDropped": "Clear Saved Values", "desktop.build.optionChoiceDefault": "default", "desktop.build.optionChoiceDefaultLabel": "{title} (default)", "desktop.build.toggleOptionChoice": "Toggle {option}: {choice}", diff --git a/shared/i18n/locales/zh-CN.json b/shared/i18n/locales/zh-CN.json index 5b6e4d126..e8118bc99 100644 --- a/shared/i18n/locales/zh-CN.json +++ b/shared/i18n/locales/zh-CN.json @@ -11503,6 +11503,16 @@ "desktop.toolchains.globalHelp": "统一管理自动识别和手动添加的 SDK,保存到应用的用户设置。项目可单独覆盖默认版本;已启动的进程需重启后使用新版本。", "desktop.toolchains.project": "当前项目", "desktop.build.optionOverride": "覆盖", + "desktop.build.runtimeHeading": "运行环境", + "desktop.build.runtimeHelp": "构建和启动使用同一个运行时。要更换,请在工具链设置中为项目选择安装。", + "desktop.build.openToolchains": "工具链设置…", + "desktop.build.sourceEnvironment": "环境变量 {variable}", + "desktop.build.sourcePath": "系统 PATH", + "desktop.build.sourceSetting": "插件设置", + "desktop.build.sourceProjectFile": "项目内的包装脚本", + "desktop.build.droppedOptions": "插件已不再提供以下选项,保存的值不会生效。需要时请改用上面的选项或运行环境。", + "desktop.build.droppedInTeam": "保存在 {file} 中,需在项目里修改", + "desktop.build.clearDropped": "清除本机保存的值", "desktop.build.optionChoiceDefault": "默认", "desktop.build.optionChoiceDefaultLabel": "{title}(默认)", "desktop.build.toggleOptionChoice": "切换 {option}:{choice}", diff --git a/shared/i18n/messages.json b/shared/i18n/messages.json index d9b300bb8..34037c4ba 100644 --- a/shared/i18n/messages.json +++ b/shared/i18n/messages.json @@ -109801,6 +109801,82 @@ "desktop" ] }, + { + "id": "desktop.build.runtimeHeading", + "description": "Heading of the section of a build system's options dialog that shows the build tool and the runtimes it runs on, as they resolve now.", + "platforms": [ + "desktop" + ] + }, + { + "id": "desktop.build.runtimeHelp", + "description": "Explains under the Runtime heading that builds and launches use one runtime, chosen in the Toolchains settings page.", + "platforms": [ + "desktop" + ] + }, + { + "id": "desktop.build.openToolchains", + "description": "Button in a build system's options dialog that opens the Toolchains settings page.", + "platforms": [ + "desktop" + ] + }, + { + "id": "desktop.build.sourceEnvironment", + "description": "Where a build's tool or runtime was found: the environment variable {variable} names its home directory.", + "platforms": [ + "desktop" + ], + "parameters": { + "variable": "string" + } + }, + { + "id": "desktop.build.sourcePath", + "description": "Where a build's tool or runtime was found: a command on the system PATH.", + "platforms": [ + "desktop" + ] + }, + { + "id": "desktop.build.sourceSetting", + "description": "Where a build's tool or runtime was found: the path set in the plugin's settings.", + "platforms": [ + "desktop" + ] + }, + { + "id": "desktop.build.sourceProjectFile", + "description": "Where a build's tool was found: a wrapper script inside the project.", + "platforms": [ + "desktop" + ] + }, + { + "id": "desktop.build.droppedOptions", + "description": "Notice in a build system's options dialog listing saved options the plugin no longer declares; their values are ignored.", + "platforms": [ + "desktop" + ] + }, + { + "id": "desktop.build.droppedInTeam", + "description": "Beside a dropped build option whose value is saved in the project's shared options file {file}, which only the project can change.", + "platforms": [ + "desktop" + ], + "parameters": { + "file": "string" + } + }, + { + "id": "desktop.build.clearDropped", + "description": "Button that removes this machine's saved values of the build options the plugin no longer declares.", + "platforms": [ + "desktop" + ] + }, { "id": "desktop.build.optionChoiceDefaultLabel", "description": "Label of a default-active build option choice in an option editor: {title}", diff --git a/shared/platform-feature-matrix/features/build-system-plugins.json b/shared/platform-feature-matrix/features/build-system-plugins.json index bb511bb96..f42f5cb2f 100644 --- a/shared/platform-feature-matrix/features/build-system-plugins.json +++ b/shared/platform-feature-matrix/features/build-system-plugins.json @@ -85,7 +85,7 @@ }, "owner": "Extensions", "verification": "macOS 已接入 static、command、hostIntegration、provider 四种模型来源:宿主向 Core 声明 buildSystems 与 buildProviders 能力,插件市场因此列出兼容的 API 3 声明式和 Provider 版本;Provider 进程按插件、构建系统和工作区各自独立,经各自 stdio 用 JSON-RPC(LSP 基础协议)与宿主通信,initialize 协商 capabilities.experimental.litheBuild 后宿主才经 lsp.buildRequest 发送 lithe/build/model、lithe/build/dependencies,回复交给 Core 解码;共享写法只复用同一插件的语言服务器会话;进程只在用户加载模型或依赖时启动,切换工作区、关闭项目窗口、停止执行模块、停用或更新插件、退出应用时停止;ExecutionFeatureGraph.stop 经 BuildSystemService.stop 同时回收已就绪和初始化中的 Provider,停止后的初始化完成也不得重新登记会话;状态写入插件状态目录;每个已启用的构建系统插件在打开工作区后各有一个右侧工具窗口(标题为 displayName、图标为 icon),不依赖识别结果,工作区没有对应工程时窗口内显示未检测到该构建系统,工具栏放运行、参数任务、刷新和 presentation=toolbar 的开关,树顶部是 presentation=tree 的勾选选项,工程下按 category(缺省按 group)分级列出任务,再列测试、目标和依赖;旧客户端内置的构建窗口与共享 Build 窗口已删除,Build Output 显示输出、诊断与测试结果。窗口恢复先激活所属插件模块,激活中的命令面板项禁用;参数任务遵守 workspace/project/target 作用范围与目标标签,模型或工作区变化后清除旧选择。隔离回归覆盖这些边界、窗口布局恢复及包内图标读取前后文件清单与字节不变;多实例的根目录选择器保留每个实例的模型候选和生效值,编辑多选时保留兄弟实例独有的已选值;显式清空按实例根持久化为空覆盖,检测、同步指纹、任务计划和语言服务器导入使用同一覆盖,兄弟编辑或重开不会恢复非空默认值,非空编辑清当前实例标记而共享编辑/重置清该选项全部标记;真实 Core、生产存储与服务回归核对最终 argv 和导入值;列表单选与多选支持 allowCustom 原生输入和移除已选自定义值,文本/文件/目录清空提交显式空字符串,只有重置删除覆盖。运行时准备后再等一次,覆盖等待期间失效。命令模型 run 配置尚未接入;buildProviders 2 已接入原生任务 lithe/build/execute,复用工作区进程并校验协议版本、进度/结果、取消/超时和旧结果隔离,真实安装包/工具工作流仍待验收,Provider 无操作系统级沙盒;Windows 宿主尚未调用 build.* 命令。自动化:cargo test -p lithe-core --lib build_systems、cargo test -p lithe-core --lib lsp、scripts/architecture/verify-shared-contracts.sh、./scripts/macos/test/test-macos.sh --filter 'BuildSystemToolWindowTests|RustBuildSystemOperationsTests|BuildSystemServiceTests|PluginMarketplaceServiceTests'。手动验证:安装 fixtures 中 build-static-file、build-command-stdout 形态的插件包,确认每个构建系统各出现一个工具窗口,列出工程、分级任务、选项和依赖,停用插件后窗口消失;执行任务与测试的 argv 与 build-plans.json 一致,停止与输出上限生效;JUnit 报告与 lineMatcher 诊断可跳转到源码;命令模型和项目内 Wrapper 只在用户点击加载或运行后启动;禁用插件后实例消失;Windows 接入后另需验证未信任工作区不启动任何模型命令或 Wrapper;build-provider 形态的自有 Provider 只在用户操作或工作区信任后启动、停用插件时停止,build-provider-language-server 形态复用语言服务器会话而不启动第二个进程;运行前后 app bundle 文件清单不变(scripts/desktop/verify/verify-runtime-bundle-immutability.sh)。;新路径选择使用 executableResolution 1 + settings 2,已发布 buildSystems 2 旧字段只作统一候选输入适配:MacBuildToolResolverTests 验证带空格绝对路径、权限与版本失败不回退,BuildSystemServiceTests 验证 Provider 失败不独立发现,RustBuildSystemOperationsTests 验证全局值接入。发布前需把独立仓库 sdk.lock.json 的宿主 pin 更新到包含该能力的已发布提交。;回归增加非法存储值不回默认、数组/priority/插入顺序与拒绝循环、宿主注入发现、空设置跳过和被动选择不探测;Language Server/Execution Provider 新清单语法尚未开放,Windows 不声明 executableResolution。;真实 Core + macOS resolver + BuildSystemService 组合回归覆盖前置 Runtime 缺失/版本不足时保留工具或后置 Runtime 的非空 setting 约束,Provider 不发送独立发现请求;全部设置为空时仍可回退。自定义 Runtime 先构造含所选目录的 PATH,再以同一环境探测与执行,同目录 helper 的带空格路径回归通过。;buildProviders 3 增加原生测试执行 lithe/build/test,筛选参数保持类型化,报告复用 JUnit/标准结果解析;旧协议明确拒绝测试,报告解析期间配置失效会取消操作并丢弃迟到结果。原生树已接入按需测试发现,Core 校验完整清单并保留模块身份,运行前重查当前清单;配置/源码/包变化、停用/重开使缓存或进行中的发现失效。Windows 工作流仍待验收。;buildProviders 4 应用目标准备接入原生 Build 树,构建进度在 Build Output 展示,验证后转交 RunService 解析工具与启动/停止应用;准备期间源码、选项、工作区或停用变化拒绝迟到启动,旧操作 ID 不得停止替换进程;Core 拒绝绝对可执行路径、越界目录/符号链接及超限参数环境。服务编排与调试尚未完成;真实插件/发行包和 Windows 工作流仍待验收。;Run v2 本地层显式保存 Provider 选择器,参数保持原始数组;无 generated.json 也能读回/显示,重复保存保留 ID/其他配置/项目环境;重启重新进入当前 Provider,停止与晚到结果按身份隔离。原生入口保存工作区文档后再准备,Run 窗口在未生成旧配置时仍显示 Provider 输出。;Agent 入口回归从真实本地配置启动,验证准备到进程退出保持公开操作 ID、准备中停止与重启重新准备,旧 ID 不能停止替换操作;Provider 与进程为可控替身,真实插件端到端验收仍待完成。;Core 的 Node/Java SDK 补齐协议 2/3/4 的处理器、版本准入与进度;无页面示例经真实 Core 验证非零构建退出码、精确筛选、运行前构建及准备计划、并行工作区、取消工具清理和完整包不变,另保留锁定旧契约的兼容场景与 TypeScript 调用方编译检查。SDK 尚未发布,Windows 验收仍待完成。 原生 Debug:运行声明引用同包适配器,点击 Build 树 Debug 或保存配置的 Debug 后先保存并构建,验证程序路径/参数/环境交给注册表;停止、源码或配置变化、模型重载、插件停用与工作区切换均丢弃过期结果,解码后的文件别名变化和不可执行文件在平台交接前拒绝。Node/Java SDK 进程的准备协议与 Core 解码有端到端覆盖;真实适配器、跨插件协作和 Windows 尚未验收。 正式包、完整 macOS UI 与 Windows 验收未完成,保持 partial/pending。 真实原生调试集成:公开 Node SDK Provider 用 Clang 编译 C 程序,经生产 macOS 会话、Core 准备、Registry 明确身份、生产 stdio 传输和 LLDB 命中源码断点、读取 main 栈帧、保留空格参数后继续并退出码 0;包 SHA-256/权限不变,所有本次进程回收。测试显式选择 SDK/工具,完整 UI、正式发行与 Windows 尚未验收,verification 保持 pending。 Build 树应用从文档保存阶段起持有同一可取消运行 ID;保存 gate 下启动新任务/测试或停止、切换工作区、选项/源码/模型/插件失效后,旧保存返回不得启动 Provider、替换新运行或清空新输出;保存失败不启动,成功后才准备。 原生视图隔离回归用真实 Core 与受控 Provider 数据检查深浅主题的测试发现、Debug 入口和 Run 输出;截图仅验证该视图状态,不代替完整发行包或 Windows 实机验收。 实例作用域:用同一工作区的两个独立根验证 Profiles、文件/目录、布尔与文本值独立持久化;编辑、清空或重置 A 不影响 B,重开后任务、静态运行入口、同步和语言导入读取相同根的配置;未声明作用域的插件保留共享行为。Windows 运行验收另行完成,保持 partial/pending。 作用域变更的旧 Build 偏好先复制并验证目标,再删除共享源;写入失败阻止默认配置发布并允许重试,已有实例值优先,暂未检测到根的空标记也迁移保留。 工具链候选通过真实 Core 与生产本地文档验证按实例选择工具,Provider 环境保留选中工具的环境变量与 PATH 且不转发无关测试凭据;被动导入不探测版本或运行 Wrapper,显式路径失败不能独立发现。Windows 不声明 executableResolution 2。 共享 Build 文档验证工作区/实例默认值、逐根覆盖和本机差异合并;重开和检测不改共享字节,重置本机值恢复继承,外部修改冲突或文档损坏明确失败并保留原始数据。 未选中的自定义候选仅在 allowCustom 选项中展示,不改变选择和模型;真实 Core、生产存储和服务回归通过,新增实例静态入口继承团队默认值。 协议 8 回归覆盖协商拒绝、随执行返回的报告、缺失/损坏失败、模块同名测试隔离、取消/配置变更后拒绝晚到解码,以及普通任务中的测试结果。Java/Node SDK 同步,正式发布尚未完成。 本机选项、逐根映射和空多选标记中存在非 Data 存储值时,检测失败并保留原始偏好,不得当缺失键发布默认值。 本机实例默认值继承、逐根覆盖与重置通过真实 Core 和生产存储验证,团队文档字节不变;本机默认值不进入资源复用。 正式发行组合仍待验证。 协议 10 接通带版本协商的类型化运行选项与服务/任务准备(Core、Swift、Node/Java SDK)。原生 Run/Start All 为每个 Provider 服务独立准备,配置 ABA/Stop/重置拒绝旧回复,已停进程输出不能覆盖新会话;Build 树按服务/任务类型发请求;停用和包更新在删除包前停止准备及进程,旧启动注册更新后不可再次使用。macOS 无调用者的旧内置构建桥和工程模型已删除;Windows 当前旧命令消费者、Core 旧实现和正式发行/完整 UI 验收仍待完成。 保存 Provider service/task 引用保留执行类型、稳定配置 ID 和参数,重开后按当前声明重验;独立准备至进程交接保留 Agent 操作身份。 服务所有者使用完整插件包身份;停用其中一个插件不会停止同名构建系统下另一插件的进程。preview 内存检测层保留 Provider 模型摘要,自动识别不写工作区。 Windows Build 选项编辑与 Agent 共用原生本机存储:开页只读,修改草稿后显式保存/恢复继承;隐藏重开保留草稿。团队/本机两层版本同时检查,冲突、关闭、插件撤销拒绝迟到写入。实例选择独立,工作区多选保留兄弟实例值和显式空选择;无关系统/根/记忆选项与团队文件字节保持。保存后重新检测并使旧模型失效。长选项/模型选择使用有界视口,不启动工具或 Provider。产品能力准入仍关闭,不能据此认定 Windows 迁移完成。 Viva 2026-11-09:Tests 工具窗口经 build.testPlan 计划工作区测试,宿主只启动 Core 展开的命令或 Provider 请求;报告由 Core build.decodeTestResults 解码,最终判定由 build.resolveTestRunOutcome 归约,宿主不解析报告格式、不按退出码自行判定。结果树按 suite/case 分组并有界虚拟化,失败项按解码出的 workspace-relative path/line 打开;停止、工作区关闭和过期结果按 run generation 丢弃。desktop/internal/workbench/tests_test.go 以隔离 fixture 插件、真实测试进程和 JUnit fixture 覆盖运行→解码→结果树→失败定位、停止取消和关闭项目停止运行;desktop/internal/workbench/tests_provider_test.go 用真实 Provider 进程(lithe/build/test 返回规范报告)覆盖 Provider 运行→Core 解码→结果树、Provider 取消和关闭项目停止 Provider 会话;原生窗口与 Windows 实机仍 pending。 Viva 聚合 Build 窗口:build_tree_test.go 的 TestBuildTreeNestsProjectsWithTheirFolders 覆盖父子项目按 parentID 嵌套、每个项目各自列出任务文件夹/依赖/Targets、单一根项目并入构建系统行、默认只展开选中实例且项目展开而文件夹/Targets/依赖折叠、用户展开/折叠的记忆、全部展开时依赖保持折叠、重新加载后保留展开状态;TestBuildTreeFilterKeepsMatchesUnderTheirProjects 覆盖筛选保留命中节点和通往它的项目与文件夹、构建系统名称/根目录/根项目命中时保留整棵树、筛选不触发加载、新筛选结果到达前沿用上一次结果;TestBuildTreeLoadsOpenModelsAFewAtATime 覆盖同时最多加载 4 个模型、失败和折叠的分组不加载;TestBuildTreeRowsChooseTheirBuildSystem 覆盖点击其他分组的行切换构建系统并能运行选中的目标;build_menus_test.go 覆盖从右键菜单运行目标后打开 Run 窗口的构建控制台;runconfig_browser_test.go 覆盖 Build 窗口中的运行配置列表:范围与计数、固定写入客户端存储而不写项目、分组折叠展开、双击运行和行内停止。运行 scripts/desktop/desktop-go.sh test ./internal/workbench -run 'TestBuild|TestRunConfiguration' -count=1。真实插件组合与 Windows 实机仍待验收。 Viva 2026-11-14 任务范围:构建树的任务行不带项目,从树里运行时按任务声明的范围推断,不再把只能在项目上运行的任务当作工作区请求(Core 会报 plugin.build.invalidSelection)。模型任务用它所属的项目;声明任务依次用选中的目标、选中的项目(或目标所在的项目)、工作区;什么都没选时取构建根目录的项目或唯一的项目、唯一适用的目标;推断不出时提示先选择项目或目标,不发请求。选中项目时,任务分组只列出这个项目的模型任务。IDE API 仍按请求原样交给 Core 校验。build_tree_test.go 的 TestBuildTaskSelectionFitsDeclaredScopes、TestBuildTreeTasksRunOnTheScopeTheyDeclare 覆盖这些规则,后者在修复前失败(Project 为空);真实插件组合与 Windows 实机仍待验收。 Windows #2042:TestBuildModelLoadsFromPathOnlyBatchToolInUserProfiles 从带空格安装目录的 PATH-only .cmd 启动合成构建工具,校验空格/中文用户目录和参数完整性,经生产 commandModel 解码模型并记录完成终态。 通过现有 Windows CI 的 scripts/desktop/check.sh 运行;本机逐项计时报告覆盖这些合成场景,完整原生界面验收仍保持 pending。 Viva 2026-11-18 树上构建选项:模型报告本次实际激活的选项时,Core 按加载模型使用的选项指纹回显勾选;恢复默认会保留其他构建根的值及明确清空状态,也会考虑本机实例默认值。运行配置编辑器继承构建实例的选项,显式保存的选项在启动规划时覆盖实例对应的键。presentation=tree 的多选选项由 Core build.modelTree 排布在构建系统树顶部,折叠时显示当前生效候选摘要,展开后列出复选框与模型的默认激活标记(defaultActive);模型通过 optionDefaults 与 optionExcludePrefixes(或声明的 excludePrefix)报告默认激活项与取消前缀,勾选或取消经 Core 编码为本机构建选项(含取消默认激活项的前缀项、回到默认集合时清空覆盖)并触发重新检测,筛选状态下切换仍保留隐藏的已勾选项;构建选项对话框与运行配置编辑器通过 build.resolveOptions 共用同一模型候选与默认状态。自动化:core 包 TestBuildOptionDefaultsAndExclusionsRoundTripThroughStorageAndTree、workbench 包 TestBuildTreePresentsAndTogglesModelOptionChoices 与 TestBuildAndRunOptionEditorsResolveAndSaveModelChoices。 构建选项初次读取时显示加载状态,禁用字段和保存,仍可取消;读取完成后才允许修改并保存。macOS 的 TestBuildOptionsWaitForResolutionBeforeEditAndSave 使用可控解析请求验证加载前后的实际操作及保存回读。", - "notes": "Viva 已接入 buildSystems 1 / buildProviders 1–2 的纵向切片:Build 工具窗口用 Core 检测实例、加载 provider 模型或执行 command 模型,列出项目、目标、command/provider 任务;command 任务按 build.invocationPlan 的候选顺序解析并做版本检查,provider 任务经 lsp.buildRequest 执行,共享 provider 复用同插件语言服务器;输出有界、支持停止,关闭项目回收 provider 与进程树。GitHub Release 原始包按契约 / 目录布局发布,当前 pluginpkg 只接受解压根目录的 plugin.json,安装器布局问题单独记录。未声明 buildProviders 4、settings、executableResolution、测试与 Debug:工具链运行引用、需设置插件、测试/诊断面板仍缺失。Windows Job Object 已实现并交叉编译,但无实机验证,保持 pending。Viva 客户端尚未逐项盘点;legacy 是迁移前基线,不代表当前实现。 Viva 运行设置接线:build.invocationPlan 携带真实全局插件层,显式无效工具路径直接失败并保留自动候选顺序;有效显式工具父目录进入 PATH。Provider 启动携带独立全局/项目层,工作区 URI 由 Core 生成。此接线不表示通用设置界面、原生配置页或完整 Build 协议迁移已验收。 Viva 2026-11-14:构建系统改为一个聚合的 Build 工具窗口,放在右侧工具栏上方(与 IDEA 的位置一致),不再为每个实例开标签页。窗口里是一棵树,每个检测到的构建系统实例是一个分组,显示构建系统名称、徽标和相对根目录;分组下是项目、目标、任务、测试和依赖。默认只展开当前选中的实例,用户手动展开或折叠过的分组保持该状态;依赖分组默认折叠,因为加载依赖要运行构建工具。筛选框按分组名称、根目录和行名称过滤,匹配的行固定展开在所属分组下;筛选只读已加载的模型,不会触发加载。展开的分组按需加载模型,同时最多加载 4 个,加载失败的不会自动重试,折叠的分组不加载。点击其他分组的行会切换到该构建系统并选中这一行,工具栏的运行按钮会执行选中的目标或任务。运行配置列表放在右侧 Build 窗口顶部,和下面的构建树之间有可拖动的分隔条,按范围、固定和执行类型筛选,双击运行、行内按钮停止。目标的名称以其路径结尾时(如包的导入路径以所在目录结尾),目标行只显示路径,鼠标悬停显示完整名称;其他目标仍显示名称并在旁边显示路径,筛选仍按名称和路径匹配。底部原先的 Build 窗口改为 Run 窗口,只显示运行输出:构建控制台,以及插件启动的运行各自的标签页;Build 窗口发起的任务或运行会打开 Run 窗口并切到构建控制台。 Viva 2026-11-14:参照 IDEA 的 Make 窗口,每个任务和有运行入口的目标行首常驻绿色运行按钮,不必先选中,点一下就选中该行并运行,构建进行中按钮变暗不可点;没有运行入口的目标和项目保留类型图标,调试按钮仍只在选中的行上。名称与路径放不下时路径先省略、名称以省略号结尾,悬停提示显示完整名称和路径(只显示路径的目标显示完整名称);依赖标题旁的 ⓘ 说明依赖树在第一次展开时才由构建工具读取,以及何时重新读取。自动化:TestBuildTreeRunMarksRunTheirRowsAtOnce;截图 docs/assets/build-panels/build-go-targets-*.png。 Viva 2026-11-14:Core 固定版本升到 Lithe-core-rust#33,构建检测和自动运行项发现跳过被 Git 忽略的目录(工作区内的 .gitignore 与仓库的 info/exclude),代理工作树、生成目录和本地副本不再被列成构建系统,同一模块不再出现两遍;Core 自动化:tests::build_systems::detection_skips_directories_git_ignores。 Viva 2026-11-14:Core 固定版本升到 Lithe-core-rust#35,构建选项新增“检测”分区的忽略路径:一行一条 .gitignore 写法的规则,相对项目根目录、只匹配文件夹,默认忽略所有以 . 开头的文件夹(如 .claude/worktrees),以 ! 开头的规则可以让文件夹(包括被 Git 忽略的)重新参与检测。列表按本机、团队文件 .lithe/build/options.json、默认值的顺序取第一个,对话框写明当前来源;修改只保存在本机,恢复默认删除本机列表,保存后重新检测。Build 窗口标题栏的齿轮打开只含忽略路径的构建选项,构建系统行的齿轮和右键菜单在忽略路径下方显示该构建系统的选项;Core 拒绝的规则标出所在行,对话框保持打开、不写入。自动化:TestBuildOptionsIgnoredPathsAreSavedOnThisMachineAndRestored、TestBuildOptionsNameTheLineOfARefusedIgnoredPath、core 包 TestBuildIgnoredPathsResolveFromTheLayersAndEditTheLocalList、TestBuildDetectSkipsTheIgnoredPaths。 Viva 2026-11-16(#2032):Windows 上由宿主启动的 .cmd/.bat(构建工具、版本探测、Run、Tests 共用 buildprocess)改为宿主自己构造 cmd.exe /d /c \"\"脚本\" 参数\" 命令行,参数按 BatBadBut 修复后的规则转义;此前脚本目录和参数都含空格时 cmd 去掉首尾引号,Maven 模型加载报 C:\\Program 不是命令并以 exit 1 失败。模型和依赖命令失败时,错误附带工具最后 12 行输出(去掉终端控制符),构建树行悬停显示全文。Windows 11 ARM64 来宾(x64 仿真)实机:TestBatchFileUnderASpacedDirectoryReceivesItsArguments 修复前失败、修复后通过,buildprocess 全部用例通过;同一来宾用真实 mvn.cmd 跑模型命令,修复前 exit 1,修复后写出模型。完整客户端界面验收尚未执行,状态保持 pending。 Viva 2026-11-16:Build 窗口的树参照 IntelliJ IDEA 的 Maven 工具窗口改为按父子项目嵌套,对所有构建工具一致:树由 Core 新增的 build.modelTree 按清单和模型排布(Lithe-core-rust feat/build-model-tree),宿主只负责展开状态、绘制和交互。每个项目依次列出按 category(没有时按 group)分好的任务文件夹、依赖节点、带目标级任务的 Targets 文件夹,然后是子项目;子项目按模型的 parentID 嵌套(模型没写父项目时,Core 解码模型已按路径包含关系补上)。有 project 作用域的声明任务出现在每个项目里,只有 workspace 作用域或需要用户参数的任务、工作区依赖和 Discovered Tests 只在构建系统下出现一次。模型只有一个根项目时,构建系统行直接代表这个项目(行上显示项目名,右键是项目菜单)。默认展开项目,任务文件夹、Targets、Discovered Tests 和依赖折叠;全部展开不会打开依赖。筛选由 Core 标出命中节点,保留命中节点的全部内容和通往它的项目与文件夹,构建系统名称、根目录或根项目命中时保留整棵树;排布在后台进行,模型、筛选或语言变化时重新排布,旧结果按模型版本和检测代次丢弃。多仓库工作区不再把上百个任务平铺在一层。文件夹标题来自插件声明的 category,由插件负责翻译;宿主只翻译 group 的 7 个标题。行图标改用 IntelliJ New UI 中同类节点的图标(Apache-2.0,深浅两套,与 Project 树一样是 16 点):任务文件夹是带齿轮的文件夹(IDEA Maven/Gradle 任务文件夹的 taskGroup),依赖是带书的文件夹、依赖项是书,项目是模块文件夹,没有运行入口的任务是齿轮、目标是构件,Targets 是普通文件夹,Discovered Tests 是测试文件夹。 2026-11-19(#2202、#2152):presentation 为 toolbar 的布尔选项显示为构建窗口工具栏上的开关(插件图标,按下表示开,提示写明开/关),点击经与构建选项对话框相同的 Core 编辑写入本机选项并重新检测,对应 IDEA Maven 窗口的切换离线、切换跳过测试;工具栏齿轮改名为“构建系统检测范围”,实例行的“选项”改为“<构建系统> 选项”,对话框标题随之区分;构建选项和运行配置编辑器里的文件、目录选项带浏览按钮,选择后填入绝对路径。TestBuildToolbarTogglesABooleanOption、TestOptionEditorsShowAMultiSelectAfterAnotherOption 用合成插件验证。 2026-11-19(#2152、#2204):模型为文本、文件、目录选项报告工具实际使用的值时(Core implicitValue),选项编辑器按 IDEA 的 PathOverrider 显示“覆盖”复选框:未勾选时只读显示工具的值,勾选后以该值为起点编辑,取消勾选即删除本机覆盖;插件为选项声明 description 时,名称旁显示 ⓘ。TestPathOptionShowsTheToolValueUntilOverridden 用合成插件验证。 2026-11-19(#2204):检测前经 Core build.localizeOptions 应用插件包内 l10n/<语言>.json 的 buildOptions 翻译(两阶段读取,按插件包和语言缓存已读文件,插件包只读),选项对话框、运行配置编辑器、工具栏开关和构建树选项节点都显示译文;翻译不可读或被拒绝时沿用清单原文并记录日志。TestBuildOptionsShowThePluginsTranslation 用合成插件验证。", + "notes": "Viva 已接入 buildSystems 1 / buildProviders 1–2 的纵向切片:Build 工具窗口用 Core 检测实例、加载 provider 模型或执行 command 模型,列出项目、目标、command/provider 任务;command 任务按 build.invocationPlan 的候选顺序解析并做版本检查,provider 任务经 lsp.buildRequest 执行,共享 provider 复用同插件语言服务器;输出有界、支持停止,关闭项目回收 provider 与进程树。GitHub Release 原始包按契约 / 目录布局发布,当前 pluginpkg 只接受解压根目录的 plugin.json,安装器布局问题单独记录。未声明 buildProviders 4、settings、executableResolution、测试与 Debug:工具链运行引用、需设置插件、测试/诊断面板仍缺失。Windows Job Object 已实现并交叉编译,但无实机验证,保持 pending。Viva 客户端尚未逐项盘点;legacy 是迁移前基线,不代表当前实现。 Viva 运行设置接线:build.invocationPlan 携带真实全局插件层,显式无效工具路径直接失败并保留自动候选顺序;有效显式工具父目录进入 PATH。Provider 启动携带独立全局/项目层,工作区 URI 由 Core 生成。此接线不表示通用设置界面、原生配置页或完整 Build 协议迁移已验收。 Viva 2026-11-14:构建系统改为一个聚合的 Build 工具窗口,放在右侧工具栏上方(与 IDEA 的位置一致),不再为每个实例开标签页。窗口里是一棵树,每个检测到的构建系统实例是一个分组,显示构建系统名称、徽标和相对根目录;分组下是项目、目标、任务、测试和依赖。默认只展开当前选中的实例,用户手动展开或折叠过的分组保持该状态;依赖分组默认折叠,因为加载依赖要运行构建工具。筛选框按分组名称、根目录和行名称过滤,匹配的行固定展开在所属分组下;筛选只读已加载的模型,不会触发加载。展开的分组按需加载模型,同时最多加载 4 个,加载失败的不会自动重试,折叠的分组不加载。点击其他分组的行会切换到该构建系统并选中这一行,工具栏的运行按钮会执行选中的目标或任务。运行配置列表放在右侧 Build 窗口顶部,和下面的构建树之间有可拖动的分隔条,按范围、固定和执行类型筛选,双击运行、行内按钮停止。目标的名称以其路径结尾时(如包的导入路径以所在目录结尾),目标行只显示路径,鼠标悬停显示完整名称;其他目标仍显示名称并在旁边显示路径,筛选仍按名称和路径匹配。底部原先的 Build 窗口改为 Run 窗口,只显示运行输出:构建控制台,以及插件启动的运行各自的标签页;Build 窗口发起的任务或运行会打开 Run 窗口并切到构建控制台。 Viva 2026-11-14:参照 IDEA 的 Make 窗口,每个任务和有运行入口的目标行首常驻绿色运行按钮,不必先选中,点一下就选中该行并运行,构建进行中按钮变暗不可点;没有运行入口的目标和项目保留类型图标,调试按钮仍只在选中的行上。名称与路径放不下时路径先省略、名称以省略号结尾,悬停提示显示完整名称和路径(只显示路径的目标显示完整名称);依赖标题旁的 ⓘ 说明依赖树在第一次展开时才由构建工具读取,以及何时重新读取。自动化:TestBuildTreeRunMarksRunTheirRowsAtOnce;截图 docs/assets/build-panels/build-go-targets-*.png。 Viva 2026-11-14:Core 固定版本升到 Lithe-core-rust#33,构建检测和自动运行项发现跳过被 Git 忽略的目录(工作区内的 .gitignore 与仓库的 info/exclude),代理工作树、生成目录和本地副本不再被列成构建系统,同一模块不再出现两遍;Core 自动化:tests::build_systems::detection_skips_directories_git_ignores。 Viva 2026-11-14:Core 固定版本升到 Lithe-core-rust#35,构建选项新增“检测”分区的忽略路径:一行一条 .gitignore 写法的规则,相对项目根目录、只匹配文件夹,默认忽略所有以 . 开头的文件夹(如 .claude/worktrees),以 ! 开头的规则可以让文件夹(包括被 Git 忽略的)重新参与检测。列表按本机、团队文件 .lithe/build/options.json、默认值的顺序取第一个,对话框写明当前来源;修改只保存在本机,恢复默认删除本机列表,保存后重新检测。Build 窗口标题栏的齿轮打开只含忽略路径的构建选项,构建系统行的齿轮和右键菜单在忽略路径下方显示该构建系统的选项;Core 拒绝的规则标出所在行,对话框保持打开、不写入。自动化:TestBuildOptionsIgnoredPathsAreSavedOnThisMachineAndRestored、TestBuildOptionsNameTheLineOfARefusedIgnoredPath、core 包 TestBuildIgnoredPathsResolveFromTheLayersAndEditTheLocalList、TestBuildDetectSkipsTheIgnoredPaths。 Viva 2026-11-16(#2032):Windows 上由宿主启动的 .cmd/.bat(构建工具、版本探测、Run、Tests 共用 buildprocess)改为宿主自己构造 cmd.exe /d /c \"\"脚本\" 参数\" 命令行,参数按 BatBadBut 修复后的规则转义;此前脚本目录和参数都含空格时 cmd 去掉首尾引号,Maven 模型加载报 C:\\Program 不是命令并以 exit 1 失败。模型和依赖命令失败时,错误附带工具最后 12 行输出(去掉终端控制符),构建树行悬停显示全文。Windows 11 ARM64 来宾(x64 仿真)实机:TestBatchFileUnderASpacedDirectoryReceivesItsArguments 修复前失败、修复后通过,buildprocess 全部用例通过;同一来宾用真实 mvn.cmd 跑模型命令,修复前 exit 1,修复后写出模型。完整客户端界面验收尚未执行,状态保持 pending。 Viva 2026-11-16:Build 窗口的树参照 IntelliJ IDEA 的 Maven 工具窗口改为按父子项目嵌套,对所有构建工具一致:树由 Core 新增的 build.modelTree 按清单和模型排布(Lithe-core-rust feat/build-model-tree),宿主只负责展开状态、绘制和交互。每个项目依次列出按 category(没有时按 group)分好的任务文件夹、依赖节点、带目标级任务的 Targets 文件夹,然后是子项目;子项目按模型的 parentID 嵌套(模型没写父项目时,Core 解码模型已按路径包含关系补上)。有 project 作用域的声明任务出现在每个项目里,只有 workspace 作用域或需要用户参数的任务、工作区依赖和 Discovered Tests 只在构建系统下出现一次。模型只有一个根项目时,构建系统行直接代表这个项目(行上显示项目名,右键是项目菜单)。默认展开项目,任务文件夹、Targets、Discovered Tests 和依赖折叠;全部展开不会打开依赖。筛选由 Core 标出命中节点,保留命中节点的全部内容和通往它的项目与文件夹,构建系统名称、根目录或根项目命中时保留整棵树;排布在后台进行,模型、筛选或语言变化时重新排布,旧结果按模型版本和检测代次丢弃。多仓库工作区不再把上百个任务平铺在一层。文件夹标题来自插件声明的 category,由插件负责翻译;宿主只翻译 group 的 7 个标题。行图标改用 IntelliJ New UI 中同类节点的图标(Apache-2.0,深浅两套,与 Project 树一样是 16 点):任务文件夹是带齿轮的文件夹(IDEA Maven/Gradle 任务文件夹的 taskGroup),依赖是带书的文件夹、依赖项是书,项目是模块文件夹,没有运行入口的任务是齿轮、目标是构件,Targets 是普通文件夹,Discovered Tests 是测试文件夹。 2026-11-19(#2202、#2152):presentation 为 toolbar 的布尔选项显示为构建窗口工具栏上的开关(插件图标,按下表示开,提示写明开/关),点击经与构建选项对话框相同的 Core 编辑写入本机选项并重新检测,对应 IDEA Maven 窗口的切换离线、切换跳过测试;工具栏齿轮改名为“构建系统检测范围”,实例行的“选项”改为“<构建系统> 选项”,对话框标题随之区分;构建选项和运行配置编辑器里的文件、目录选项带浏览按钮,选择后填入绝对路径。TestBuildToolbarTogglesABooleanOption、TestOptionEditorsShowAMultiSelectAfterAnotherOption 用合成插件验证。 2026-11-19(#2152、#2204):模型为文本、文件、目录选项报告工具实际使用的值时(Core implicitValue),选项编辑器按 IDEA 的 PathOverrider 显示“覆盖”复选框:未勾选时只读显示工具的值,勾选后以该值为起点编辑,取消勾选即删除本机覆盖;插件为选项声明 description 时,名称旁显示 ⓘ。TestPathOptionShowsTheToolValueUntilOverridden 用合成插件验证。 2026-11-19(#2204):检测前经 Core build.localizeOptions 应用插件包内 l10n/<语言>.json 的 buildOptions 翻译(两阶段读取,按插件包和语言缓存已读文件,插件包只读),选项对话框、运行配置编辑器、工具栏开关和构建树选项节点都显示译文;翻译不可读或被拒绝时沿用清单原文并记录日志。TestBuildOptionsShowThePluginsTranslation 用合成插件验证。 2026-11-19(#2203):构建系统选项对话框新增“运行环境”分区,参照 IDEA 的 Maven home 与 Runner JRE 显示构建工具和它依赖的运行时实际解析到的可执行文件及来源(工具链的版本与层级、环境变量、系统 PATH、插件设置、项目包装脚本),并提供“工具链设置…”入口直达工具链设置页;构建和启动共用这一个运行时。Core 检测现在把插件已不再声明的已存选项列入 droppedOptions(Lithe-core-rust#124),对话框列出这些选项及保存的值,“清除本机保存的值”经 build.editStoredOption 删除本机值(Lithe-core-rust#123),团队文件中的值只提示所在文件。TestBuildOptionsShowTheRuntimeAndDroppedOptions 用合成插件验证。", "legacy": { "revision": "5a54c41aa37a4e6e6b68918a4b05765b9dd07a36", "macos": {