dotnet / dotnet/fsharp

Remove always-on language feature flag: ErrorOnDeprecatedRequireQualifiedAccess

Open
#20,168 0 comments 0 reactions 1 assignee Claimed by @T-Gro View on GitHub
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

`LanguageFeature.ErrorOnDeprecatedRequireQualifiedAccess` has shipped since **F# 7.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 `ErrorOnDeprecatedRequireQualifiedAccess` 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 `featureErrorOnDeprecatedRequireQualifiedAccess` string in [`FSComp.txt`](https://github.com/dotnet/fsharp/blob/ea778bb414648883fca4219bf7a69286bf82dd6b/src/Compiler/FSComp.txt)
- Every `SupportsFeature LanguageFeature.ErrorOnDeprecatedRequireQualifiedAccess` / `checkLanguageFeatureAndRecover … ErrorOnDeprecatedRequireQualifiedAccess` guard — keep only the enabled path and delete the legacy branch
- Adjust affected tests and baselines accordingly

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

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

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

Part of #20139

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.