Repository navigation
refactor(compiler): extract emitted-spec? from write-packages! and emit-frame! - #1090
Merged
Merged
Conversation
mparrett
commented
Oct 22, 2026
Collaborator
Author
There was a problem hiding this comment.
Self-check. No actionable findings.
The extraction preserves write-packages!'s skipped-input diagnostic and emission/failure behavior, while emit-frame! now uses the exact same emitted-spec? predicate for its imports. I checked the surrounding compile-program flow and the existing regression coverage.
Validation at 9a710d0: make build and smoke checks passed; TestLgCompileCommand passed all five subtests, including the data-only input case (which verifies the skipped package is not imported and that runtime initialization still runs); make check-generated-manifest passed. Existing CI is green, including generated artifacts and gogen-diff.
…ages! and emit-frame! emit-frame! re-derived write-packages!'s condition for writing a package, and #1082 came from the two disagreeing. emitted-spec? is now the one definition both use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mparrett
force-pushed
the
wt/emitted-spec
branch
from
October 28, 2026 06:18
9a710d0 to
215378b
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.
#1082 happened because
emit-frame!decided which packages to import with its own copy of the conditionwrite-packages!uses to decide which packages to write, and the two copies disagreed. #1083 fixed the copy, and the review suggested one predicate so they can't drift again.emitted-spec?is that predicate.write-packages!writes a package exactly when it holds, andemit-frame!imports exactly those packages. The skip branch stays first inwrite-packages!'scond, so its "skipped" message for a namespace with no lowerable defns is unchanged.Verification
TestLgCompileCommandpasses, including fix(compiler): omit skipped packages from native entry imports #1083's data-only subtest. With(seq (:lf s))removed from the predicate, that subtest fails, so it covers both callers through the one definition.make check-generated-manifestandcmd/check-generatedpass aftermake generate.🤖 Generated with Claude Code