Remove always-on language feature flag: RelaxWhitespace2 - #20320
Merged
Conversation
Contributor
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
T-Gro
enabled auto-merge (squash)
August 24, 2026 13:44
abonie
approved these changes
Aug 24, 2026
This was referenced Aug 24, 2026
nojaf
added a commit
to fsprojects/fantomas
that referenced
this pull request
Aug 27, 2026
…e2', commit 4507f94a47b615329ba5ebd6afab5846ae3d898e This also takes in 'Extension members solve SRTP constraints (continuation)', commit 7727673ea13f0e09aa46abf6093da050cd16bc3a (dotnet/fsharp#19602), which changed the name of a `SynComponentInfo` from a `LongIdent` to a `SynType option` so that extension members can be declared on tuple types: type (int * int) with member this.Sum = fst this + snd this type struct (int * int) with member this.Sum = fst this + snd this `TypeNameNode.Identifier` is now a `Type` rather than an `IdentListNode`, built through `mkType`, so an ordinary name becomes `Type.LongIdent` and the tuple forms become `Type.Paren(Type.Tuple ...)` and `Type.StructTuple`. The printer uses `genType` for it, so the tuple prints as written and no layout decision was added. A nested module keeps an `IdentListNode` for its name, through `mkModuleName`, since a module name can only be an identifier. The parser only leaves the name out while recovering from a parse error, which never reaches the transformation, so that case is an invariant violation. The RelaxWhitespace2 commit (dotnet/fsharp#20320) only removes a dead feature flag from LexFilter and needed no change.
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.
Fixes #20160
RelaxWhitespace2has been on for every accepted--langversionsince F# 6.0, so its flag could never be turned off. Removed the dead feature and collapsed the lexer's guarded branches to their enabled behaviour.--disableLanguageFeature:RelaxWhitespace2is no longer a recognised feature name.Part of #20139.