Skip to content
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

Move net451 test assets to net461 #74766

Merged
merged 3 commits into from
Aug 17, 2024
Merged

Move net451 test assets to net461 #74766

merged 3 commits into from
Aug 17, 2024

Conversation

jaredpar
Copy link
Member

@jaredpar jaredpar commented Aug 15, 2024

This migrates our tests which depended on net451 assemblies to use net461 assemblies instead. The reason for this is to consolidate our test assets to make them easier to manager. This also saves 127MB of disk I/O when doing a restore in CI which should reduce PR validation time. The under pinning mentality of this change is that net451 and net461 are not significantly different hence this update should be very straight forward.

This PR is broken into two commits. The first commit is a mostly mechanical migration from net451 to net461. There are a number of places where I had to do minor fixups in baselines like changing System.dll(net451) to System(net461). The only significant functional issue that popped up reading through the tests is a number of net451 tests depended on Array.Empty<T> not existing. Those required functional changes to work: typically by using MakeMemberMissing calls to maintain the behavior. To help reviewing these are the tests impacted by this behavior.

  • CodeGenExprLambdaTests.MethodCallWithParams
  • CollectionExpressionTests.ArrayEmpty_01
  • CollectionExpressionTests.ArrayEmpty_02
  • InternalsVisibleToAndStrongNameTests.IvtVirtualCall1
  • InternalsVisibleToAndStrongNameTests.IvtVirtualCall2
  • MissingSpecialMember.AllSpecialTypeMembers

Note: Had to temporarily disable BC30645ERR_InvalidOptionalParameterUsage1b. Will re-enable that test once I can publish to nuget.org again, fix the ref assembly bug that will let me port this test to net461

The second commit is refactor rename of various APIs that had the partWithMscorlib45 to WithMscorlib461. Suggest mostly spot checking that one.

@jaredpar jaredpar marked this pull request as ready for review August 16, 2024 21:06
@jaredpar
Copy link
Member Author

@dotnet/roslyn-compiler PTAL

Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

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

I spot checked a number of the files in the PR, and went through the test helper classes. Going to sign off overall.

@jaredpar
Copy link
Member Author

Integration test failures are unrelated

@jaredpar jaredpar merged commit 75b26a2 into dotnet:main Aug 17, 2024
24 of 28 checks passed
@jaredpar jaredpar deleted the net451 branch August 17, 2024 16:21
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Aug 17, 2024
@dibarbet dibarbet removed this from the Next milestone Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants