Skip to content

Conversation

@nojaf
Copy link
Contributor

@nojaf nojaf commented Mar 19, 2024

Description

Fixes #16876

I've tweaked the TransparentCompiler to work better with the ParseFile function, aiming to make things smoother for folks using Rider.

Before this change, TransparentCompiler was stuck using an older method, the BackgroundCompiler, for ParseFile. Now, we've moved to a different strategy. We're either using a new, smaller cache for storing results or not caching at all. This is pretty handy, especially when you're whipping up ASTs for code generation.

I decided to go with a brand-new cache for this because it's meant to be used without messing with the project's own parsing and caching setup. So, it's all about keeping things neat and tidy, without stepping on the toes of the project-specific file caching.

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes

  • Release notes entry updated:

    Please make sure to add an entry with short succinct description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/.FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/releae-notes/.Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/.FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Information about the release notes entries format can be found in the documentation.
    Example:

    If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

@nojaf nojaf requested a review from a team as a code owner March 19, 2024 14:33
@nojaf nojaf added Transparent-Compiler NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes labels Mar 19, 2024
@nojaf nojaf requested review from 0101 and auduchinok March 19, 2024 14:33
@github-actions
Copy link
Contributor

github-actions bot commented Mar 19, 2024

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

@vzarytovskii vzarytovskii removed the request for review from 0101 March 19, 2024 14:42
Copy link
Member

@auduchinok auduchinok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nojaf!

@vzarytovskii vzarytovskii enabled auto-merge (squash) March 20, 2024 14:48
@vzarytovskii vzarytovskii merged commit e4e709f into dotnet:main Mar 20, 2024
@nojaf nojaf deleted the parse-sourcetext-endpoint branch March 20, 2024 16:27
nojaf added a commit to nojaf/fsharp that referenced this pull request Mar 20, 2024
* Update ParseFile in TransparentCompiler

* Add unit tests

* Decrease cache size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes Transparent-Compiler

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

A more flexible parse endpoint in the TransparentCompiler

4 participants