-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
We took some steps towards centralizing such logic into the following signature as part of ref fields PR #62941
public static CSharpCompilation CreateCompilation(
CSharpTestSource source,
IEnumerable<MetadataReference> references = null,
CSharpCompilationOptions options = null,
CSharpParseOptions parseOptions = null,
TargetFramework targetFramework = TargetFramework.Standard,
string assemblyName = "",
string sourceFileName = "",
bool skipUsesIsNullable = false,
RuntimeFlag runtimeFeature = RuntimeFlag.None)
We need to confirm whether we want to keep a separate RuntimeFlag (which should not be used in conjunction with TargetFramework) or whether we want to use the TargetFramework to signal that information (create a dummy entry for new framework and fake it using an older framework plus the test hook for runtime feature flag).
Features that use a runtime feature flag as part of metadata decoding need to use skipUsesIsNullable: true, skipExtraValidation: true when using the test hook, but we should consider whether to just always do that.
Finally, there are some questions around the use of CopyWithoutSharingCachedSymbols(). There's a specific follow-up issue (#63222) on that, but we'll need to resolve that to establish a common pattern for new features.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status