Skip to content

Remove always-on ImplicitYield language feature flag - #20230

Merged
T-Gro merged 2 commits into
mainfrom
fix/issue-20143
Aug 11, 2026
Merged

Remove always-on ImplicitYield language feature flag#20230
T-Gro merged 2 commits into
mainfrom
fix/issue-20143

Conversation

@T-Gro

@T-GroT-Gro commented Aug 7, 2026

Copy link
Copy Markdown
Member

Fixes#20143

LanguageFeature.ImplicitYield has shipped since F# 4.7 and is enabled for every selectable language version (the minimum accepted --langversion is 8.0), so its flag could never be turned off. The flag and its SupportsFeature/checkLanguageFeatureAndRecover guards are removed, collapsing each guarded site to its always-enabled behaviour. --disableLanguageFeature:ImplicitYield is no longer a recognised feature name.

The always-on SynExpr.SequentialOrImplicitYield AST machinery is untouched.

Part of #20139

Copilotand others added 2 commits August 7, 2026 09:18
Remove the dead 'SupportsFeature LanguageFeature.ImplicitYield' guards, whose condition is always true for langversion >= 8.0, across the four Checking/Expressions files. Each guard is collapsed to its enabled branch and the dead branch/binding deleted. Behaviour is unchanged; the flag definition in LanguageFeatures.fs is intentionally left for a later sprint.
The now-unused 'cenv' parameter of YieldFree is renamed to '_cenv' (not removed): FSharp.Profiles.props enables --warnon:1182 with WarningsAsErrors, so an unused named binding is a hard build error, and removing the parameter would cascade through IsSimpleSemicolonSequenceElement, TryGetSimpleSemicolonSequenceOfComprehension and the SimpleSemicolonSequence active pattern (all out of scope). The '_' prefix preserves the exact signature and all positional call sites.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The ImplicitYield feature shipped in F# 4.7 and is permanently enabled
(minimum accepted --langversion is 8.0), making the flag dead configuration.
Remove the LanguageFeature.ImplicitYield union case, its features-map entry,
the GetFeatureString arm, the featureImplicitYield FSComp.txt string, and
regenerate the xlf localisation files. The always-on
SynExpr.SequentialOrImplicitYield AST machinery is untouched.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actionsBot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

@T-GroT-Gro added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Aug 7, 2026
@github-actionsgithub-actionsBot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label Aug 7, 2026
@T-Gro
T-Gro requested a review from abonieAugust 10, 2026 11:24
@T-Gro
T-Gro enabled auto-merge (squash) August 10, 2026 11:24
@T-GroT-Gro added NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes and removed NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes labels Aug 10, 2026
@github-project-automationgithub-project-automationBot moved this from New to In Progress in F# Compiler and ToolingAug 11, 2026
@T-Gro
T-Gro merged commit 9f19d64 into mainAug 11, 2026
56 of 60 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI-Tooling-Check-BypassedTooling check: non-fork PR, not diff-analyzedNO_RELEASE_NOTESLabel for pull requests which signals, that user opted-out of providing release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Remove always-on language feature flag: ImplicitYield

2 participants

@T-Gro@abonie