Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Fantomas to Fantomas.Core and fantomas-tool to fantomas #2185

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [5.0.0-alpha-001] - 2022-03-19

### Changed
* Renamed `fantomas-tool` to `fantomas` and the `Fantomas` namespace to `Fantomas.Core`. [#2174](https://github.com/fsprojects/fantomas/issues/2174)

### Added
* Initial settings for strousrup bracket style. [#2161](https://github.com/fsprojects/fantomas/pull/2161)

## [4.7.5] - 2022-03-27

### Fixed
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ F# source code formatter, inspired by [scalariform](https://github.com/mdr/scala

## Quick install

* Command line: `dotnet tool install -g fantomas-tool`
* Command line: `dotnet tool install -g fantomas`
* JetBrains Rider: preinstalled
* VSCode: part of [Ionide](http://ionide.io/) and [fantomas-fmt](https://marketplace.visualstudio.com/items?itemName=paolodellepiane.fantomas-fmt).
* [Visual Studio 2019](https://marketplace.visualstudio.com/items?itemName=asti.fantomas-vs)
Expand All @@ -22,7 +22,7 @@ F# source code formatter, inspired by [scalariform](https://github.com/mdr/scala
Use this command to install Fantomas as a .NET 5 SDK global tool:

```
dotnet tool install -g fantomas-tool
dotnet tool install -g fantomas
```

For detailed guidelines, please read [Fantomas: How to use](docs/Documentation.md#using-the-command-line-tool).
Expand All @@ -38,7 +38,7 @@ The [resharper-fsharp](https://github.com/JetBrains/resharper-fsharp) uses fanto
#### Using the latest version inside Rider

For technical reasons Rider cannot always use the latest version of Fantomas found on NuGet.
As a workaround you could install [fantomas-tool](https://www.nuget.org/packages/fantomas-tool) locally with `dotnet tool install fantomas-tool` and configure it as an [External tool](https://www.jetbrains.com/help/rider/Settings_Tools_External_Tools.html).
As a workaround you could install [fantomas](https://www.nuget.org/packages/fantomas) locally with `dotnet tool install fantomas` and configure it as an [External tool](https://www.jetbrains.com/help/rider/Settings_Tools_External_Tools.html).

![Rider external tool window](./docs/rider-external-tool.png)

Expand All @@ -62,7 +62,7 @@ The F# Formatting extension sets up Fantomas as the default formatter for F# fil

### Visual Studio for Mac

Install [fantomas-tool](https://www.nuget.org/packages/fantomas-tool) locally with `dotnet tool install fantomas-tool` and configure it as an [External tool]
Install [fantomas](https://www.nuget.org/packages/fantomas) locally with `dotnet tool install fantomas` and configure it as an [External tool]

![VS Mac external tool window](./docs/vsmac-external-tool.png)
### Online
Expand Down
2 changes: 1 addition & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ let fantomasExecutableForExternalTests projectdir =
| DotNet.BuildConfiguration.Custom s -> s

{ ProcessName = "dotnet"
Arguments = [ sprintf "%s/src/Fantomas.CoreGlobalTool/bin/%s/net5.0/fantomas-tool.dll" projectdir configuration ] }
Arguments = [ sprintf "%s/src/Fantomas.CoreGlobalTool/bin/%s/net5.0/fantomas.dll" projectdir configuration ] }

let externalProjectsToTest =
[
Expand Down
6 changes: 3 additions & 3 deletions docs/Daemon mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Each version of Fantomas theoretically can have a different outcome as the style

## Solution

To tackle this problem, we introduce two new concepts: `--daemon` mode for the [fantomas-tool](https://www.nuget.org/packages/fantomas-tool) and [Fantomas.Client](https://www.nuget.org/packages/Fantomas.Client).
To tackle this problem, we introduce two new concepts: `--daemon` mode for the [fantomas tool](https://www.nuget.org/packages/fantomas) and [Fantomas.Client](https://www.nuget.org/packages/Fantomas.Client).
`--daemon` would launch the commandline application as a sort of [LSP server](https://microsoft.github.io/language-server-protocol/) 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.
Editor tooling would be able to launch your pinned version of `fantomas` as a daemon service and interact with it outside-of-process.

## End-user impact

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`.
End-users don't have to worry about `Fantomas.Client` or the `--daemon` flag. They only need to install a compatible version of `fantomas`.
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.

Expand Down
12 changes: 6 additions & 6 deletions docs/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Create a [.NET tool manifest](https://docs.microsoft.com/en-us/dotnet/core/tools
> dotnet new tool-manifest

Install the command line tool with:
> dotnet tool install fantomas-tool
> dotnet tool install fantomas

or install the tool globally with
> dotnet tool install -g fantomas-tool
> dotnet tool install -g fantomas

For the overview how to use the tool, you can type the command

Expand Down Expand Up @@ -1253,7 +1253,7 @@ let add a b = a + b

To exclude files from formatting, create a `.fantomasignore` file in the root of your project.
`.fantomasignore` uses gitignore syntax (via [MAB.DotIgnore](https://github.com/markashleybell/MAB.DotIgnore)).
Ignored files will be picked up when the [Fantomas cli tool](https://www.nuget.org/packages/fantomas-tool/) or the FAKE helpers (in [Fantomas.Extras](https://www.nuget.org/packages/Fantomas.Extras/)) are used.
Ignored files will be picked up when the [Fantomas cli tool](https://www.nuget.org/packages/fantomas/) or the FAKE helpers (in [Fantomas.Extras](https://www.nuget.org/packages/Fantomas.Extras/)) are used.
Exclusion applies both to formatting and the format checking.

```
Expand Down Expand Up @@ -1281,19 +1281,19 @@ git diff --cached --name-only --diff-filter=ACM -z | xargs -0 $HOME/.dotnet/tool
git diff --cached --name-only --diff-filter=ACM -z | xargs -0 git add
```

<small>This script assumes you have installed Fantomas globally as a [dotnet tool](https://www.nuget.org/packages/fantomas-tool/)</small>
<small>This script assumes you have installed Fantomas globally as a [dotnet tool](https://www.nuget.org/packages/fantomas/)</small>

**Please use with caution** as [Fantomas is not without bugs](https://github.com/fsprojects/fantomas/issues?q=is%3Aissue+is%3Aopen+label%3A%22bug+%28soundness%29%22).

## FAKE Helpers

Fantomas also exposes some less official helper functions in [Fantomas.Extras](https://www.nuget.org/packages/Fantomas.Extras/), these will be deprecated in the next major version.
It is advised to run the `fantomas-tool` instead when using FAKE, see [example](../fake-sample/README.md).
It is advised to run the `fantomas` tool instead when using FAKE, see [example](../fake-sample/README.md).

## Updating to a new Fantomas version

By default, Fantomas adheres to the Microsoft [F# code formatting guidelines](https://docs.microsoft.com/en-us/dotnet/fsharp/style-guide/formatting).
If these change, Fantomas will follow accordingly. Due to this reason, the output cannot be guaranteed to remain the same when upgrading to a new minor version.

If you are using Git for your source control, it is recommended to ignore commits where `fantomas-tool` was updated using a [.git-blame-ignore-revs file](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revltrevgt).
If you are using Git for your source control, it is recommended to ignore commits where `fantomas` was updated using a [.git-blame-ignore-revs file](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revltrevgt).
Check out this [blogpost](https://www.moxio.com/blog/43/ignoring-bulk-change-commits-with-git-blame) for more details.
Loading