test: lgb-diff label workflow - #13
Closed
mparrett wants to merge 4 commits into
Closed
Conversation
lgb-diff:
|
The reader surfaces comments, #_ discards, and empty reader conditionals as the VOID sentinel. Every read loop filters it — collections via appendNonVoid, read-string via ReadSkipNoValue — except CompileMultiple, which compiled each one like a real form. Two consequences: a dead LOAD_CONST/POP pair per top-level comment in every chunk (655 pairs in the shipped core bundle, executed on each boot), and a trailing comment clobbering the last value, so (load-string "42 ;; done") returned VOID instead of 42. Skip VOID forms in the read loop. Comment-only input still evaluates to VOID (not nil) so the REPL keeps echoing nothing for a comment-only line. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
264,072 -> 258,947 bytes (-1.9%); the 655 LOAD_CONST VOID / POP pairs are gone. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dumps a .lgb as deterministic text (via disasm/decode-bundle +
disassemble-resolved) so bundle changes can be read and diffed:
diff -u <(./lg scripts/lgbdump.lg old.lgb) <(./lg scripts/lgbdump.lg new.lgb)
Three choices aim at diff quality: resolved LOAD_CONST/LOAD_VAR rows
print only the referenced identifier (a pool insertion shifts every
later index, turning a one-fn change into a whole-bundle diff — 16.7k
noise lines vs 763 real ones on the nooga#558 bundle bump); anonymous fns get
a bare label for the same reason; and the LOAD_CONST-VOID/POP pairs that
top-level comments compile to (nooga#600 removes them) collapse to one count
line per chunk.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Label a PR lgb-diff and a sticky comment carries the unified diff of two lgbdump renderings of pkg/rt/core_compiled.lgb (head vs merge-base), refreshed on each push. The diff itself is plain diff -u in the runner; the script stays dump-only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mparrett
force-pushed
the
test/lgb-diff-workflow
branch
from
July 21, 2026 01:20
eb1d50b to
fc0720b
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.
Fork-only test of the lgb-diff opt-in workflow. Payload = the nooga#600 VOID strip, so the expected sticky comment shows the -655 dead-pair bundle diff.