tooling(codemod): instrumented parser + #{ record-migration codemod#312
Closed
hyperpolymath wants to merge 1 commit into
Closed
tooling(codemod): instrumented parser + #{ record-migration codemod#312hyperpolymath wants to merge 1 commit into
hyperpolymath wants to merge 1 commit into
Conversation
Branch-only tooling for affinescript#218 (do NOT merge into main —
the Codemod_hook instrumentation is for the migration sweep only).
lib/codemod_hook.ml records every record-literal LBRACE byte offset;
parser.mly ExprRecord productions call Codemod_hook.note; codemod/
exe inserts '#' at exactly those offsets (`{`->`#{`, `Foo {`->`Foo #{`).
Safety: refuses to rewrite unless every recorded offset is really '{'.
Hardened to catch per-file parser exceptions so one bad file can't
abort the sweep.
Known limitation (recorded on #218): Affinescript.Parse.parse_file
hits a pre-existing Match_failure (parse.ml:49) on stdlib + ~95/261
.affine that the 257 AOT harness parses fine — fix that parse-API
bug (next) before the stdlib sweep.
Refs #218
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
Author
|
Closing as superseded. The #{ record-syntax migration epic #218 already landed on main:
This PR's body itself states "do NOT merge into main — the Codemod_hook instrumentation is for the migration sweep only." The migration sweep is done; the instrumented-parser tooling has no remaining purpose on main. Issue #218 is CLOSED. Sibling PR #310 (the application of the codemod's output) is also being closed as superseded by #222. No salvage — the lib/codemod_hook.ml + codemod/ tree is branch-only by design. |
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.
Branch-only tooling for affinescript#218 (do NOT merge into main — the Codemod_hook instrumentation is for the migration sweep only).
lib/codemod_hook.ml records every record-literal LBRACE byte offset; parser.mly ExprRecord productions call Codemod_hook.note; codemod/ exe inserts '#' at exactly those offsets (
{->#{,Foo {->Foo #{). Safety: refuses to rewrite unless every recorded offset is really '{'. Hardened to catch per-file parser exceptions so one bad file can't abort the sweep.Known limitation (recorded on #218): Affinescript.Parse.parse_file hits a pre-existing Match_failure (parse.ml:49) on stdlib + ~95/261 .affine that the 257 AOT harness parses fine — fix that parse-API bug (next) before the stdlib sweep.
Refs #218