dotnet / dotnet/fsharp

Remove always-on language feature flag: AttributesToRightOfModuleKeyword

Offen
#20,155 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @T-Gro Auf GitHub ansehen
Vorherrschende Sprache
F#
Sterne
4.3k
Forks
876
Ø Merge
5 T. 9 Std.
Gemergte PRs (30 T.)
153

Beschreibung

`LanguageFeature.AttributesToRightOfModuleKeyword` has shipped since **F# 6.0** and is enabled for every selectable language version (the minimum accepted `--langversion` is **8.0**). Its feature flag can therefore never be turned off, so it is dead configuration. This issue removes the flag and collapses the guarded code to its enabled behaviour.

**What to remove**
- The `AttributesToRightOfModuleKeyword` case in [`LanguageFeatures.fs`](https://github.com/dotnet/fsharp/blob/ea778bb414648883fca4219bf7a69286bf82dd6b/src/Compiler/Facilities/LanguageFeatures.fs) and [`LanguageFeatures.fsi`](https://github.com/dotnet/fsharp/blob/ea778bb414648883fca4219bf7a69286bf82dd6b/src/Compiler/Facilities/LanguageFeatures.fsi)
- Its entry in the `features` map and its `GetFeatureString` arm
- The `featureAttributesToRightOfModuleKeyword` string in [`FSComp.txt`](https://github.com/dotnet/fsharp/blob/ea778bb414648883fca4219bf7a69286bf82dd6b/src/Compiler/FSComp.txt)
- Every `SupportsFeature LanguageFeature.AttributesToRightOfModuleKeyword` / `checkLanguageFeatureAndRecover … AttributesToRightOfModuleKeyword` guard — keep only the enabled path and delete the legacy branch
- Adjust affected tests and baselines accordingly

Consequence: `--disableLanguageFeature:AttributesToRightOfModuleKeyword` is no longer a recognised feature name.

**Version mapping**
https://github.com/dotnet/fsharp/blob/ea778bb414648883fca4219bf7a69286bf82dd6b/src/Compiler/Facilities/LanguageFeatures.fs#L185

**Feature string**
https://github.com/dotnet/fsharp/blob/ea778bb414648883fca4219bf7a69286bf82dd6b/src/Compiler/FSComp.txt#L1254

Part of #20139

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.