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

Format out of process #1845

Merged
merged 28 commits into from
Oct 20, 2021
Merged

Format out of process #1845

merged 28 commits into from
Oct 20, 2021

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Jul 29, 2021

This is an initial attempt at fixing #1844.
Here, a new NuGet package Fantomas.Client is introduced that contains LSPFantomasService (exposed via interface FantomasService).
LSPFantomasService starts a process and offloads the formatting over there using vs-streamjsonrpc.

The FantomasService can be constructed by providing the ProcessStartInfo or using the createForWorkingDirectory helper function. This helper function should be the main choice as it will look for a local or global fantomas-tool.

I still have a couple of open questions:

  • Should there be a heartbeat mechanism to verify the health of the daemon process?
  • What to do with logging? I believe the lsp could feed notifications back in from the process to the FantomasService. These could then be exposed via the interface somehow.
  • What should the response be when Fantomas failed to format a file? (Incomplete AST, a bug in Fantomas). Result type? A more loose error message like a simple string or a more detailed DU type?
  • The current implementation exposes all methods as F# Async, while under the hood they are Tasks. Does it make sense to expose Task instead?
  • In the current implementation, the parsingOptions are created by the daemon. The relevance of the F# parsingOptions is to know if a file should have a module or namespace. Scripts and the last file in a project do not require this. How do we want to deal with this?
  • Related to the previous remark, I'm puzzled how format selection currently even works. I believe the filename would always need to be a script as the selection in the source is passed to parser. Not sure how that is supposed to work for *.fsi files.

@baronfel
Copy link
Contributor

My opinions, point by point:

  • That would be a 'nice to have' IMO, as any critical failures could also be detected by the fantomas daemon shutting down, which would terminate the stdin/stdout pipes
  • logging could be done either by the $/logTrace or window/logMessage LSP messages, and FSAC could forward those along to the calling LSP client (e.g in VScode) for display
  • I think the ideal for errors in a client/server system where either side can change without recompilation is error codes that can be linked to for documentation purposes. Internally Fantomas might represent these as a DU, but the external representation could look something very much like { message: string; code: string}?
  • No opinion here, whatever's easiest for you.
  • I'm not sure what you mean here specifically, might need more guidance
  • I'm not sure myself :D

@nojaf
Copy link
Contributor Author

nojaf commented Oct 13, 2021

Things still left to do:

  • Make sure Fantomas.Client as a manual version v0.1.0 instead of the same version as Fantomas.
  • Check the restriction on FSharp.Core, this is fixed to 5.0.2 to make it locally work but should not be there or be less strict?
  • Add a documentation section (or page) that elaborates on why we are doing this and how users should deal with this in their codebase.
  • Add documentation for the cli tool help page
  • Add Clear cache method to FantomasService API
  • Check if the ignore file will work in all scenarios? I'm not totally convinced.
  • Check if the editor config is being picked up in all scenarios. More confident here.
  • All filePath parameters should be absolute paths, there should be additional validation for that.
  • Add unit test for the FantomasDaemon

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
@nojaf nojaf marked this pull request as ready for review October 20, 2021 10:09
@nojaf nojaf requested a review from baronfel October 20, 2021 14:20
Copy link
Contributor

@baronfel baronfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks wonderful, I am especially happy to see that setting up StreamJsonRpc doesn't appear to have been incredibly hard to get going. Some of the tool-finding and resolution code makes me wonder if there's space for a community library around managing those to abstract that part away, but none of it looks wrong or bad in any way. This is a wonderful set of changes, and one I'm looking very much forward to integrating into FSAC.

<WarningsAsErrors>FS0025</WarningsAsErrors>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageIcon>fantomas_logo.png</PackageIcon>
</PropertyGroup>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you be open to supporting sourcelink? That would involve:

  • adding nuget Microsoft.SourceLink.GitHub copy_local: true to paket.dependencies and referencing it in all projects that you wanted to provide sourcelink for
  • adding <PublishRepositoryUrl>true</PublishRepositoryUrl> to those same projects
  • adding <EmbedUntrackedSources>true</EmbedUntrackedSources> to those same projects

but then it should just work. if you want to test the outputs of this you can use dotnet-validate via dotnet validate package local <path to nupkg> to make sure the sourcelink support is all correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Is this good or do I need to fix these things?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All set now after some changes/conversation in Slack

src/Fantomas.Client/FantomasToolLocator.fs Show resolved Hide resolved
Copy link
Contributor

@baronfel baronfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do this!

@nojaf nojaf merged commit db3dc67 into fsprojects:4.6 Oct 20, 2021
@nojaf nojaf deleted the ras-al-ghul branch October 20, 2021 17:33
nojaf added a commit that referenced this pull request Oct 26, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Oct 27, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 2, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 3, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 7, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 9, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 10, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 19, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 24, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Dec 4, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Dec 29, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 7, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 8, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 8, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 14, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 14, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
jindraivanek pushed a commit to jindraivanek/fantomas that referenced this pull request Mar 30, 2022
* Style guide lambda (fsprojects#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
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.

None yet

2 participants