Skip to content

Remove always-on ImplicitYield language feature flag - #20230

Open
T-Gro wants to merge 2 commits into
mainfrom
fix/issue-20143
Open

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

Conversation

@T-Gro

@T-Gro T-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

Copilot and 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-actions Bot 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-Gro T-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-actions github-actions Bot added the AI-Tooling-Check-Bypassed Tooling check: non-fork PR, not diff-analyzed label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

Remove always-on language feature flag: ImplicitYield

1 participant