You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Indentation warning for long match expression with anonymous record #1903
match(unbox<{|__proto__:{| ChooseAsync:(('T -> Async<_ option>)-> AsyncSeq<_>) option |} option |}>(
source'
)).__proto__with| Some proto when proto.ChooseAsync.IsSome ->
source'.ChooseAsync f
|_->
asyncSeq {for itm in source dolet!v= f itm
match v with| Some v ->yield v
|_->()}
Result
match(unbox<{|__proto__:{| ChooseAsync:(('T -> Async<_ option>)-> AsyncSeq<_>) option |} option |}>(
source'
)).__proto__with| Some proto when proto.ChooseAsync.IsSome ->
source'.ChooseAsync f
|_->
asyncSeq {for itm in source dolet!v= f itm
match v with| Some v ->yield v
|_->()}
Problem description
The formatted result gives an indentation warning on source'.
Extra information
The formatted result breaks by code.
The formatted result gives compiler warnings.
I or my company would be willing to help fix this.
Options
Fantomas 4.6 branch at 09/28/2021 06:20:05 - be6b897
{ config with
MaxLineLength =60}
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?
Hi @nojaf! Confirmed — this issue is no longer reproducible on current main. I've opened a draft PR with a regression test: see PR #3295.
The test uses MaxLineLength = 60 (which was the setting that triggered the original bug) and verifies that the match on a long unbox<{| ... |}> expression formats correctly without producing invalid indentation. Output is stable under re-formatting.
Happy to close this issue once the PR is reviewed/merged!
Activity
nojaf commentedon Feb 24, 2026
/repo-assist, I don't think this is still a problem.
Can you add a regression test for this so we can close this issue.
github-actions commentedon Mar 17, 2026
🤖 This is an automated response from Repo Assist.
Hi
@nojaf! Confirmed — this issue is no longer reproducible on currentmain. I've opened a draft PR with a regression test: see PR #3295.The test uses
MaxLineLength = 60(which was the setting that triggered the original bug) and verifies that thematchon a longunbox<{| ... |}>expression formats correctly without producing invalid indentation. Output is stable under re-formatting.Happy to close this issue once the PR is reviewed/merged!
Add changelog entry for #1903 regression test
Move #1903 changelog entry to end of Fixed section
Bump the dotnet-sidecars group with 6 updates (#257)
Bump the packages group with 5 updates (#106)
Bump the packages group with 6 updates (#84)