-
Notifications
You must be signed in to change notification settings - Fork 839
Add --disableLanguageFeature CLI switch and MSBuild property to selectively disable language features #19167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
3beb767
5ba3745
7f3bcf8
7dacc20
2852d9c
cc29923
e818424
7c0dc12
aa32b6d
2eaf046
9da0e1b
2e3f35c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1177,11 +1177,28 @@ let languageFlags tcConfigB = | |
| CompilerOption( | ||
| "langversion", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You still did not update any help tests which is for sure wrong and is a hint of you not running any tests at all, neither build.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated help baseline in commit 7c0dc12. Help tests now pass. Running targeted tests for disableLanguageFeature still shows "key not present in dictionary" errors that need debugging. |
||
| tagLangVersionValues, | ||
| OptionString(fun switch -> tcConfigB.langVersion <- setLanguageVersion switch), | ||
| OptionString(fun switch -> | ||
| let newVersion = setLanguageVersion switch | ||
| // Preserve disabled features when updating version | ||
| tcConfigB.langVersion <- newVersion.WithDisabledFeatures(tcConfigB.disabledLanguageFeatures)), | ||
| None, | ||
| Some(FSComp.SR.optsSetLangVersion ()) | ||
| ) | ||
|
|
||
| // -disableLanguageFeature:<string> Disable a specific language feature by name (repeatable) | ||
| CompilerOption( | ||
| "disableLanguageFeature", | ||
T-Gro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| tagString, | ||
| OptionStringList(fun featureName -> | ||
| match LanguageVersion.TryParseFeature(featureName) with | ||
| | Some feature -> | ||
| tcConfigB.disabledLanguageFeatures <- Array.append tcConfigB.disabledLanguageFeatures [| feature |] | ||
| tcConfigB.langVersion <- tcConfigB.langVersion.WithDisabledFeatures(tcConfigB.disabledLanguageFeatures) | ||
| | None -> error (Error(FSComp.SR.optsUnrecognizedLanguageFeature featureName, rangeCmdArgs))), | ||
| None, | ||
| Some(FSComp.SR.optsDisableLanguageFeature ()) | ||
| ) | ||
|
|
||
| CompilerOption( | ||
| "checked", | ||
| tagNone, | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.