Skip to content

Conversation

@dra27
Copy link
Owner

@dra27 dra27 commented Sep 23, 2025

$ hyperfine -p 'git clean -dfX; git checkout {sha}; ./configure --disable-dependency-generation' -L sha 717d9ba2c8,76a2ac4b37,da1cc7acd8,5663fc6a56 'make -j'`

@dra27 dra27 added the no-change-entry-needed Causes the check for a Changes entry to be skipped for PRs label Sep 23, 2025
Lexer.is_keyword was exposed as part of the support for raw identifier
syntax in OCaml 5.2. Using this function directly added a dependency
for Path and Pprintast on Lexer and transitively on Parser which did not
exist before. Unfortunately, this significantly reduces the parallelism
when compiling ocamlcommon.cmxa.

The fix here is to move the keyword_table from Lexer to a new module
Keywords and instead expose Keywords.is_keyword and additionally
Keywords.token_of_string for the Lexer itself.

There is a small wart that Parser.token is required, but can't be
directly referenced because this would create a dependency for the new
keywords.cmx on parser.cmx and undermine the fix. The solution is to
generate an additional mli-only module Keywords_token containing a copy
(with type equality) of Parser.token and use that.
@dra27 dra27 force-pushed the fix-12323-build-regression-5.2 branch from d3a2516 to 5663fc6 Compare September 24, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-entry-needed Causes the check for a Changes entry to be skipped for PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants