Repository navigation
One order of union members in every run; literal of a @value type's fields merges into it; apt retries - #810
Merged
Merged
Conversation
… 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the two flaky failures of the v0.0-pre-alpha124 release run (43046136714).
Declarations check (Windows
-mm=rc, earlier alpha122)normalizeUnionTypeandgetMissingValueTypesorted union members bygetAsOpaquePointer(). Addresses differ between compiler runs, so the default library's declarations (one run) and whatlib.tscompiles to (another) disagreed onstring | RegExpvsRegExp | stringforString.replace/replaceAll/split.sortUnionMembers), falling back to the address only for members that print alike.A bug the old order hid
{at: s32}sorts beforeNum.c ? n : { at: 6 },n || { at: 6 }andnum(5) ?? { at: 6 }then read.atas 0, because a field read on a union uses its first member's layout (the TODO inMLIRGenAccessCall.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.@valuetype's fields (same names, same order, no loss) now merges into that type inmergeType.value_missing_ops.tscovers?:and||as well as??.CI
Tested (Windows)
check_declarations20/20.lib.tsMLIR generation time unchanged (~600 ms both).🤖 Generated with Claude Code