-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
wider default fsharp_max_value_binding_width, also take width of pattern of binding into account #1936
Conversation
* Initial upgrade to FCS 40. * Fix remaining unit tests. * Remove AST workaround for Attributes. * Update for SynTyparDecls, SynPat.As and ParsedHashDirectiveArgument. * Re-enable ignored tests. * Update to FCS 40.0.1-preview.21366.4
* 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
* Update records indent from the curly brace. Fixes fsprojects#1876. * WIP anonymous records * Indent multiline record field expressions from the opening brace. * Restore correct indent after update record expression. * trigger CI
* 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
…fsprojects#1925) * Set DOTNET_CLI_UI_LANGUAGE to en-us when running dotnet tool command. * Add RepositoryUrl. * Bump Fantomas.Client version to 0.3.1
* Update FCS to 41.0.0-preview.21472.3 * If, elif, then and else keyword are present in AST. * Use arrow range from SyntaxTree instead of trivia tokens. * Processed change of FCS 40.0.1-preview.21423.4. * Support expr[idx] as index/slice syntax. * Remove ArrayOrListComputedExpr active pattern. * Apply style guide rules for SynExpr.IndexRange. * Always use LangVersionText preview. * Remove Verbose tests. * Change QuoteIdentifierIfNeeded to AddBackticksToIdentifierIfNeeded.
@nojaf This is ready for review. |
Hey Don, sorry for this but would you mind targeting the 4.6 branch for this PR? The idea is that bug fixes are made against master and revisions are published from there. |
No probs, done. Do you manually merge master --> 4.6? FWIW this is the opposite to dotnet/fsharp. There we do all feature work in master, and set up codeflows
Code flow prior to releasing 4.6:
Code flow after releasing 4.6:
The code flow is automated and creates integration PRs. I really wish github did this by default for all projects, and you could put a ".github/codeflow/config.yml" for active flows. |
Nothing is set in stone here as far as G-Research is concerned; due to coordination difficulties and the lack of time to resolve them, the things we've got formatted internally are sufficiently low-traffic that we would happily reformat them if it meant standardising on a "better" model of the world. I think this kind of line-length optimisation is probably one of the things we have the least strong opinions on. |
Thanks, yes I admit, I do this manually right now. 4.6 is the first version where we actually try and maintain two branches. Now, we have released five revisions (4.5.X) and we do see a spike in downloads on NuGet. |
MinimumVisualStudioVersion = 15.0.26124.0 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{B570C54C-2FEA-4A94-A8C5-FD4157A94DE7}" | ||
ProjectSection(SolutionItems) = preProject | ||
paket.dependencies = paket.dependencies | ||
EndProjectSection | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fantomas", "src\Fantomas\Fantomas.fsproj", "{7EA16279-A5F1-4781-A343-4375A04BCE6F}" | ||
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "Fantomas", "src\Fantomas\Fantomas.fsproj", "{7EA16279-A5F1-4781-A343-4375A04BCE6F}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean? Or did this happen automatically by VS?
@@ -4953,6 +4953,13 @@ and genMemberDefn astContext node = | |||
| None -> sprintf "abstract %s" s | |||
|> fun s -> !- s ctx | |||
|
|||
let hasGenerics = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try and avoid having a PR that does two unrelated things?
I'm ok with this change, but it seems unrelated to changing the default settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is the same fix as #1935, right?
@@ -729,7 +730,7 @@ type MyType() = | |||
|
|||
### fsharp_max_function_binding_width | |||
|
|||
Control the maximum width for which let and member function bindings should be in one line. | |||
Control the maximum width for which function and member bindings should be in one line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Member bindings will look at two settings currently.
Example.
Closing in favour of #1947. Thanks again Don. |
Adjusts the default
fsharp_max_value_binding_width
up to 80, see #1933I adjusted things computation to take into account the width of the pattern of the let (
pattern = expr
), see comment below and adjustment to docs. This feels right to me.@nojaf It feels right to make this change
@Smaug123 Could you find what G-Research default setting is? May make sense to simply go to that?