safesparrow / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
1 stars 0 forks source link

Add ParallelProjectAnalysisTests. #1

Closed nojaf closed 1 year ago

nojaf commented 2 years ago

This is a proposal to include a unit test that asserts no projects were referenced twice.

graph TD;
    A-->B1;
    A-->B2;
    B1-->C;
    B2-->C;

Calling checker.GetBackgroundCheckResultsForFileInProject for a file in project A should not evaluate project C twice.

safesparrow commented 2 years ago

Thanks @nojaf , I somehow missed this.

I'm wondering if we should move away from putting real test projects and their FSharpProjectOptions in the codebase and instead generate them, especially if all we care about is the project graph rather than source code details. It would make these tests much easier to write and cheaper to maintain.

Could be useful in other tests and benchmarks as well.