Skip to content

One order of union members in every run; literal of a @value type's fields merges into it; apt retries - #810

Merged
ASDAlexander77 merged 1 commit into
mainfrom
ci-flake-fixes
Nov 11, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
ci-flake-fixes

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Fixes the two flaky failures of the v0.0-pre-alpha124 release run (43046136714).

Declarations check (Windows -mm=rc, earlier alpha122)

  • normalizeUnionType and getMissingValueType sorted union members by getAsOpaquePointer(). Addresses differ between compiler runs, so the default library's declarations (one run) and what lib.ts compiles to (another) disagreed on string | RegExp vs RegExp | string for String.replace/replaceAll/split.
  • Members are now sorted by their printed text (sortUnionMembers), falling back to the address only for members that print alike.

A bug the old order hid

  • With text order, {at: s32} sorts before Num. c ? n : { at: 6 }, n || { at: 6 } and num(5) ?? { at: 6 } then read .at as 0, because a field read on a union uses its first member's layout (the TODO in MLIRGenAccessCall.cpp), and the two members share a tag but not a layout. That gave the right value before only because of the order of the addresses.
  • An object literal whose fields convert to a @value type's fields (same names, same order, no loss) now merges into that type in mergeType. value_missing_ops.ts covers ?: and || as well as ??.

CI

  • apt-get retries the whole install 5 times, 30 s apart. With 8.8.8.8 set, the Ubuntu mirrors still failed to resolve for a while on one runner, twice.

Tested (Windows)

  • ctest 6958/6958.
  • Clean default library (e5c170e) rebuilt with this compiler: 4 models × release/debug × compile/jit pass, and check_declarations 20/20.
  • lib.ts MLIR generation time unchanged (~600 ms both).

🤖 Generated with Claude Code

… fields merges into it; apt retries on CI

- Union members were sorted by the address of their type, which differs between compiler runs: the
  default library's declarations (one run) and what lib.ts compiles to (another) had `string | RegExp`
  and `RegExp | string` - the flaky check_declarations failure of the alpha122 and alpha124 release
  runs. They are now sorted by their printed text (sortUnionMembers), the address only for members
  that print alike.
- That order put `{at: s32}` before `Num` in `c ? n : { at: 6 }`, `n || { at: 6 }` and
  `num(5) ?? { at: 6 }`, and `.at` read 0: a field read from a union takes its first member's layout,
  and the two have one tag but not one layout. Right before only by the order of the addresses. An
  object literal whose fields convert to a @value type's, by name, without loss, now merges into that
  type (MLIRTypeHelper::literalConvertsToValueType).
- CI: apt-get retries the whole install 5 times, 30 s apart. With public resolvers the Ubuntu mirrors
  still failed to resolve for a while on some runners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit db1ca73 into main Nov 11, 2026
11 of 12 checks passed
@ASDAlexander77
ASDAlexander77 deleted the ci-flake-fixes branch November 11, 2026 17:08
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