Skip to content

Remove always-on OpenTypeDeclaration language feature flag - #20215

Closed
T-Gro wants to merge 3 commits into
dotnet:mainfrom
T-Gro:remove-opentypedeclaration-feature-flag
Closed

Remove always-on OpenTypeDeclaration language feature flag#20215
T-Gro wants to merge 3 commits into
dotnet:mainfrom
T-Gro:remove-opentypedeclaration-feature-flag

Conversation

@T-Gro

@T-GroT-Gro commented Aug 6, 2026

Copy link
Copy Markdown
Member

Fixes#20148

OpenTypeDeclaration has shipped since F# 5.0 and is enabled for every selectable --langversion (the minimum accepted is 8.0), so its flag could never be turned off. The flag and the checkLanguageFeatureAndRecover guard on open type declarations are removed; --disableLanguageFeature:OpenTypeDeclaration is no longer a recognized feature name.

Copilotand others added 2 commits August 6, 2026 04:22
…l parameter
The LanguageFeature.OpenTypeDeclaration flag is always-on for every
supported --langversion (minimum 8.0, feature shipped in 5.0), so the
gated branch is dead. Remove the flag checks at both enforcement sites
and drop the now-unused mOpenDecl plumbing from TcOpenTypeDecl and
TcOpenDecl and their call sites.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Delete the always-on LanguageFeature.OpenTypeDeclaration DU case, its
features-map entry, GetFeatureString arm, and the featureOpenTypeDeclaration
FSComp.txt string. Regenerate xlf localization files via UpdateXlf.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actionsBot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

❗ Release notes required

You can open this PR in browser to add release notes: open in github.dev


✅ Found changes and release notes in following paths:

Change pathRelease notes pathDescription
`src/Compiler`docs/release-notes/.FSharp.Compiler.Service/11.0.100.md
`src/Compiler/Facilities/LanguageFeatures.fsi`docs/release-notes/.Language/preview.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actionsgithub-actionsBot added the AI-Tooling-Check-Scanned-Clean Tooling check: diff analyzed, no interesting infrastructure files label Aug 6, 2026
@T-Gro

Copy link
Copy Markdown
MemberAuthor

Closing as a duplicate of #20209, which already removes the always-on OpenTypeDeclaration feature flag cleanly (mergeable, no release-notes changes). This PR conflicts and adds release notes that aren't wanted for the flag-removal cleanup.

@T-GroT-Gro closed this Aug 10, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-Scanned-CleanTooling check: diff analyzed, no interesting infrastructure files

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Remove always-on language feature flag: OpenTypeDeclaration

1 participant

@T-Gro