fsprojects / fsprojects/FSharpLint
FSharpLint is significantly slow for certain .fsproj files
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 327
- Forks
- 74
- PR merge metrics
- No merged PRs in 30d
Description
Description
FSharpLint sometimes hangs when I give a fsproj file as input. When I provide individual fs files in the fsproj as input, then it works well. I am using the latest fsharplint version 0.21.2 and .NET 6.
Repro steps
Make sure you use .NET 6 as the project that I am referring here only compiles with .NET 6.
git clone https://github.com/B2R2-org/B2R2.gitcd B2R2; dotnet builddotnet tool install -g dotnet-fsharplintdotnet fsharplint lint src/FrontEnd/BinFile/B2R2.FrontEnd.BinFile.fsproj
In Step 4, you will see that FSharpLint hangs. The tool runs well with other fsproj files, e.g., dotnet fsharplint lint src\Core\B2R2.Core.fsproj works well.
Expected behavior
FSharpLint should run well with any fsproj file.
Actual behavior
It hangs for specific fsproj files such as the one above, and the CPU core usage is ~ 100%. Seems like running in an infinite loop.
Known workarounds
I can input individual fs files in the fsproj file to get around this problem.
Related information
- Operating system: I can repro this on Windows 11 and Linux Ubuntu 20.
- Version: dotnet-fsharplint 0.21.2 (installed from the
dotnet toolcommand) - .NET Runtime: .NET 6
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with .NET 6 using src/FrontEnd/BinFile/B2R2.FrontEnd.BinFile.fsproj, then compare it with the working src\Core\B2R2.Core.fsproj command. Investigate the lint run until the cause of the ~100% CPU loop is identified; done means the BinFile project completes without hanging while individual source files and the Core project continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100