Remove always-on ImplicitYield language feature flag - #20230
Open
T-Gro wants to merge 2 commits into
Open
Conversation
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>
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20143
LanguageFeature.ImplicitYieldhas shipped since F# 4.7 and is enabled for every selectable language version (the minimum accepted--langversionis 8.0), so its flag could never be turned off. The flag and itsSupportsFeature/checkLanguageFeatureAndRecoverguards are removed, collapsing each guarded site to its always-enabled behaviour.--disableLanguageFeature:ImplicitYieldis no longer a recognised feature name.The always-on
SynExpr.SequentialOrImplicitYieldAST machinery is untouched.Part of #20139