Skip to content

Commit

Permalink
v5.0.0 stable (#2504)
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf authored Sep 16, 2022
1 parent a15920c commit bd18a08
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [Unreleased]
## [5.0.0] - 2022-09-16

### Fixed
* Open statement after module should get a newline before it. [#2502](https://github.com/fsprojects/fantomas/issues/2502)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ Fantomas

F# source code formatter, inspired by [scalariform](https://github.com/mdr/scalariform) for Scala, [ocp-indent](https://github.com/OCamlPro/ocp-indent) for OCaml and [PythonTidy](https://github.com/acdha/PythonTidy) for Python.

> dotnet tool install fantomas
Documentation is available at https://fsprojects.github.io/fantomas/docs/index.html

## Contributing Guidelines

See the [Contribution Guidelines](./CONTRIBUTING.md) and our [contribution documentation](https://fsprojects.github.io/fantomas/docs/contributors/Index.html)
See the [Contribution Guidelines](./CONTRIBUTING.md) and our [contributors documentation](https://fsprojects.github.io/fantomas/docs/contributors/Index.html)
6 changes: 3 additions & 3 deletions docs-old/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](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: 3 additions & 9 deletions docs/docs/end-users/FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,10 @@ First, it starts with an "F" just like many other F# projects.
Second, Fantomas is my favourite character in the literature.
Finally, Fantomas has the same Greek root as "[phantom](https://en.wiktionary.org/wiki/phantom)"; coincidentally F# ASTs and formatting rules are so *mysterious* to be handled correctly.

## Why do I need prerelease?
## What is `fantomas-tool`?

Fantomas is both a tool and a library. Before Fantomas v5, the tool was called `fantomas-tool` and the library `Fantomas`.
After some user feedback, we decided to rename `Fantomas` (the library) to `Fantomas.Core` and `fantomas-tool` to `fantomas`.

Once v5 is released, users will be able to install the tool using `dotnet tool install fantomas`.
Because there is no stable release yet, `NuGet` will not resolve `fantomas` as a tool but as a regular library.
Thus, for the time being, you need to add `--prerelease` to resolve this.

At the time of writing we are in `beta` and consider **version five** to be **production ready**.
That is the previous name of the dotnet tool. `v4.7.9` was the last stable release under that name.
Please use [fantomas](https://www.nuget.org/packages/fantomas/) instead and remove all traces of `fantomas-tool` in your `dotnet-tools.json` file.

## Why exit code 99 for a failed format check?

Expand Down
6 changes: 2 additions & 4 deletions docs/docs/end-users/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ You can skip this step if you wish to install Fantomas globally.
Install the command line tool with:

> dotnet tool install fantomas --prerelease
> dotnet tool install fantomas
or install the tool globally with
> dotnet tool install -g fantomas --prerelease
[Why do we need that "--prerelease"?](./FAQ.html#Why-do-I-need-prerelease)
> dotnet tool install -g fantomas
## Usage

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/end-users/Rider.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ index: 7
The resharper-fsharp uses fantomas under the hood to format the source code. No need for any additional plugins.

From Rider 2022.2 onwards, Rider can detect your `dotnet` fantomas installation, either globally or locally.
Install fantomas locally with `dotnet tool install fantomas --prerelease`.
Install fantomas locally with `dotnet tool install fantomas`.

<img class="mt-2" src="{{root}}/images/rider-fantomas.png" alt="drawing" width="70%"/>

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/end-users/VisualStudio.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Do note that the extension might not be up to date with the latest version of Fa

### Visual Studio for Mac

1. Install [fantomas](https://www.nuget.org/packages/fantomas) locally with `dotnet tool install fantomas --prerelease` and configure it as an External Tool.
1. Install [fantomas](https://www.nuget.org/packages/fantomas) locally with `dotnet tool install fantomas` and configure it as an External Tool.
2. Open the external tool window by going to Tools -> Edit custom tools
3. Click Add and fill in the information
4. Run fantomas inside Tools -> fantomas
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h2 id="getting-started">Get started</h2>
<p class="text-capitalize">Install <strong>Fantomas</strong> as <em>.NET tool</em></p>
<div class="d-flex justify-content-center align-items-center">
<code class="my-4">
<i class="bi bi-chevron-right"></i> dotnet tool install fantomas --prerelease
<i class="bi bi-chevron-right"></i> dotnet tool install fantomas
<button class="btn btn-outline-light ms-3 pointer"
data-bs-toggle="tooltip" data-bs-placement="top"
title="Copy to clipboard">
Expand Down
4 changes: 2 additions & 2 deletions fake-sample/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"fake"
]
},
"fantomas-tool": {
"version": "4.5.4",
"fantomas": {
"version": "5.0.0",
"commands": [
"fantomas"
]
Expand Down

0 comments on commit bd18a08

Please sign in to comment.