dotnet / dotnet/fsharp

Remove always-on language feature flag: AttributesToRightOfModuleKeyword

Aperta
#20,155 0 commenti 0 reazioni 1 assegnatario Rivendicata da @T-Gro Vedi su GitHub
Lingua principale
F#
Stelle
4.3k
Fork
876
Merge medio
4g 8h
PR unite (30g)
133

Descrizione

`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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.