Skip to content

Bump Fantomas to 8.1.0 - #95

Merged
nojaf merged 3 commits into
mainfrom
fantomas-8
Oct 22, 2026
Merged

nojaf merged 3 commits into
mainfrom
fantomas-8

Conversation

@nojaf

@nojaf nojaf commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Upgrades the Fantomas dotnet tool from 7.0.6 to 8.1.0 (upgrade guide).

Changes

  1. Tool manifest, CI and pre-push hook.
    • The v8 tool targets net10.0, so the check-format job now sets up the .NET 10.0.x SDK. The other jobs and global.json are unchanged.
    • hooks/pre-push uses the new fantomas check . verb instead of the --check flag.
  2. Formatting with Fantomas 8.1.0: 2 source files reformatted, no other changes.

Important

This PR does not touch .git-blame-ignore-revs. That file lists commits by hash, and this repo only allows squash merges, which give the merged commit a new hash. So, as with the earlier Fantomas format commit (#4), the hash goes in a follow-up PR: once this PR is squash-merged, a small PR adds the hash of the squashed commit on main to .git-blame-ignore-revs. Until then, git blame shows this PR's formatting changes.

Formatting changes

Both changes come from one v8 rule. The fsharp_space_before_lowercase_invocation and fsharp_space_before_uppercase_invocation settings put a space between a function and its parenthesized argument, f (x). In v8 they only do that when the function is a plain name such as List.map or Foo.Bar. A call with explicit type arguments, such as TypeList.cons<'t, 'ts>, now keeps its argument against the >:

-        let tl = TypeList.cons<'t, 'ts> (toTypeList xs)
+        let tl = TypeList.cons<'t, 'ts>(toTypeList xs)

The rule comes from the F# style guide discussion in fsharp/fslang-design#648 ("Extra space in fluent code"). It was agreed there that only a plain name keeps the space before its argument. Anything else in front of the parenthesis (a call, an index, or type arguments as here) keeps the parenthesis tight. Fantomas implemented this in fsprojects/fantomas#3425 and describes it in Formatting chain expressions.

@nojaf
nojaf requested review from a team as code owners October 20, 2026 12:01
@nojaf nojaf changed the title Bump Fantomas to 8.0.10 Bump Fantomas to 8.1.0 Oct 22, 2026
@nojaf
nojaf merged commit 4db0128 into main Oct 22, 2026
13 checks passed
@nojaf
nojaf deleted the fantomas-8 branch October 22, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants