Skip to content

Update Fantomas.Client to 0.12.0-beta-002 - #1543

Merged
TheAngryByrd merged 3 commits into
ionide:mainfrom
nojaf:upgrade-fantomas-client
Aug 29, 2026
Merged

Update Fantomas.Client to 0.12.0-beta-002#1543
TheAngryByrd merged 3 commits into
ionide:mainfrom
nojaf:upgrade-fantomas-client

Conversation

@nojaf

@nojaf nojaf commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Dear @baronfel and @TheAngryByrd, I hope this PR finds you well.
I love you guys, just wanted to mention that!

The tl;dr here is that Fantomas can now report any settings in .editorconfig that are old an no longer used by the current version that is formatting the code.

image

I did some testing on Mac and Linux, and I am quite confident in these changes.
I would merge this, and if all goes well, we eventually promote the beta label to stable.


0.12.0 exposes two things FSAC previously had no way to see: a log delegate saying which Fantomas a folder resolved to and where it was found, and an event naming the settings in the resolved configuration that Fantomas could not act on. Both were silent failures before. A tool found on the PATH formats exactly as successfully as the version a repository pins, and an unknown fsharp_ setting quietly applies a default, so neither was distinguishable from working.

The log delegate goes to the existing Fantomas logger. Configuration warnings are reported once per file, deduplicated because the daemon raises the event on every format request rather than only when something changed. They name the version that could not act on the setting, an older Fantomas being a likelier cause than a typo, and offer to open the .editorconfig files that contributed along with the file being formatted, which needed window/showDocument wiring up on FSharpLspClient.

Two fixes to the surrounding code:

  • The service owning the daemons was never disposed, so every fantomas daemon process FSAC started outlived the session that started it.

  • Fantomas response codes are read as FantomasResponseCode rather than bare ints. Only five were handled by name and the rest fell into one branch that printed the response record, so the message DaemonCreationFailed carries, which includes the standard error of the daemon that would not start, never reached a user, and a cancelled request was reported as a formatting failure.

Paket.Restore.targets is regenerated by the paket 10.3.1 pinned in .config/dotnet-tools.json. It was left behind when that tool was bumped, and any build recreates it.

@nojaf
nojaf force-pushed the upgrade-fantomas-client branch from 22ef804 to 4879da4 Compare August 28, 2026 21:23
nojaf added 3 commits August 28, 2026 22:38
0.12.0 exposes two things FSAC previously had no way to see: a log
delegate saying which Fantomas a folder resolved to and where it was
found, and an event naming the settings in the resolved configuration
that Fantomas could not act on. Both were silent failures before. A tool
found on the PATH formats exactly as successfully as the version a
repository pins, and an unknown fsharp_ setting quietly applies a
default, so neither was distinguishable from working.

The log delegate goes to the existing Fantomas logger. Configuration
warnings are reported once per file, deduplicated because the daemon
raises the event on every format request rather than only when something
changed. They name the version that could not act on the setting, an
older Fantomas being a likelier cause than a typo, and offer to open the
.editorconfig files that contributed along with the file being
formatted, which needed window/showDocument wiring up on FSharpLspClient.

Two fixes to the surrounding code:

- The service owning the daemons was never disposed, so every
  `fantomas daemon` process FSAC started outlived the session that
  started it.

- Fantomas response codes are read as FantomasResponseCode rather than
  bare ints. Only five were handled by name and the rest fell into one
  branch that printed the response record, so the message
  DaemonCreationFailed carries, which includes the standard error of the
  daemon that would not start, never reached a user, and a cancelled
  request was reported as a formatting failure.

Paket.Restore.targets is regenerated by the paket 10.3.1 pinned in
.config/dotnet-tools.json. It was left behind when that tool was bumped,
and any build recreates it.
The previous run failed on infrastructure only: paket restore killed with
137 on both macOS runners, dotnet --info killed with 143 on ubuntu, and the
Windows test host crashed on a FileSystemWatcher finalizer NullReferenceException
that no code in this branch touches.

Claude-Session: https://claude.ai/code/session_01BchWfZ7b2KCx5h4YCmcPnw
@TheAngryByrd
TheAngryByrd force-pushed the upgrade-fantomas-client branch from d283a99 to e604119 Compare August 29, 2026 04:43
@TheAngryByrd
TheAngryByrd merged commit d863bf6 into ionide:main Aug 29, 2026
55 of 57 checks passed
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