Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
baronfel opened this issue Apr 8, 2024 · 1 comment
Labels
Area-Build Everything related to building F# compiler, tooling and VS extension. Feature Request
Milestone

Comments

@baronfel
Copy link
Member

baronfel commented Apr 8, 2024

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

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.

@vzarytovskii
Copy link
Member

vzarytovskii commented Apr 9, 2024

It will require
a. Changes to fslexyacc to generate relative paths inside generated files instead of absolute
b. Custom msbuild task which will be hashing both sources and dependant fs files to figure out whether re-generating is needed. OR changes to fslexyacc to handle it properly.

I tried to do that couple of years ago but hit some issues with above

@abonie abonie added Area-Build Everything related to building F# compiler, tooling and VS extension. and removed Needs-Triage labels Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Build Everything related to building F# compiler, tooling and VS extension. Feature Request
Projects
Status: New
Development

No branches or pull requests

3 participants