chore: Bump the all-nuget group with 6 updates - #4976
Open
dependabot[bot] wants to merge 1 commit into
Open
dependabot[bot] wants to merge 1 commit into
dependabot[bot] wants to merge 1 commit into
Conversation
Bumps fantomas from 7.0.6 to 8.0.0 Bumps fsharp-analyzers from 0.38.0 to 0.39.2 Bumps FSharp.Analyzers.SDK from 0.38.0 to 0.39.2 Bumps G-Research.FSharp.Analyzers from 0.24.0 to 0.25.0 Bumps Ionide.Analyzers from 0.18.0 to 0.19.0 Bumps Microsoft.NET.Test.Sdk from 18.9.0 to 18.10.1 --- updated-dependencies: - dependency-name: fantomas dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: all-nuget - dependency-name: fsharp-analyzers dependency-version: 0.39.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-nuget - dependency-name: FSharp.Analyzers.SDK dependency-version: 0.39.2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-nuget - dependency-name: G-Research.FSharp.Analyzers dependency-version: 0.25.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-nuget - dependency-name: Ionide.Analyzers dependency-version: 0.19.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-nuget - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.10.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-nuget - dependency-name: Microsoft.NET.Test.Sdk dependency-version: 18.10.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: all-nuget ... Signed-off-by: dependabot[bot] <support@github.com>
Contributor
Python Type Checking Results (Pyright)
Excluded files with errors (4 files)These files have known type errors and are excluded from CI. Remove from
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated fantomas from 7.0.6 to 8.0.0.
Release notes
Sourced from fantomas's releases.
8.0.0
8.0.0 Satanized - 15/09/2026
Changed
Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0
8.0.0-beta-003
8.0.0-beta-003
Changed
editorconfigto0.18.0,Serilogto4.4.0,Spectre.Consoleto0.57.2andSystem.IO.Abstractionsto22.2.0. Only one of these is visible in what Fantomas does:editorconfig0.18.0scopes its cache of the.editorconfigfiles it has read to the parser that reads them, where it used to share one statically. Fantomas keeps a single parser for the process, so a file is still read once and no more.Fantomas.Coreasks for the sameFSharp.Coreit always did, so nothing referencing it has to move. #3468Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-beta-003
8.0.0-beta-002
8.0.0-beta-002
Fixed
=,>,<,%or%%spans several lines, the operator takes a line of its own one level in, as8.0.0-beta-001introduced. That level was measured from the enclosing indent rather than from the column the left-hand side starts at. The two are the same at the start of a binding, and differ after something like&& (, where the operator then landed on the column of the left-hand side and was offside: the parser read<as the start of a type application and rejected the output. The layout now asks where its fresh line would land and adds whole indent levels until that clears the left-hand side, the way a chain's dots have cleared its head since8.0.0-alpha-024, so the operator and the right-hand side sit one level to the right of it and every column stays a multiple of the indent size. That shared step isindentPastinContext.fs, the helper #3446 asked for once a second caller turned up. #3463Special thanks to @nojaf and @shayanhabibi!
https://www.nuget.org/packages/fantomas/8.0.0-beta-002
8.0.0-beta-001
8.0.0-beta-001
Changed
=,>,<,%and%%cannot start a line at the column of their left-hand side: there the parser reads=,>and<as the=of a binding, and reads%and%%inside a quotation as a splice. Fantomas already kept them off that column, but did so with the layout that keeps the right-hand side beside the operator whenever it is short enough to fit, which needs the page width and a column count to predict and moves a0around when an unrelated part of the line changes length. It now follows the rule proposed in fsharp/fslang-design#836: the expression fits on one line, or it does not and the operator stays with the left-hand side while the right-hand side moves one level in, or the left-hand side itself spans several lines, in which case the operator and the right-hand side each take a line of their own.fsharp_multiline_bracket_style = stroustrupstill overrides this for a right-hand side that opens a bracket, which keeps hugging the operator. This is the first beta of8.0.0: the style guide for this is not settled yet, so give it a try and report back on the design issue if something reads worse than what it replaces. #3434Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-beta-001
8.0.0-alpha-026
8.0.0-alpha-026
Changed
fsharp_multiline_bracket_style = stroustrupnow applies to object expressions, so{stays on the line that opens the binding andnew T withmoves below it. Up to now object expressions were printed by thealignedbranch whatever the setting said, which left{ new T withon one line and made stroustrup the only bracket style that did not reach every bracket it names. The Microsoft style guide writes the form out under "Formatting object expressions" and Fantomas now produces it character for character. This was left alone in the belief that the layout was an offside error waiting to happen; it is not, and the compiler accepts it in a binding, a list item, a function argument, a lambda body, a match clause and a nestedletalike. An object expression under stroustrup now lands where a record already landed in each of those positions.aligned, which is the default since8.0.0-alpha-002, andcrampedare untouched. #2990fsharp_multiline_bracket_style = stroustrupnow survives a binding whose signature broke across lines, and a match clause underfsharp_experimental_keep_indent_in_branch. Both were printed by branches written before stroustrup existed and never given a stroustrup-aware counterpart, so the setting was quietly overruled in each: aletwhose parameters wrapped left its=alone on a line and indented the bracket below it, and a match clause under keep-indent did the same below the arrow. They now read= {and| _ -> {, with the items one level in and the closing bracket back at the column the binding or the clause started from, which is what the same code already produced when the signature fitted on one line or the setting was off. This reaches every bracket the setting names, so records, update records, anonymous records, anonymous structs, lists and arrays move with the object expressions of the entry above rather than behind them. The closing bracket of a match clause stays two columns right of the bar, because on the bar's own column the|of the next clause no longer parses. #3450Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-026
8.0.0-alpha-025
8.0.0-alpha-025
Fixed
!line of a.fantomasignoretakes a path back out again even when a line above it matched the folder holding that path, sosub/*followed by!sub/keepformats and checks the files undersub/keep. Since8.0.0-alpha-016a folder an ignore file names is never opened, which is what a folder pattern should mean and is not what it can mean here: closingsubdecides thatsub/keepis not there, and the line that would have taken it back out is never reached. The files were not reported as ignored, they were never found, so--checkpassed over a scope smaller than the ignore file describes anddoctor, which asks about one file and answers correctly, disagreed with the run about that same file. An ignore file that negates anything now leaves every folder open and asks about the files inside one at a time, which is what every version up to8.0.0-alpha-015did. An ignore file with no!line in it still closes the folders it names. #3447Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-025
8.0.0-alpha-024
8.0.0-alpha-024
Fixed
let v = ((someObject.First(a).Second(b).Third(c)))at two-space indentation produced code Fantomas would not accept from itself, so the file was left unformatted with a bug report on the console. The dots now step one indent level at a time until they clear the head, which keeps every column a multiple of the indent size; a chain whose dots already cleared its head is untouched. This replaces a branch that anchored a parenthesised chain on its opening parenthesis, written when only a real dot chain reached it. Since8.0.0-alpha-014a dotted long identifier is a chain too, so it also fired for the likes ofSeq.map, which never breaks, and moved a lambda written behind such a call three columns for no reason. #3445Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-024
8.0.0-alpha-023
8.0.0-alpha-023
Fixed
val inline ( *. ): ...andabstract member ( *. ): ...survive formatting. Onlylet ( *. ) a b = ...was spaced before; avalin a signature file and an abstract member in either kind of file came out as(*.), which opens a block comment and swallows the rest of the file. Multiplication is unaffected, because(*)is a token the lexer knows. #3443Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-023
8.0.0-alpha-022
8.0.0-alpha-022
Added
type (int * int) with ...andtype struct (int * int) with ..., format instead of failing. The parser accepts them since dotnet/fsharp#19602, and a type definition's name is now any type in the Oak tree rather than only an identifier. The tuple prints as written; no layout decision was added for it. #3436Changed
Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-022
8.0.0-alpha-021
8.0.0-alpha-021
Fixed
(and all, which is what the last call of a chain does, but for an earlier one it changes what the code means:a.Foo (x).Bar()passes(x).Bar()toFoorather than callingBaron the result. With a call behind it the compiler rejected the result with "This argument expression needs parentheses"; with a plain member behind it, such as.Value, nothing warned at all and the member quietly became part of the argument. Hanging the parameters under(funwould keep the parenthesis in place too, and the F# style guide rules that out, because the column they hang from is the length of the member name. The closing)answers tofsharp_multi_line_lambda_closing_newlineas it did before, and the last call of a chain is untouched, since nothing follows it to be swallowed. #3432Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-021
8.0.0-alpha-020
8.0.0-alpha-020
Fixed
=,>,<,%or%%is indented from the binding again, solet a = b = [ ... ]breaks tob = [with its items one level in and the]back at the column ofb. Since8.0.0-alpha-003both the items and the closing bracket sat a further level to the right. The right-hand side of these operators is indented so that a comment between the operator and that side lands below the operator, which is what #2944 asked for, and so that the lines under a chain or an application are not read as a continuation of the left-hand side. A list or an array needs neither: its bracket says where the right-hand side begins and indents its items from the left-hand side by itself, so indenting it again pushed the items and the closing bracket a level too far. This concernsaligned, which is the default, andstroustrup.crampedlines the items up under the opening bracket, so the indent never reached them and nothing changes there. Right-hand sides that open a bracket in some other way, such asseq { },<@ @>,begin ... endandnew T(...), still carry the extra level; where a no-break operator should put what follows it is a wider question than this fix. #3428Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-020
8.0.0-alpha-019
8.0.0-alpha-019
Fixed
"yow".Substring (0, 3)and3L.ToString ()come out as"yow".Substring(0, 3)and3L.ToString().8.0.0-alpha-018gave a constant receiver a space it was never meant to have. The rule there says a call keeps the space only when the whole thing being called is a plain dotted name, and the comment agreed at fslang-design#648 lists"yow".Substring(0, 3)under "a receiver that is not a name", beside(f x)and[ 1; 2 ]. The alpha carved constants back out on the reasoning that a constant is atomic rather than bracketed, which went past what was agreed and was not deliberate. A constant is a value, the rule asks for a name, so it goes tight. A type parameter really is a name, so'T.set_StaticProperty (3)is unaffected. #3426Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-019
8.0.0-alpha-018
8.0.0-alpha-018
Added
doctornames the.fantomasignoreabove the one that governs a file, when a pattern in it would have skipped that file. Fantomas reads the nearest ignore file at or above a file and no other, so a pattern written at the root of a repository has no effect on a folder that has an ignore file of its own beside it. Up to now the report named the ignore file that did decide and said nothing about the one that did not, which answers "which file" and leaves "then why did mine not" for the reader to work out. It quotes the pattern that would have matched, with its line number, the way it already quotes the line that decided.--jsoncarries every ignore file above the governing one undershadowed, each withwouldIgnoreand the lines of it that match, whether or not it would have decided anything. #3423Changed
fsharp_space_before_uppercase_invocationandfsharp_space_before_lowercase_invocation, now get a say only when the whole thing being called is a plain dotted name. Put a call, an index, a bracketed receiver, or a type application anywhere in it, and the parenthesis stays tight whatever the settings ask for. On default settingsxs.map(fun a -> a + 1).filter (fun a -> a > 1)becomesxs.map(fun a -> a + 1).filter(fun a -> a > 1), which is the report this started from, andFoo().bar ()andmyList.[7].someFunction (arg)lose their space for the same reason. A plain dotted name is untouched however long it gets, soList.map (f)andFantomas.FCS.Text.Range.unionRanges (r1, r2)keep the space they had, and so is a literal or type parameter receiver, since"yow".Substring (0, 3)and'T.set_StaticProperty (3)are atomic rather than bracketed. Agreed at fslang-design#648 and written up under Formatting chain expressions. #3425unbox<bool> (value),f<int> (x),List.map<int> (f)andjsOptions<Vis.Options> (fun o -> ...)all lose their space, sincefsharp_space_before_lowercase_invocationistrueand each of those is a lower-case name carrying type arguments. An upper-case generic call such asDictionary<string, int>(x)was already tight by default and only moves iffsharp_space_before_uppercase_invocationis on. Fantomas does not add parentheses, so the far more common form without them,unbox<int> obj, is left exactly as written and never comes into it. #3425Fixed
fun,if,matchandtry, and left the forms that wrap one of those or end in one:lazy,yield,return,do,assertandfixed, an assignment such asx.P <- fun y -> y, andlet x = 1 in body.{ A = 1; B = lazy fun x -> x; C = 3 }reads back as a lambda that swallowedC = 3. A wrapper around something that closes on its own,lazy aorx.P <- 1, collapses as it always did. When this happens, why, and how to get the single line back is written up under Open-ended expressions. #3424Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-018
8.0.0-alpha-017
8.0.0-alpha-017
Added
fantomas doctor <file>walks one file through everything Fantomas does to it and reports what happened at each step: whether the path is a file Fantomas formats, which.fantomasignoregoverns it and which line of that file decided, which settings apply and which.editorconfigset each one, what formatting produced and where the result first parts from the file, whether Fantomas accepts its own output, and whether formatting that output again leaves it alone. It writes nothing, so it is safe against a working tree you have not committed. Every question it answers was answerable before only by reading two configuration formats by hand and knowing the order Fantomas resolves them in. It takes one file rather than a folder, because the answers differ per file, and it exits 0 for a file it could diagnose whatever it found, 1 for a path it cannot look at or a step that failed.--jsonwrites the same walk as one document with a key per step. #3421.fantomasignoreline that matched a path is now knowable rather than only the yes or no.doctorquotes it with its line number, the waygit check-ignore -vdoes, and names every line that matches when more than one does, since a!pattern further down is exactly the case nobody spots by eye. #3421doctordecides whether a file would be rewritten the way a format run decides it, by comparing the text as it is. A file whose line endings are the only thing out of step is therefore reported as needing formatting, wherefantomas checkdeliberately overlooks that difference and calls the same file already formatted. What it reports is where the file and the result first part, rather than a count of the lines that differ by position: that is not a count of edits, because splitting one long line into five moves every line below it. #3421obj, is named as such bydoctor. A run over the tree above it never opens that folder, whatever the ignore file says, and sending its owner to read their.fantomasignoresends them to read the wrong file. #3421Changed
Fantomas produced code that is not valid F#.read as though the file were at fault, and reaching it always means the opposite: the input parsed, or a parse failure would have been reported instead. The report now says that nothing was written and the file is untouched, that this is a bug in Fantomas rather than a problem with the code, and where to report it, in the shape a parse failure and an unmodellable construct already print. #3419--forceand reading the result. The diagnostics carry no line and column of their own: the output they would count into is written nowhere, so a position in it is a coordinate you cannot follow, and a path an editor could open would take you to the wrong line of the right file. The carets say where, and the report says out loud that the lines below it are the output rather than your file.--jsoncarries the same diagnostics in thediagnosticsarray a parse failure already uses.fantomas checkreports all of it the same way, where it used to run the whole explanation on aftercould not be checked:. #3419Fantomas.Core.CodeFormatter.IsValidFSharpCodeAsyncbecameValidateFSharpCodeAsyncand answers with aValidationResultrather than abool. Read.IsValidoff it where the verdict was all you wanted;.Diagnosticsis what Fantomas refused, positioned, and is empty exactly when the source is valid. The boolean discarded it, so anything that had to say why had to parse the source a second time to find out, which is why the tool could not show you its own bad output. A warning Fantomas tolerates, such as #3396 on IWSAM types, is not among them. #3419Fixed
[<return: ...>]attribute written in front of anexterndeclaration was dropped from the output. The parser moves such an attribute out of the binding's attribute list and into its arity information, and theexternpath never looked there, so the line was silently deleted. Bindings already put those attributes back;externnow does the same. An attribute written on the return type itself,extern [<MarshalAs(UnmanagedType.I1)>] bool f(int options), is reported in both places and stays where it was written. #3420Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-017
8.0.0-alpha-016
8.0.0-alpha-016
Added
fantomas check <paths>andfantomas daemon, beside the--checkand--daemonflags that named them. Both flags keep working and are not deprecated, so no pipeline and no editor integration has anything to change; each means exactly what its command means. The commands exist because a command can have a--helppage of its own and a flag cannot:fantomas check --helplists the flags checking has any use for and leaves out the ones it would refuse. When standard error is a terminal, the older spelling prints a one line note saying how it is spelled now; a redirected stream never sees it, so it stays out of build logs and out of the daemon an editor starts. #3416fantomas profile <paths>, replacing the--profileflag. It formats one file at a time so the timings can be compared, writes nothing, reports every file slowest first with its line count and the number of define combinations it had to format, and ends with a total.--profilemeasured files formatted in parallel, so each stopwatch recorded wall clock under contention: a six line signature file and a file of several thousand lines came back with the same figure. #3416--helppage for each command.fantomas --helpis the overview, with the commands, the flags, worked examples and links;fantomas check --help,fantomas profile --helpandfantomas daemon --helpare about one command each. Which flags a command's page lists is asked of the same rule that refuses them at run time, so the page cannot come to disagree with the tool. Every page names the tool the way this run was started, so a local tool install is showndotnet fantomasrather than a command it does not have. #3416--flag=valuealongside--flag value, so--out=buildand--verbosity=dwork. Only the space separated form was accepted before, and--out=buildwas read as an input path that does not exist. #3416--ends the flags, so a path beginning with a dash can be named after it. It used to be read as an input path itself, which meant no such path could be given at all. #3416--jsonforfantomas profile, carrying the same files as the text report with each file's line count, define combinations and milliseconds, and the run's own total aselapsedMilliseconds. Ordered by path rather than slowest first, since a reader that wants them by time can sort them. #3416fantomasisfantomas ., andcheckandprofileread a bare invocation the same way. Formatting and checking used to refuse withNo input path provided.This is whatruff formatanddotnet formatdo. Note that it walks every F# file below the working directory, and that a.fantomasignorein a repository below it governs only that repository's files. #3416Changed
Fantomas.Core.ParseExceptionnow derives fromFormatException, as the other exceptions the library raises already did, so:? FormatExceptioncatches every way formatting can fail. It could not before: it was declared with F#'sexceptionkeyword, which cannot name a base class. ItsMessagenames the first error by position instead of dumping every diagnostic record through%A, and the records are reachable as.Diagnosticsrather than only by matching the exception pattern. Code matching| ParseException diagnostics ->becomes| :? ParseException as e -> e.Diagnostics; raising and constructing it are unchanged. #3415%Adump of a syntax tree node in the middle of the message. The report says in words what could not be modelled, names the union case responsible, positions it in the file being formatted rather than in thetmp.fsxthe parser was handed, and draws a snippet of the source with a caret under the construct, so the enclosing declaration is visible without having to bisect the file by hand. The syntax tree node is still reported, at--verbosity d, where it serves whoever triages the issue rather than whoever files it. This covers every such report, from a type the transformer has no Oak node for to the chain and leading-keyword invariants behind it.--checkand the daemon position them the same way, so an editor shows its user the snippet rather than a bare line and column. #3415+ src/A.fs was formatted., and the run ends with a line of counts,2 files formatted, 30 unchanged.This replaces the bordered table of headings that a folder run printed, which bypassed the logger and so carried no timestamp at--verbosity dwhile everything around it did. A run over a single named file is answered on its own terms and has no summary added to it. Any script reading this output needs updating;--jsonexists for a caller that has to act on the result rather than read it. #3416.fantomasignoreis resolved per file, the nearest one at or above it, which is what the daemon has always done. The command line used to resolve one file for the whole run from the directory it started in, so an ignore file in a subfolder was honoured by an editor and invisible to a pipeline: the same file was skipped in one and formatted in the other. A nested ignore file that used to have no effect on a command line run now has one. #3416.fantomasignorenames is no longer opened. Up to now every file inside it was found and then rejected one at a time; the folder is now passed over, so nothing inside it is read, counted or reported. A folder pattern spelled with a trailing separator,vendor/, closes the folder asvendoralways did. Nothing is formatted that was not formatted before. #3416--verbosity d. #3416--jsonno longer names a file that.fantomasignorematched, andignoredis no longer a status a file can carry. Nothing counts them in its place, for the reason above:filesis what the run looked at. #3416fantomas --chek srcsaidInput path '--chek' not found.and now says'--chek' is not a Fantomas flag. Did you mean '--check'?Every unrecognised token used to be taken for an input path, so a misspelled flag was reported as a file that is not there. #3416argument '--check' has been specified more than once. This is the Unix norm and stops a script that builds its arguments up from failing on a duplicate.--outis the exception and is still refused, because it decides where files are written and choosing between two of them quietly is choosing where the work lands. #3416src/A.fs could not be parsed by Fantomas:rather thanFantomas could not parse src/A.fs:, and a construct that could not be modelled assrc/A.fs could not be formatted by Fantomas:. Every line of a report now begins with the path it is about, so the column can be read down. A script matching on the old text needs updating. #3416--checkno longer reports a file that will not parse twice, once as an error and once as needing formatting. It is an error and nothing else, which is also what its exit code has always said. #3416--forceannounces invalid output as a warning on standard error rather than on standard out, and says what happened:src/A.fs was formatted, but the result is not valid F# code. It was written because --force was given.It says Fantomas wrote F# it believes is not valid, which is the opposite of the ordinary run of things standard out carries. #3416--versionprints the commit hash trimmed to the short form the--helppage has always shown, and the whole of it at--verbosity d.Fantomas.Clientis unaffected: it cuts the version at+and drops the build metadata whatever it holds. #3416--verbosity dand nothing printed in its place at normal, so an unreadable file reported onlyA.fs could not be formatted.and leftAccess to the path is deniedbehind a flag nobody knew to pass. Detailed verbosity now adds the type and the stack trace below that line rather than instead of it. #3416+,=,-,!andxwhere the output is redirected or the console is not UTF-8, and✔,=,○,!and✘where it is; both carry the same five states, and the words beside them say the same thing either way.NO_COLORis honoured. #3416--outreports what was written rather than what changed,32 files written to build, 2 reformatted., since under--outevery input produces an output file whether or not its content changed. A single file named on the command line says where it went,src/A.fs was formatted and written to build/A.fs., where it used to say only that it was formatted or unchanged and leave the destination unmentioned. #3416fantomas checkon an empty folder, or on one an ignore file emptied, printed nothing and read as a green build. Formatting and checking now report this the same way, as they do everything else they both have to say. #3416Fixed
externdeclaration returning an array, such asextern byte[] f(int options), lost the element type of the array and was written asextern `[]` f(int options). #3415Failed to format file: A.fs : Formatting A.fs leads to invalid F# code, with a spaced colon in the middle. #3416--verbosity d, a single unchanged file was reported twice in two different spellings, once as'A.fs' was unchangedand once asA.fs was unchanged.#3416Removed
--profileflag.fantomas profile <paths>replaces it, and a run that names the flag is refused with'--profile' is not a Fantomas flag. 'profile' is a command: try 'fantomas profile <paths>'.and exits 1. It was not kept working as an alias, alone among the flags that became commands: the flag wrote formatted files to disk as a side effect of measuring them and the command deliberately writes nothing, so an alias would have gone on being accepted and silently stopped writing, which is worse than a run that stops and says what to type.--profile --check, which was accepted and did nothing at all, no longer has anything to combine. #3416Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-016
8.0.0-alpha-015
8.0.0-alpha-015
Added
{ ...source; Field = value }, in an anonymous record expression,{| ...source; Field = value |}, and in the record representation of a type definition,type Target = { ...Source; Field: int }, in both implementation and signature files. #3400$"{value,-10}", now format instead of failing with a parse error. Alignment and format specifiers keep their existing layout, so$"{value,10:N2}"is unaffected. #3400--jsonwrites one JSON document to standard out describing what the run did, instead of the usual messages, for a script or an agent that has to act on the result rather than read it. Every file the run looked at is named with a status offormatted,unchanged,ignored,needs-formattingorerror, and a file that failed to parse carries the severity, code, message and one based position of every diagnostic. Paths are reported as they were given, relative to theworkingDirectorythe document carries once. Standard out carries the document and nothing else, so it can be piped straight into a parser, while warnings still go to standard error. Exit codes are unchanged and the document repeats the one the process ends with. Works with--check, and is refused alongside--daemon, where standard out already carries the JSON-RPC protocol. #3412Changed
--versionand the files--checkreports as needing formatting, so a caller can tell the tool's output apart from its diagnostics by stream. Scripts that capture standard out to detect failures need to capture standard error as well. #3399--helppage is written by Fantomas instead of by Argu. It carries the version, worked examples, what an input path may be, and links to the documentation, the F# Discord and thellms.txtfiles an LLM can read. Colours are used when the terminal supports them and dropped when standard out is redirected.-his now accepted alongside--help. An argument error reports the complaint on standard error followed by a pointer to--help, where it used to print Argu's usage block. #3402fantomas src/A.fsprintssrc/A.fs was formatted.where it printedA.fs was formatted.. The same applies to the unchanged, ignored and failure messages. A run over several files already reported the path, so the two now agree. #3404Could not parse the file.for a format run, the%Arecord dump and stack trace for a--checkrun, and the same%Adump the daemon used to hand editors. Diagnostics are ordered by position and columns are one based, matching what the F# compiler prints for the same file. #3405--checkused to reportInput path 'x' is unsupported file typeandInput path 'x' not foundwithout a full stop where a format run ended both with one, and a run with no input path at all saidNo input path provided.when checking andInput path is missing.when formatting. Both now reportInput path 'x' is an unsupported file type.,Input path 'x' not found.andNo input path provided. Call with --help for usage information.#3406.fantomasignorematches is reported the same way as an ignored file found while walking a folder.fantomas A.fson an ignored file printed nothing unless--verbosity dwas given, wherefantomas ./foldercontaining only that file printedA.fs was ignored.Both now print it. A--checkrun reports the files it ignored at detailed verbosity whether they were named directly or found in a folder, where before only a directly named file was reported. #3406--outnow notes a file it found already formatted, as a run formatting in place always did. Both paths decide what formatting came to in the same place, so they say the same things about it. #3406--daemonno longer accepts the arguments that mean nothing to a daemon.--check,--out,--force,--profile,--jsonand input paths were all accepted and then silently ignored, sofantomas --daemon ./srclooked like it would format a folder and did not. Any of them now reports which ones were refused and exits 1 without starting.--verbosityis still accepted, since it sets the level the daemon logs at, and--versionwins outright.Fantomas.Clientlaunches the daemon with no other arguments, so no editor integration is affected. #3412--versionnow answers whatever else is on the command line, and before any of it is validated, so it can always be used to find out what you are running. It used to be refused alongside--daemon, andfantomas --version -v bogusexited 1 without printing a version. It is also written straight to standard out instead of through the logger, so it no longer picks up the timestamp and level prefix that--verbosity dadds, and reads the same at any verbosity. #3412Fantomas.Coreis no longer binary compatible withv7. Several discriminated unions are structs now, which changes nothing about how they are written or matched, but an assembly compiled againstv7has to be rebuilt. #3407.editorconfigthat carries thefsharp_prefix but is not a Fantomas setting now warns instead of being silently ignored, and where the intent is obvious the warning names the spelling that works. This catches a misspelling such asfsharp_multiline_brackets_style, and catches prefixing one of the four settings editorconfig itself defines, wherefsharp_max_line_lengthnever applied andmax_line_lengthis the one that does. Settings without thefsharp_prefix belong to other tools and are left alone. Every problem in one.editorconfigis reported together and only once per run, rather than once per formatted file, and--verbosity dwrites out every setting the running version supports. #3401.editorconfigkeys and values are both matched without regard to case, as the editorconfig specification defines them.FSHARP_MAX_RECORD_WIDTHandfsharp_experimental_elmish = Trueused to be ignored. #3401fantomas/configurationWarningnotification for every format request, naming the settings in the resolved configuration it could not act on, and sending an empty list when there are none so an editor can clear what it showed earlier. Additive to the JSON-RPC contract: a client that does not handle the method ignores it and keeps working. See the Fantomas.Client changelog for the client-side API. #3401Fixed
--verbositywith an unrecognised value exited with code 1 and printed nothing, because the message was logged before the logger was configured. It now reportsInvalid verbosity levelon standard error. #3399--out <folder>flattened the input tree: every file landed directly in the output folder, so two files with the same name in different subfolders silently overwrote each other. The output folder now mirrors the structure of the input folder, as the documentation already promised. #3403--out <file>failed withFailed to format fileand exit code 1 when the folder of the given path did not exist. Fantomas now creates it, along with the subfolders that mirroring an input folder needs. #3403--outnaming the input folder under a different spelling, such asfantomas src --out ./src, emptied every file it was given. The output file was opened, and therefore truncated, before the input was read. Nothing is written now until formatting has produced the text to write, which also leaves the previous output in place when formatting fails. #3403--outpointing inside the input folder, such asfantomas src --out src/formatted, formatted the previous run's output again and nested it one folder deeper on every run. The output folder is left out of the input scan. #3403fantomas src/ --out srcformatted nothing and reported an empty table, wherefantomas src --out srcformatted the folder in place. A trailing separator made the two paths compare as different places, so every file below the input folder was taken for a previous run's output and skipped. The same applied tofantomas src --out src/. #3406A.FS, was refused as an unsupported file type, and one found while walking a folder was skipped. The extension is now compared without case, which is what a volume that ignores case, as macOS and Windows usually do, means by the same file. #3406fantomas my.stuff src, was taken for a file and reported asFailed to format file. A file with no extension was taken for a folder. Which one a path is, is now asked of the file system rather than guessed from the name. A single input path was already classified this way. #3406.fantomasignorepattern that cannot be matched against a path reported the raw exception, with its stack trace, through%A. It now names the file and the ignore file that could not be told apart, and keeps the exception for detailed verbosity. #3406--profilereportedLine count: 0for a file whose line endings are not the ones the platform uses, because it counted occurrences of the platform's newline rather than line breaks. A file saved with line feeds counted nothing on Windows, and one saved with carriage returns counted nothing elsewhere. #3406.editorconfig, so a request that arrived during it was not read until that finished. It hands the loop back first now, and serves one request at a time per file so that the configuration warnings for a file still arrive in the order the requests did. #3401fsharp_max_record_width = crfailed the whole run withCarriage returns are not valid for F# code; it is now reported as a value that setting does not accept. A value is only read as the type its own setting has. #3401fsharp_setting was reported.max_line_lenght = 100now says so. Only names within two edits of a setting Fantomas has are read this way, so settings belonging to other tools,indent_styleamong them, stay silent. #3401fsharp_max_record_width = -5formatted to nonsense widths without saying anything. It is now reported like any other value the setting does not accept. #3401Special thanks to @claude and @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-015
8.0.0-alpha-014
8.0.0-alpha-014
Changed
StreamJsonRpcto2.25.29. This clears the NuGet vulnerability warnings coming from the transitiveMessagePackandNerdbank.MessagePackdependencies. #3393Expr.Chainis redesigned around a head, a list ofChainSegmentand aChainTerminal.Expr.DotLambda,Expr.DotIndexedGet,Expr.AppLongIdentAndSingleParenArgandExpr.NestedIndexWithoutDotare removed, and a dotted long identifier now yieldsExpr.Chaininstead ofExpr.OptVarin expression position. See the upgrade guide for how to migrate. #3385fsharp_multi_line_lambda_closing_newline = false(the default), a match lambda argument keepsfunctionbeside the(when the call is reached through a dot, matching what a call without a receiver already did. #3385fsharp_multi_line_lambda_closing_newline = true, a lambda argument whose opening line does not fit moves onto its own line instead of hanging its parameters under the opening parenthesis. This applies to calls with and without a receiver. #3385InvariantViolationException, raised when Fantomas reaches a state its own model says is impossible. It derives fromFormatException, carries the source range of the construct involved, and points at the issue tracker. #3385Fixed
_.shorthand lambda whenfsharp_space_before_uppercase_invocationwas enabled, producing code that does not compile. #3364Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-014
8.0.0-alpha-013
8.0.0-alpha-013
Changed
Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-013
8.0.0-alpha-012
8.0.0-alpha-012
Changed
FSharp.Coreto10.0.100. #3353Fixed
?operator accesses (e.g.x?a("")?b(t)) no longer add a space before parenthesised arguments, which previously changed how the next?memberwas parsed. Detected during AST→Oak transformation and represented as a newExpr.DynamicChainnode so the printer can keep the chain tight; lone?calls still respectSpaceBefore(Upper|Lower)caseInvocation. #3159Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-012
8.0.0-alpha-011
8.0.0-alpha-011
Fixed
Special thanks to @Copilot and @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-011
8.0.0-alpha-010
8.0.0-alpha-010
Fixed
Special thanks to @Copilot and @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-010
8.0.0-alpha-009
8.0.0-alpha-009
Fixed
Special thanks to @Copilot and @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-009
8.0.0-alpha-008
8.0.0-alpha-008
Added
#elifpreprocessor directive. #3268Fixed
valbody in signature files was not indented correctly. #3269///doc comment without associated declaration (e.g. at end of file) was duplicated when formatting. #2499%%(double-percent) infix operator moved to new line, producing invalid F#. #2107matchwith long anonymous record discriminant. #1903dict[key] () ()becamedict [ key ] () (). #2519Special thanks to @Copilot and @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-008
8.0.0-alpha-007
8.0.0-alpha-007
Changed
Fixed
#nowarnin arbitrary places produces a parsing failure. #3263Special thanks to @Copilot and @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-007
8.0.0-alpha-006
8.0.0-alpha-006
Fixed
Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-006
8.0.0-alpha-005
8.0.0-alpha-005
Fixed
>in nested multiline generic type applications violates offside rule. #3243Special thanks to @Copilot and @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-005
8.0.0-alpha-004
8.0.0-alpha-004
Changed
Fixed
Special thanks to @Copilot, @claude, @nojaf and @randrag!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-004
8.0.0-alpha-003
8.0.0-alpha-003
Fixed
MultiLineLambdaClosingNewlineis enabled. #2553&(AND) patterns now break across multiple lines to respect max line length. #1780Special thanks to @, @Copilot, @dsyme and @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-003
8.0.0-alpha-002
8.0.0-alpha-002
Changed
Special thanks to @nojaf!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-002
8.0.0-alpha-001
8.0.0-alpha-001
Changed
Special thanks to @Martin521, @Numpsy, @Thorium, @dawedawe, @karanveersp, @mattgallagher92, @nojaf and @tboby!
https://www.nuget.org/packages/fantomas/8.0.0-alpha-001
Commits viewable in compare view.
Updated fsharp-analyzers from 0.38.0 to 0.39.2.
Release notes
Sourced from fsharp-analyzers's releases.
0.39.2
0.39.2
Fixed
--scriptflag no longer silently drops all but the last occurrence. Every list-valued flag now accumulates the way--projectand--analyzers-pathalready did, so--script a.fsx --script b.fsxmeans the same a...Description has been truncated