-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Hide replace/original functionality behind a feature flag. #11157
Conversation
Since "original" is by itself contextual on the presence of "replace", only "replace" actually needs to be keyed off a flag.
note that, similarly to analyzers, invoking of actual generators is not conditional on language version/features. |
@@ -14,6 +14,16 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests.Symbols | |||
{ | |||
public class ReplaceOriginalTests : CSharpTestBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider marking tests with the feature attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlekseyTs agree. This is now a pre-req before merging to future so let's do this now.
LGTM |
LGTM modulo attribute comment. |
private static CSharpCompilation CreateCompilationWithMscorlib(string text, CSharpCompilationOptions options) | ||
{ | ||
return CreateCompilationWithMscorlib(text, options: options, parseOptions: TestOptions.Regular.WithReplaceFeature()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using options = null
and removing the other overload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in a new change. Thanks
LGTM |
Agree with feature attribute comment. |
Since "original" is by itself contextual on the presence of "replace", only "replace" actually needs to be keyed off a flag.