dotnet / dotnet/fsharp

Remove always-on language feature flag: AttributesToRightOfModuleKeyword

Abierto
#20,155 0 comentarios 0 reacciones 1 asignado Reclamado por @T-Gro Ver en GitHub
Lenguaje dominante
F#
Estrellas
4.3k
Forks
876
Merge medio
5 d 9 h
PR fusionados (30 d)
153

Descripción

`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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.