-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Add and use TargetFramework.Net70 #64490
Conversation
d2a47f8
to
06e4f21
Compare
{ | ||
get | ||
{ | ||
// CorLibrary should never be null, but that invariant is broken in some cases for MissingAssemblySymbol. | ||
// Tracked by https://github.com/dotnet/roslyn/issues/61262 | ||
return CorLibrary?.RuntimeSupportsNumericIntPtr == true; | ||
return CorLibrary is not null && | ||
RuntimeSupportsFeature(SpecialMember.System_Runtime_CompilerServices_RuntimeFeature__NumericIntPtr); |
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 separating product changes and infrastructure changes into separate PRs
@@ -260,11 +260,6 @@ internal new AssemblyMetadata Copy() | |||
return new AssemblyMetadata(this, shareCachedSymbols: true); | |||
} | |||
|
|||
internal AssemblyMetadata CopyWithoutSharingCachedSymbols() |
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.
The title of the PR feels somewhat misleading. For example, in my mind adding |
9d3d153
to
86432cd
Compare
@AlekseyTs I've shrunk this PR to exclude the upgrade to new SDK. I just want to point out this means that tests in NumerIntPtrTests no longer execute (see this line, but we never build the test projects with .NET 7). I'm okay with this temporary regression in coverage given that I have the follow-up change working already. Note that RefFieldTests has the same problem, but there is no regression there since they didn't execute prior to this PR. Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:32 in 86432cd. [](commit_id = 86432cd, deletion_comment = False) |
{ | ||
get | ||
{ | ||
// CorLibrary should never be null, but that invariant is broken in some cases for MissingAssemblySymbol. | ||
// Tracked by https://github.com/dotnet/roslyn/issues/61262 | ||
return CorLibrary?.RuntimeSupportsNumericIntPtr == true; | ||
return CorLibrary is not null && |
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.
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.
It is. One test reaches this with a null CorLibrary (CompilationReferences_More
, crash in EmitDifference
). This is tracked by above issue.
I'm not sure why numeric IntPtr is uniquely susceptible, but it might be because it's involved in metadata decoding for a type that already exists in the BCL ref assemblies.
Just curious: Why do these tests fail PEVerify? In reply to: 1270347021 Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:1406 in ab4209b. [](commit_id = ab4209b, deletion_comment = False) |
What is the source of baseline changes like this? In reply to: 1270370025 In reply to: 1270370025 #Closed Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:1635 in ab4209b. [](commit_id = ab4209b, deletion_comment = False) |
comp.VerifyDiagnostics( | ||
// (4,18): error CS9064: Target runtime doesn't support ref fields. | ||
// public ref T F; | ||
Diagnostic(ErrorCode.ERR_RuntimeDoesNotSupportRefFields, "F").WithLocation(4, 18), |
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.
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.
On second look, the original test didn't seem to be about the attribute definition being provided in source. I've removed the extra validation I'd added.
This was a change in the BCL: dotnet/runtime#1727 In reply to: 1270370025 Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:1635 in ab4209b. [](commit_id = ab4209b, deletion_comment = False) |
Done with review pass (commit 4) |
I've not investigated in great details. In reply to: 1270347021 Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:1406 in ab4209b. [](commit_id = ab4209b, deletion_comment = False) |
Could this be a temporary problem caused by the fact that we are trying to run tests in .NET 6 runtime, but using ref assemblies of the next version?
It is not obvious to me why that is. Could you elaborate please? At least I think we need to open a follow-up issue, or perhaps make verification conditional on whether we are building against NET7 In reply to: 1270401588 Refers to: src/Compilers/CSharp/Test/Emit2/Emit/NumericIntPtrTests.cs:1406 in ab4209b. [](commit_id = ab4209b, deletion_comment = False) |
CodeFlow froze for the second time when I tried to post this response. Using GitHub for third attempt...
PEVerify only runs in Desktop runtime. Which version of the Core runtime we use doesn't seem relevant.
PEVerify is a tool/API for validation of PE on Desktop runtime. As far as I can tell, it is only given the bits for the module that we've emitted (see This is not a new problem, by the way. All tests that use
Let's discuss with Jared. I don't think we're investing in validation using PEVerify anymore. |
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.
LGTM (commit 5)
* upstream/main: (252 commits) Use the source-built version of ref packs and don't use app host when building in source-build (dotnet#64055) Enable rich LSIF hover information. (dotnet#64580) Add ChecksumAlgorithm to project snapshot (dotnet#62840) Utility for uploading artifact on test failure (dotnet#64578) Enable diagnostics Revert "Remove unused TS brace completion code" Publish additional packages to vssdk feed (dotnet#64571) spelling Move check Simplify SymbolKey implementation lint Update publish data to test PR validation fix (dotnet#64559) Simplify Update src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/SymbolKey/SymbolKey.cs Lint Proper equality checks Update src/Workspaces/Remote/Core/RemoteCallback.cs Revert "Not wait for solution crawler because it can be very busy" Add and use TargetFramework.Net70 (dotnet#64490) Not wait for solution crawler because it can be very busy ...
Closes #61463 (adds Net70)
Closes #61235 (removes RuntimeSupportsNumericIntPtr )
Relates to test plan #60578 (Numeric IntPtr)
Relates to test plan #59194 (ref fields)
Documentation of process:
dotnet-public
Azure feedTargetFramework
, consuming that package (see first commit in this PR)Note to future self: when adding a new TFM, it is good to update
NetCoreApp
to point to it. This requires a bit of a process:TargetFrameworkUtil.NetCoreApp
forward and start a draft PRNet50
Ideally, we can remove the packages for old reference assemblies, to reduce the amount of copy to test folders in CI.