Skip to content

Fix Windows Rust tests by embedding the app manifest in test executables - #213

Merged
vycdev merged 3 commits into
developfrom
fix/windows-rust-tests
Nov 20, 2026
Merged

vycdev merged 3 commits into
developfrom
fix/windows-rust-tests

Conversation

@vycdev

@vycdev vycdev commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Every PR fails Rust tests (windows-latest) since #207 and #204 met on develop. The lib test executable builds, then exits with 0xc0000139 (STATUS_ENTRYPOINT_NOT_FOUND) before any test runs. tauri-build embeds the Windows app manifest only into binaries. Its Common Controls v6 dependency is what makes TaskDialogIndirect and friends resolvable, so the test executable, which links the same Tauri and dialog code, can't load. The cause is embed_resource::compile emitting rustc-link-arg-bins.

src-tauri/build.rs now turns off tauri-build's manifest on Windows MSVC and embeds it in every target. It writes the same resource script tauri-winres writes, from a verbatim copy of tauri-build's manifest in src-tauri/windows/app-manifest.xml, and compiles it with embed_resource::compile_for_everything. embed-resource 3.0.6 was already in the lockfile through tauri-winres.

I first tried Tauri's documented linker route (/MANIFEST:EMBED + /MANIFESTINPUT). It was semantically identical, but the linker strips tauri-winres' whitespace, so the app's embedded manifest bytes changed. The resource-script route keeps them byte-identical.

Running the safe_save tests on Windows for the first time also caught a bug in #207's app-data guard. It compared a missing destination folder in plain C:\… form against an existing data folder in canonical \\?\C:\… form. That case was harmless, because creating the temporary file fails when the folder doesn't exist, but the guard now canonicalizes the deepest existing folder on both sides.

Proof:

  • The branch's CI run 44621155624 passes Rust tests on windows-latest (31 tests, including the safe_save IPC test), ubuntu-22.04 and macOS. The first dispatch, before the guard fix, showed the test executable loading and only the app-data assertion failing.
  • A temporary Windows job (run 44621166972, branch since deleted) built the release kromacut.exe with this build.rs and with develop's, then extracted both embedded manifests with mt.exe. Same SHA-256 (A8943B08…), and fc /b found no differences. The test executable now carries the same manifest.
  • The e2e jobs fail because ubuntu-latest is now 26.04, where Playwright has no Chromium build. That is unrelated and handled by Keep e2e CI working on a cold cache by pinning runners to Ubuntu 24.04 #211.

No changelog entry: CI and test only, with no user-visible change.

Council review

Rounds: 1

Delegate Round 1
Claude Opus 5.5 9/10
GPT-6.2 Sol 9/10

Both approved. I applied Opus's two comment nits: the manifest copy's tauri-build version, and the escaping wording. I declined Sol's nit to also compare raw icon and version-info resources from a full NSIS build: that code path is unchanged, since new_without_app_manifest() only drops the manifest.

Created with Claude Opus 5.5 in Claude Code (T3 Code).

🤖 Generated with Claude Code

vycdev and others added 3 commits November 19, 2026 23:23
tauri-build links its app manifest into binaries only, so on Windows the
lib unit test executable starts without the Common Controls v6 dependency
and dies with STATUS_ENTRYPOINT_NOT_FOUND before any test runs. On MSVC,
hand the same manifest to the linker for every target instead, without the
default UAC section, so the app's embedded manifest keeps its content.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ata check

The linker-generated manifest dropped tauri-winres' whitespace, so the app's
embedded manifest bytes changed. Compile the same resource script tauri-winres
writes, but for every target, so the binary's manifest is byte-identical.

Running the safe save tests on Windows also showed the app-data guard
comparing a missing folder in plain form against an existing one in `\\?\`
form; canonicalize the deepest existing folder on both sides instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vycdev
vycdev merged commit 2fc628a into develop Nov 20, 2026
14 checks passed
vycdev added a commit that referenced this pull request Nov 20, 2026
Merge the four Open in Slicer bullets into one entry for the shipped
flow, fold Multi-head filament requirements into Multi-head printing,
and move the decode-once image work into its own Changed entry. Move
touch-up history fixes that predate v4.3 into Fixed, add the missing
diagnostics folder fix, and reduce the cats benchmark entry to one
Fixed line. Fold in the notes from PRs merged since (#203, #205, #206,
#208, #209, #210, #212, #213) and trim test-only and maintenance
details that do not help users.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant