Skip to content
Open
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
5 changes: 5 additions & 0 deletions cmd/desktop/boot_env_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import (
// are also served in the diagnostics snapshot — see internal/desktopenv.
func logBootEnv() {
log.Printf("[desktop] session: %s", joinEnv(desktopenv.SessionKeys, true))
// The webview build decides which rendering bugs apply, and the package
// manager's answer is not necessarily the library that got loaded.
if lib := desktopenv.WebviewLibrary(); lib != "" {
log.Printf("[desktop] webview: %s", lib)
}
if s := joinEnv(desktopenv.OverrideKeys, false); s != "" {
log.Printf("[desktop] render overrides: %s", s)
}
Expand Down
5 changes: 5 additions & 0 deletions internal/desktopenv/desktopenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,8 @@ func GPUPolicy() string {
// Collect returns the current environment, or nil on platforms where none of
// this applies.
func Collect() *Snapshot { return collect() }

// WebviewLibrary returns the webview library mapped into this process, or ""
// where that cannot be determined. Exposed separately from Collect so startup
// logging can name the build before anything else has run.
func WebviewLibrary() string { return webviewLibrary() }
4 changes: 3 additions & 1 deletion internal/desktopenv/desktopenv_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func collect() *Snapshot {
DisplayServer: displayServer(),
RenderOverrides: readAll(OverrideKeys),
Sandbox: readSet(SandboxKeys),
WebKitLibrary: webKitLibrary("/proc/self/maps"),
WebKitLibrary: webviewLibrary(),
GPUPolicy: GPUPolicy(),
}
return s
Expand Down Expand Up @@ -56,6 +56,8 @@ func readSet(keys []string) []EnvVar {
return out
}

func webviewLibrary() string { return webKitLibrary("/proc/self/maps") }

// webKitLibrary returns the basename of the webview library mapped into this
// process. The soname's trailing version identifies the WebKitGTK build, which
// a bug report otherwise has no way to state. The prefix is matched loosely
Expand Down
2 changes: 2 additions & 0 deletions internal/desktopenv/desktopenv_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ package desktopenv
// collect reports nothing off Linux. macOS (WKWebView) and Windows (WebView2)
// have no equivalent set of host render knobs to surface.
func collect() *Snapshot { return nil }

func webviewLibrary() string { return "" }
Loading