fsprojects / fsprojects/FSharpLint

FSharpLint is significantly slow for certain .fsproj files

Open
#558 12 comments 0 reactions 0 assignees View on GitHub

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.

  1. git clone https://github.com/B2R2-org/B2R2.git
  2. cd B2R2; dotnet build
  3. dotnet tool install -g dotnet-fsharplint
  4. dotnet 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 tool command)
  • .NET Runtime: .NET 6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.