Raw identifier syntax build regression - OxCaml version#238
Open
Raw identifier syntax build regression - OxCaml version#238
Conversation
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.
d3a2516 to
5663fc6
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.
$ hyperfine -p 'git clean -dfX; git checkout {sha}; ./configure --disable-dependency-generation' -L sha 717d9ba2c8,76a2ac4b37,da1cc7acd8,5663fc6a56 'make -j'`PR#12323being mergedPR#12323