dotnet / dotnet/fsharp

The F# Build should cache the generated lexer/parser instead of recreating them all of the time

Open
#17,006 1 comment 1 reaction 0 assignees View on GitHub
Area-Build Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

**Is your feature request related to a problem? Please describe.**

If the generated lexer and parser were checked in then they wouldn't need to be re-built quite so often. The files are almost perfectly cache-able (the only inputs are the lex/yacc binaries and the fsl/fsy file inputs) and this generation would mean that we don't have to

* rebuild the packaged lexx/yacc
* regenerate the parser/lexer

Running this is a cost that every proto build has to pay, for no good reason. Generating the lexer and parser on my machine takes ~12s:
![image](https://github.com/dotnet/fsharp/assets/573979/811db007-278b-43a8-bd6e-5c165dd5c959)

However, it also takes ~35s to build fslex and fsyacc projects - costs that could be avoided if the files don't need to be generated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.