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
20 changes: 20 additions & 0 deletions desktop/internal/i18n/shared.generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions desktop/internal/settingswindow/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion desktop/internal/settingswindow/toolchains_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions desktop/internal/settingswindow/toolchains_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions desktop/internal/workbench/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
11 changes: 11 additions & 0 deletions desktop/internal/workbench/build_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
Loading
Loading