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

Add GetProjectSnapshotFromScript to FSharpChecker #16735

Merged
merged 15 commits into from
Feb 23, 2024

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Feb 19, 2024

Description

See rational in #16718.

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.

Copy link
Contributor

github-actions bot commented Feb 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

@nojaf nojaf added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Feb 19, 2024
Copy link
Contributor

@0101 0101 left a comment

Choose a reason for hiding this comment

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

Thanks for adding more features to TC!

Are there any tests for GetProjectOptionsFromScript which we could repurpose for this?

@nojaf nojaf marked this pull request as ready for review February 20, 2024 13:48
@nojaf nojaf requested a review from a team as a code owner February 20, 2024 13:48
@nojaf
Copy link
Contributor Author

nojaf commented Feb 20, 2024

@0101 I've added a bit of a different test. Let me know what you think.

@0101
Copy link
Contributor

0101 commented Feb 20, 2024

@0101 I've added a bit of a different test. Let me know what you think.

Yeah that's good. I guess it doesn't really exercise all the code paths but it looks like we don't have such tests even for GetProjectOptionsFromScript so 🤷

Copy link
Contributor

@0101 0101 left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@psfinaki psfinaki merged commit f78cb7b into dotnet:main Feb 23, 2024
29 checks passed
nojaf added a commit to nojaf/fsharp that referenced this pull request Feb 28, 2024
* Initial attempt for GetProjectSnapshotFromScript

* Add GetProjectSnapshotFromScript to service.

* Address feedback from code review.

* Assert both return the same results.

* Remove old comment

* Construct cache key in ComputeScriptClosure

* Include stamp

* Don't take projectSnapshot as input for ComputeScriptClosure

* Add other flags

* Add checksum directly.

* Remove duplicate checksum

* Use ISourceTextNew for Source

* Mark API as experimental
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
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants