Skip to content

Promote missing record fields from warning to compile error#244

Merged
jappeace merged 7 commits into
jappeace:masterfrom
jappeace-sloth:feat/error-on-missing-fields
Jul 14, 2026
Merged

Promote missing record fields from warning to compile error#244
jappeace merged 7 commits into
jappeace:masterfrom
jappeace-sloth:feat/error-on-missing-fields

Conversation

@jappeace-sloth

Copy link
Copy Markdown

Follow-up to #243: during that migration, a TextConfig construction missing the new tcTextColor field compiled with only the default-on -Wmissing-fields warning, was overlooked in the build output, and crashed at runtime inside the test suite (in errorWidget, of all places). A missing record field is always a latent runtime crash (Missing field in record construction), so this promotes the overlookable warning to an unmissable error via -Werror=missing-fields in common-options.

The codebase is currently clean of such sites (full build and suite green with the flag on), so the change costs nothing today and blocks the whole class tomorrow.

🤖 Generated with Claude Code

jappeace-sloth and others added 7 commits July 14, 2026 15:47
During the jappeace#243 migration a TextConfig construction missing the new
tcTextColor field compiled with only the default -Wmissing-fields
warning, which was overlooked in the build output, and crashed at
runtime inside the test suite (in errorWidget of all places). A
missing field is always a latent runtime crash, so the warning that
can be missed becomes an error that cannot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
-Werror=missing-fields immediately found three long-standing
incomplete UserState constructions in the tests (two in
AppContextTests, one in WidgetTests), each missing
userPlatformSignInState and userRequestRedraw and surviving only
because nothing evaluated those fields. They get a fresh sign-in
state and a no-op redraw. Also documents the flag in the changelog.

The first push missed these because the local incremental build did
not recompile the test modules under the new flag; verified with a
forced full recompile this time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The -Werror=missing-fields change rebuilds every Haskell module, and
a timeout-cancelled job skips its nix cache save, so retrying at 45
minutes would start cold every time (run 29340371964 died at exactly
45 minutes mid emulator test). Warm runs stay ~25 minutes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review finding: the android job has no cache-save step (the only
cache-nix-action in the workflow belongs to macos-apk); it reads
nix-cache.jappie.me and pushes nothing, so run completion has no
effect on the next run's warmth. The real reason for 70 minutes is
that a ghc-options change invalidates every Haskell derivation and
each run builds cold until the external cache is populated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…test

Same arithmetic as the android bump: the job reads
nix-cache.jappie.me and pushes nothing, so ghc-options changes build
cold until the cache is fed externally, and the simulator test (the
known jappeace#235 flake) then runs out of clock at 45 minutes; two runs on
this PR lost it to the cutoff.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review finding: run 29334286560 passed (44m17s, on jappeace#243) and was
miscited as a timeout casualty. The actual prior instance of the
build-passes-simulator-test-cancelled fingerprint is run 29281533228
on jappeace#239, alongside this PR's run 29344658446 and the historical
mid-compile timeout 9dcf105.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
watchos died in 44 seconds on 'opening lock file /nix/var/nix/db/big-lock:
Permission denied'; the same tree passed watchos twice earlier today.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jappeace jappeace merged commit aa9976f into jappeace:master Jul 14, 2026
6 checks passed
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.

2 participants