Skip to content

Use TargetFramework.Net70 instead of RuntimeFlag.ByRefFields in CreateCompilation#64400

Merged
jcouv merged 2 commits intodotnet:mainfrom
jcouv:create-compilation
Sep 30, 2022
Merged

Use TargetFramework.Net70 instead of RuntimeFlag.ByRefFields in CreateCompilation#64400
jcouv merged 2 commits intodotnet:mainfrom
jcouv:create-compilation

Conversation

@jcouv
Copy link
Member

@jcouv jcouv commented Sep 30, 2022

Closes #63223

One commit is a mechanical search&replace. The other updates the test helper.

@jcouv jcouv self-assigned this Sep 30, 2022
@ghost ghost added the Area-Compilers label Sep 30, 2022
@jcouv jcouv added Test Test failures in roslyn-CI Area-Compilers and removed Area-Compilers labels Sep 30, 2022
@jcouv jcouv force-pushed the create-compilation branch from 751ff9a to 4db461f Compare September 30, 2022 18:19
@jcouv jcouv marked this pull request as ready for review September 30, 2022 19:37
@jcouv jcouv requested a review from a team as a code owner September 30, 2022 19:37
@jcouv jcouv enabled auto-merge (squash) September 30, 2022 21:33
@jcouv jcouv merged commit 6fd8399 into dotnet:main Sep 30, 2022
@ghost ghost added this to the Next milestone Sep 30, 2022
{
Debug.Assert(targetFramework == TargetFramework.Standard || runtimeFeature == RuntimeFlag.None);
if (runtimeFeature == RuntimeFlag.ByRefFields)
if (targetFramework == TargetFramework.Net70)
Copy link
Contributor

@AlekseyTs AlekseyTs Oct 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (targetFramework == TargetFramework.Net70)

I actually thought that we would add a set of corresponding ref assemblies, perhaps fake, rather that keeping any special cases in CreateCompilation. This implementation feels fragile because one has to remember removing/adjusting it once real Net70 ref assemblies are added. Otherwise this helper will keep hijacking references. I actually think this is worse than having the runtimeFeature parameter. Given this, at the moment, I would prefer removing this if completely and adding real Net70 ref assemblies.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss after next standup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Compilers Test Test failures in roslyn-CI

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Design a more general test hook solution for runtime feature flags

5 participants