Skip to content

Commit 73d251a

Browse files
T-GroCopilotCopilot
authored
Remove always-on BetterExceptionPrinting language feature flag (#20318)
The BetterExceptionPrinting feature was introduced in langversion 7.0 and is effectively always on. Delete the language feature flag from the DU, features map, GetFeatureString, and FSComp.txt, and collapse the single IlxGen enforcement gate to the unconditional path (keeping the three duplicate-Message correctness guards). xlf files regenerated by the build. Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4dfd177 commit 73d251a

17 files changed

Lines changed: 1 addition & 72 deletions

‎src/Compiler/CodeGen/IlxGen.fs‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12906,8 +12906,7 @@ and GenExnDef cenv mgbuf eenv m (exnc: Tycon) : ILTypeRef option =
1290612906
yield! ilMethodDefsForProperties
1290712907

1290812908
if
12909-
cenv.g.langVersion.SupportsFeature(LanguageFeature.BetterExceptionPrinting)
12910-
&& not (exnc.HasMember g "get_Message" [])
12909+
not (exnc.HasMember g "get_Message" [])
1291112910
&& not (exnc.HasMember g "Message" [])
1291212911
&& not (fspecs |> List.exists (fun rf -> rf.DisplayNameCore = "Message"))
1291312912
then

‎src/Compiler/FSComp.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,6 @@ featureIndexerNotationWithoutDot,"expr[idx] notation for indexing and slicing"
12521252
featureRefCellNotationInformationals,"informational messages related to reference cells"
12531253
featureNonVariablePatternsToRightOfAsPatterns,"non-variable patterns to the right of 'as' patterns"
12541254
featureAttributesToRightOfModuleKeyword,"attributes to the right of the 'module' keyword"
1255-
featureBetterExceptionPrinting,"automatic generation of 'Message' property for 'exception' declarations"
12561255
featureDelegateTypeNameResolutionFix,"fix to resolution of delegate type names, see https://github.com/dotnet/fsharp/issues/10228"
12571256
3090,tcIfThenElseMayNotBeUsedWithinQueries,"An if/then/else expression may not be used within queries. Consider using either an if/then expression, or use a sequence expression instead."
12581257
3091,ilxgenUnexpectedArgumentToMethodHandleOfDuringCodegen,"Invalid argument to 'methodhandleof' during codegen"

‎src/Compiler/Facilities/LanguageFeatures.fs‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ type LanguageFeature =
3535
| UnionIsPropertiesVisible
3636
| NonVariablePatternsToRightOfAsPatterns
3737
| AttributesToRightOfModuleKeyword
38-
| BetterExceptionPrinting
3938
| DelegateTypeNameResolutionFix
4039
| ReallyLongLists
4140
| ErrorOnDeprecatedRequireQualifiedAccess
@@ -161,7 +160,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
161160
LanguageFeature.DelegateTypeNameResolutionFix, languageVersion60
162161

163162
// F# 7.0
164-
LanguageFeature.BetterExceptionPrinting, languageVersion70
165163
LanguageFeature.ReallyLongLists, languageVersion70
166164
LanguageFeature.ErrorOnDeprecatedRequireQualifiedAccess, languageVersion70
167165
LanguageFeature.RequiredPropertiesSupport, languageVersion70
@@ -358,7 +356,6 @@ type LanguageVersion(versionText, ?disabledFeaturesArray: LanguageFeature array)
358356
| LanguageFeature.UnionIsPropertiesVisible -> FSComp.SR.featureUnionIsPropertiesVisible ()
359357
| LanguageFeature.NonVariablePatternsToRightOfAsPatterns -> FSComp.SR.featureNonVariablePatternsToRightOfAsPatterns ()
360358
| LanguageFeature.AttributesToRightOfModuleKeyword -> FSComp.SR.featureAttributesToRightOfModuleKeyword ()
361-
| LanguageFeature.BetterExceptionPrinting -> FSComp.SR.featureBetterExceptionPrinting ()
362359
| LanguageFeature.DelegateTypeNameResolutionFix -> FSComp.SR.featureDelegateTypeNameResolutionFix ()
363360
| LanguageFeature.ReallyLongLists -> FSComp.SR.featureReallyLongList ()
364361
| LanguageFeature.ErrorOnDeprecatedRequireQualifiedAccess -> FSComp.SR.featureErrorOnDeprecatedRequireQualifiedAccess ()

‎src/Compiler/Facilities/LanguageFeatures.fsi‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ type LanguageFeature =
2525
| UnionIsPropertiesVisible
2626
| NonVariablePatternsToRightOfAsPatterns
2727
| AttributesToRightOfModuleKeyword
28-
| BetterExceptionPrinting
2928
| DelegateTypeNameResolutionFix
3029
| ReallyLongLists
3130
| ErrorOnDeprecatedRequireQualifiedAccess

‎src/Compiler/xlf/FSComp.txt.cs.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.de.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.es.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.fr.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.it.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/Compiler/xlf/FSComp.txt.ja.xlf‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)