As part of the 4.6
release, we've introduced a new feature where end-user can control the version of Fantomas that is being used inside an IDE.
In previous iterations, the editor tooling would typically reference the Fantomas or Fantomas.Extras nuget package and use the CodeFormatter api to handle formatting.
The major drawback of this approach is that shared FCS dependency needed to be exactly the same.
So the editor is in control of which version of Fantomas is being used.
Each version of Fantomas theoretically can have a different outcome as the style guides may have changed over time.
To tackle this problem, we introduce two new concepts: --daemon
mode for the fantomas-tool and Fantomas.Client.
--daemon
would launch the commandline application as a sort of LSP server and Fantomas.Client
could connect to this and proxy format requests.
Editor tooling would be able to launch your pinned version of fantomas-tool
as a daemon service and interact with it outside-of-process.
End-users don't have to worry about Fantomas.Client
or the --daemon
flag. They only need to install a compatible version of fantomas-tool
.
Be it locally or globally. The first compatible version is 4.6.0-alpha-004
, all higher version should work as well.
Local versions have precedence over the global version.
The nice thing about this approach is that you can upgrade Fantomas at your own pace. When new versions drop, you can dedicate a separate commit in source control and it won't interfere with your other commits.