Repository navigation
upstream: Review Julia through 53f4db20b59c - #16
Merged
github-actions[bot] merged 3 commits intoSep 19, 2026
Merged
Conversation
JuliaLang#63252) `jl_declare_global` was written as a `while (1)` loop whose body exited through `break`, `continue`, and two `goto` labels, with the world-counter bump tucked between the loop and the `done:` label. Much of that control flow was vestigial: the `continue` after an in-place partition update only re-entered the loop to take a path that cannot fail (the kind now matches and the restriction was just set to the requested type), and the `goto check_type` was unreachable, since it required a typed weak declaration, which is rejected before the loop. Rewrite it as a single pass. First classify the requested declaration against the current partition: it already matches, it conflicts (a constant, an import, or a global with a different type) and we error, or a new kind must be installed, either in place if the partition was created for this world or via `jl_replace_binding_locked` otherwise. Then apply the chosen update, and finally publish the new world only if a new partition was actually installed. Every check that can reject the declaration still runs before any state is mutated, but that is now apparent from the structure rather than from tracing the jumps. Assisted-by: Claude Code (Opus 4.8, Opus 5, Fable 5) and OpenAI Codex Co-authored-by: Keno Fischer <Keno@users.noreply.github.com>
Assisted-by: Codex (GPT-5.6 Luna)
Assisted-by: Codex (GPT-5.6 Luna)
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.
Upstream Julia
12fbf6b9b315b71aaa96b7a766c5c23c89f36d90→53f4db20b59cf7620a364b3b9a419f4a8eb0bdcd.Reviewed the upstream diff, Joolia base-to-previous port, merged result, binding-partition helpers, declaration callers, and existing rebinding/inference coverage. The refactor preserves behavior and introduces no zero-origin conversion requirement; no source or test adaptations were made.
Draft for human review. Automatic merging is disabled.
The upstream history is preserved in a merge commit; any Joolia adaptations are committed separately. The publisher explicitly dispatches Joolia CI on this branch; inspect its result before merging.
Review record:
contrib/upstream-sync/reports/53f4db20b59cf7620a364b3b9a419f4a8eb0bdcd.json.Incoming commits:
53f4db20b59cf7620a364b3b9a419f4a8eb0bdcd— toplevel: restructurejl_declare_globalas straight-line code [NFCI] (change 63252)Merge integrated batches with a merge commit, never squash/rebase, to preserve the upstream ancestry.
Passing CI covers only
contrib/ci/coverage.json; it does not certify the entire port.