You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep the WebView stub compile silent and support GLib 2.72 (#152)
* Remove the informational pragma from both WebView stub paths
- zig renders every clang diagnostic of a failing C compile as error:, so the note masqueraded as the build-killer whenever a real error joined it
- the stub branches keep their explanatory comments; the misconfigured web-build #error stays
- build graphs (build/app.zig and the ejected template) document why the expected state is silent: runtime WebViewNotFound is the teaching channel
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
* Compile the GTK host against GLib 2.72
- G_APPLICATION_DEFAULT_FLAGS is GLib 2.74+; the host's GTK floor is 4.10, whose own GLib floor is 2.72
- distros backporting GTK 4.10 onto a 2.72 base (Ubuntu 22.04 derivatives) now compile canvas apps out of the box
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
* Pin diagnostic-free stub compiles in both canvas-smoke CI lanes
- zig cc passthrough is the one channel where C warnings reach stderr, so each lane compiles its stub host and asserts zero diagnostics
- fails on the old pragma, passes after its removal; the webkit-less build + ELF audit receipts already live in these lanes
- changelog fragment for the user-visible fix
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
* Run the stub diagnostic receipts against a cold zig cache
- on a cache hit zig cc replays nothing, stderr included, so a restored cache would hide the exact diagnostics the steps pin against
- throwaway ZIG_GLOBAL/LOCAL_CACHE_DIR per step keeps every run cold
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
* Print the captured compiler output when a stub receipt compile fails
- Actions runs steps under bash -e, so a nonzero command substitution killed the step at the assignment and swallowed the forensics the step captured; the || arm keeps errexit out of the capture.
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
* Pin the GLib 2.72 fallback with an error-set receipt on stock 22.04
- No stock image pairs old glib with GTK 4.10, so the receipt asserts the error set: GTK-age failures only, never a glib symbol - a future 2.74+ symbol without a fallback trips it.
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
* Whitelist GTK-age diagnostic shapes in the GLib 2.72 receipt
- The prefix blacklist missed non-undeclared shapes (unknown glib type names); the whitelist rejects everything that is not a GTK-age root or its cascades, with the cascade rationale in the script.
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
* Demand positive evidence from the GLib 2.72 receipt
- Unlocated error shapes (driver/invocation failures) reject instead of sailing past the located-diagnostic parser, and fewer than five GTK-age roots means the compile proved nothing.
- Renamed to the allowlist vocabulary.
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
* Narrow the conversion cascade to its signature and document the lattice
- Int-to-pointer lines only pass when converting from 'int' (the undeclared-function-returns-int shape); the docstring now records why cascade allowances are sound: full-GTK lanes compile the same file, so only the old-glib delta reaches this filter, and glib regressions always reject at their root.
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
---------
Co-authored-by: nextpointer <110530249+nextpointer@users.noreply.github.com>
fix: **Canvas-app hosts compile silently without a WebView SDK**: the informational `#pragma message` in the GTK host's WebKitGTK stub path (and its Windows WebView2 twin) is gone — zig renders every clang diagnostic of a failing C compile as `error:`, so on machines where a real, unrelated compile error occurred (for example a too-old GTK), the note itself surfaced as the first build-killing error and masked the actual cause; the stub is the expected state of every canvas app and now compiles with zero diagnostics, while a genuinely misconfigured web build still fails loudly via `#error`.
2
+
-**GTK host compiles against GLib 2.72**: the host now spells "no application flags" in a way that compiles on GLib older than 2.74, so distros that backport GTK 4.10 onto a GLib 2.72 base (Ubuntu 22.04-derived) build canvas apps out of the box.
Copy file name to clipboardExpand all lines: src/platform/linux/gtk_host.c
+23-2Lines changed: 23 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -24,8 +24,17 @@
24
24
* NATIVE_SDK_ALLOW_WEBVIEW2_STUB. */
25
25
#if defined(NATIVE_SDK_ALLOW_WEBKITGTK_STUB)
26
26
#defineNATIVE_SDK_HAS_WEBKITGTK 0
27
-
#pragma message("Embedded web layer excluded by the build configuration: building the GTK host without WebKitGTK (canvas apps unaffected; WebView loads will report WebViewNotFound)")
28
-
/* The stubbed web layer keeps the window/webview bookkeeping SHAPE so
27
+
/* Deliberately NO compiler diagnostic in this branch — not even an
28
+
* informational #pragma message. The stub is the expected, configured
29
+
* state of every native-only Linux build, and zig renders every clang
30
+
* diagnostic of a failing translation unit as `error:` (its serialized
31
+
* clang diagnostics carry no severity into the error bundle), so an
32
+
* informational note here masquerades as the build-killing error the
33
+
* moment any unrelated real error appears anywhere in this file. The
34
+
* teaching lives where it is actionable instead: a stubbed host
35
+
* reports WebViewNotFound the moment an app actually uses a WebView.
36
+
*
37
+
* The stubbed web layer keeps the window/webview bookkeeping SHAPE so
29
38
* every GTK-only path (overlay reordering, focus lookups, window
30
39
* teardown) compiles unchanged: the web-view pointers below are opaque
31
40
* and permanently NULL — every path that could create one is compiled
#error "webkit/webkit.h not found: install the WebKitGTK 6.0 development package (libwebkitgtk-6.0-dev on Debian/Ubuntu), or define NATIVE_SDK_ALLOW_WEBKITGTK_STUB to build without the embedded web layer"
44
53
#endif
45
54
55
+
/* G_APPLICATION_DEFAULT_FLAGS arrived in GLib 2.74 as the
56
+
* non-deprecated spelling of "no flags". This host's GTK floor is 4.10
57
+
* (the GtkFileDialog family below), and GTK 4.10's own GLib floor is
58
+
* 2.72 — distros that backport GTK 4.10 onto a GLib 2.72 base (Ubuntu
59
+
* 22.04 derivatives) must still compile this file. Same value, gated to
60
+
* older GLib only; the pre-2.74 name G_APPLICATION_FLAGS_NONE is not
61
+
* used because it is deprecated from 2.74 on and would emit a warning
Copy file name to clipboardExpand all lines: src/platform/windows/webview2_host.cpp
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,16 @@
41
41
* WebView loads report WebViewNotFound at runtime. */
42
42
#if defined(NATIVE_SDK_ALLOW_WEBVIEW2_STUB)
43
43
#defineNATIVE_SDK_HAS_WEBVIEW20
44
-
#pragma message("Embedded WebView layer excluded by the build configuration: building the Windows host without it (canvas apps unaffected; WebView loads will report WebViewNotFound)")
44
+
/* Deliberately NO compiler diagnostic in this branch — not even an
45
+
* informational #pragma message. The stub is the expected, configured
46
+
* state of every native-only Windows build, and zig renders every
47
+
* clang diagnostic of a failing translation unit as `error:` (its
48
+
* serialized clang diagnostics carry no severity into the error
49
+
* bundle), so an informational note here masquerades as the
50
+
* build-killing error the moment any unrelated real error appears
51
+
* anywhere in this file. The teaching lives where it is actionable
52
+
* instead: a stubbed host reports WebViewNotFound the moment an app
0 commit comments