You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Design changes identified along the way, not part of the repairs above:
One .cmt source-file lookup. genType (compiler/gentype/find_source_file.ml) and reanalyze (analysis/reanalyze/src/find_source_file.ml) each walk a .cmt to find a source file. genType returns an absolute path and reanalyze a relative one with debug logging; sharing the walkers needs a library both link, and today that is only compiler/ml.
Generate Belt's key-specialised modules. The Int and String variants of Belt's maps and sets are hand-written copies that differ in 2–4 lines each; generating them from one template would add a build step to the runtime.
Merge analysis's Log and Debug switches. They are separate verbose switches (db+/dv+) that tests enable independently; merging them changes the debugging command line.
One /+ path operator.find_files, module_resolution and build_system each define ( /+ ) as Filename.concat.
Commented-out debug code in the type checker. Upstream debug blocks such as check_expans and check_memorized_abbrevs in btype.ml and print_pat/pretty_row in parmatch.ml are kept as comments; keeping or deleting them is a policy choice.
Comment positions in the formatter. In an arrow type, (~x /* a */ : int=?, unit) prints the comment after the colon, and a comment after =? moves to the next argument; nothing is lost and the output is stable, but the position changes.
rescript-tools help text. The help omits the ppx and extract-embedded commands; whether to advertise them is a CLI decision.
RescriptTools.binaryPath from CommonJS.cli/common/bins.js is an ES module with top-level await, so a CommonJS project calling binaryPath probably cannot load it; untested.
This is the list of repairs coming from semantic drift analysis.
Repairs
Possible additional work
Design changes identified along the way, not part of the repairs above:
.cmtsource-file lookup. genType (compiler/gentype/find_source_file.ml) and reanalyze (analysis/reanalyze/src/find_source_file.ml) each walk a.cmtto find a source file. genType returns an absolute path and reanalyze a relative one with debug logging; sharing the walkers needs a library both link, and today that is onlycompiler/ml.LogandDebugswitches. They are separate verbose switches (db+/dv+) that tests enable independently; merging them changes the debugging command line./+path operator.find_files,module_resolutionandbuild_systemeach define( /+ )asFilename.concat.check_expansandcheck_memorized_abbrevsinbtype.mlandprint_pat/pretty_rowinparmatch.mlare kept as comments; keeping or deleting them is a policy choice.(~x /* a */ : int=?, unit)prints the comment after the colon, and a comment after=?moves to the next argument; nothing is lost and the output is stable, but the position changes.rescript-toolshelp text. The help omits theppxandextract-embeddedcommands; whether to advertise them is a CLI decision.RescriptTools.binaryPathfrom CommonJS.cli/common/bins.jsis an ES module with top-level await, so a CommonJS project callingbinaryPathprobably cannot load it; untested.🤖 Generated with Claude Code