fsprojects / FSharpLint

Lint tool for F#
https://fsprojects.github.io/FSharpLint/
MIT License
300 stars 73 forks source link

What's the situation with the Benchmarks project? #620

Closed Numpsy closed 5 months ago

Numpsy commented 7 months ago

Under the 'tests' folder there is a 'FSharpLint.Benchmarks' project, that uses BenchmarkDotNet.

As it stands, that project targets .NET 5.0: https://github.com/fsprojects/FSharpLint/blob/598788db86dc9c65f9c14c3ecc694f9708d0b930/tests/FSharpLint.Benchmarks/FSharpLint.Benchmarks.fsproj#L5

However, the benchmark code itself it set to try to run the benchmarks as .NET Core 2.1, https://github.com/fsprojects/FSharpLint/blob/598788db86dc9c65f9c14c3ecc694f9708d0b930/tests/FSharpLint.Benchmarks/Program.fs#L13

So when I try to run it I get errors like

error NU1201: Project FSharpLint.Benchmarks is not compatible with netcoreapp2.1 (.NETCoreApp,Version=v2.1). Project FSharpLint.Benchmarks supports: net5.0 (.NETCoreApp,Version=v5.0)

In addition, if I try to change it to test as .NET 5 (or 6 with the in-progress 6 update) then I instead get

Please install the latest Microsoft.Diagnostics.Tracing.TraceEvent package in the project with benchmarks so MSBuild can copy the native dependencies of TraceEvent to the output folder.

The version of BenchmarkDotNet it's using is rather old and could do with an update (and if it's done after the .NET 6 change then it can use the .NET 6 version rather than the .NET Standard version, which removes a few dependencies), but - given that it seems to be not presently functional I thought I'd check before trying a PR for an update

knocte commented 7 months ago

I've never worked on this project, so I don't know much about it sorry. But if you propose PRs that fixes it, they are welcome! (And I guess we should include it in CI to make sure it doesn't rot again?)