refactor: fix nondeterministic ordering for foreign items - #1930
Open
ahomescu wants to merge 2 commits into
Conversation
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 01:40
a977cb9 to
6215ac5
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 01:57
6215ac5 to
52adae1
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 02:07
52adae1 to
6a8430a
Compare
ahomescu
changed the base branch from
ahomescu/fix_reorganize_definitions/move_impls
to
ahomescu/fix_reorganize_definitions/multi_namespace_import_splitting
July 25, 2026 02:11
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 02:11
6a8430a to
1606a2e
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 05:09
1606a2e to
544e434
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 05:33
544e434 to
e433011
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 05:41
e433011 to
52aa47f
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 05:42
52aa47f to
2ce43e0
Compare
ahomescu
changed the base branch from
ahomescu/fix_reorganize_definitions/multi_namespace_import_splitting
to
ahomescu/fix_reorganize_definitions/extern_abi_fallback
July 25, 2026 05:48
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 05:48
2ce43e0 to
ed36074
Compare
ahomescu
changed the base branch from
ahomescu/fix_reorganize_definitions/extern_abi_fallback
to
ahomescu/fix_reorganize_definitions/non_ascii_idents
July 25, 2026 05:52
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 05:52
ed36074 to
0dad64a
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
2 times, most recently
from
July 25, 2026 06:05
ebfa817 to
a24258d
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 06:16
a24258d to
57d0cdc
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
July 25, 2026 06:26
57d0cdc to
6c83565
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
2 times, most recently
from
August 4, 2026 02:41
619c11b to
6737ee6
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
2 times, most recently
from
August 5, 2026 00:19
c13616e to
37567a7
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
August 5, 2026 00:22
37567a7 to
b23392a
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
August 5, 2026 00:43
b23392a to
e166ab7
Compare
thedataking
reviewed
Sep 8, 2026
thedataking
left a comment
Contributor
There was a problem hiding this comment.
One additional finding from checking CI before recommending approvals for stack 1953: the new extern-block ordering fixture is not portable to the supported macOS ARM target.
ahomescu
removed this pull request from stack #1953
September 9, 2026 01:38
ahomescu
changed the base branch from
ahomescu/fix_reorganize_definitions/non_ascii_idents
to
ahomescu/fix_reorganize_definitions/use_comments
September 9, 2026 01:38
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
September 9, 2026 01:41
e166ab7 to
f66241e
Compare
ahomescu
added this pull request to stack #2004
September 9, 2026 01:42
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
September 9, 2026 02:18
f66241e to
21382cc
Compare
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
September 9, 2026 02:33
21382cc to
a82de55
Compare
ahomescu
removed this pull request from stack #2004
September 17, 2026 00:38
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
September 17, 2026 00:39
a82de55 to
f0fb7f9
Compare
ahomescu
changed the base branch from
ahomescu/fix_reorganize_definitions/use_comments
to
ahomescu/fix_reorganize_definitions/compare_extern_fn_sigs
September 17, 2026 00:39
ahomescu
added this pull request to stack #2016
September 17, 2026 00:42
Add a snapshot test that merges two system headers into the same stdlib module, mixing regular items with foreign declarations using C and system ABIs. The fixture exposes nondeterministic ABI group ordering and misplaced header boundary comments caused by hoisting extern blocks after assigning comments.
Group foreign items by header and ABI in an IndexMap to emit extern blocks in deterministic source order and keep each block within a single header. Assign BEGIN/END comments after hoisting the blocks so the comments match the final item order. Register fresh node IDs for generated extern blocks so their header comments survive emission. Update the affected snapshots and the extern block ordering test documentation.
ahomescu
force-pushed
the
ahomescu/fix_reorganize_definitions/deterministic_externs
branch
from
September 17, 2026 01:01
f0fb7f9 to
b25b028
Compare
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.
Stack created with GitHub Stacks CLI • Give Feedback 💬