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

Upgrade our .NET SDK to 5.0 RC 1 #48404

Merged

Conversation

jasonmalinowski
Copy link
Member

No description provided.

"allowPrerelease": true,
"rollForward": "major"
},
"tools": {
"dotnet": "5.0.100-preview.8.20417.9",
"dotnet": "5.0.100-rc.1.20452.10",
"vs": {
"version": "16.8"
},
Copy link
Member

@Youssef1313 Youssef1313 Oct 7, 2020

Choose a reason for hiding this comment

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

Should the next line for xcopy-msbuild be updated to preview 3 instead of preview 2?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

(I think the answer is no because we only rebuild that xcopy package when we need to...)

Copy link
Member

Choose a reason for hiding this comment

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

We only do it when we need to, but the likelihood is that we'll need to. @jaredpar, is there a new version? If not, can you make one?

@jasonmalinowski jasonmalinowski requested a review from a team as a code owner October 7, 2020 20:13
@Youssef1313
Copy link
Member

Youssef1313 commented Oct 7, 2020

One the build failures is related to this breaking change.

@@ -33,7 +33,9 @@ private static async Task<int> Main(string[] args)
Application.Run();
});

#pragma warning disable CA1416 // analyzer is warning this API is only available on Windows, but this project only targets windows.
Copy link
Member

Choose a reason for hiding this comment

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

Using a Debug.Assert sounds more neat than a suppression.

Copy link
Member Author

Choose a reason for hiding this comment

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

This appears to be an analyzer bug actually...

Copy link
Member

Choose a reason for hiding this comment

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

Pinging @buyaa-n on this.

Copy link
Contributor

Choose a reason for hiding this comment

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

if the project targets windows it shouldn't warn for calling windows only API, there were MSBuild bug related to version less target platform dotnet/sdk#13494, might be caused from that

Copy link
Member

Choose a reason for hiding this comment

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

@buyaa-n The project target both, net5.0-windows and net472:

<TargetFrameworks>net472;net5.0-windows</TargetFrameworks>

Copy link
Contributor

Choose a reason for hiding this comment

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

The analzyer is off by default for net472

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm guessing the net472 isn't being counted as "windows" and I guess maybe there's Mono scenarios that apply here.

@333fred
Copy link
Member

333fred commented Oct 7, 2020

There's going to be some changes in the function pointer tests necessary. We also need to update https://github.com/dotnet/roslyn/blob/master/docs/contributing/Building,%20Debugging,%20and%20Testing%20on%20Windows.md#developing-with-visual-studio-2019. Please also make sure to send out an email to the wider team about up'ing the requirements.

@jasonmalinowski
Copy link
Member Author

@Youssef1313 Unfortunately there's also a bug that prevents it from correctly handling multi-targeted projects and the fix isn't in RC1, haven't looked at what we'll do for that yet.

@jasonmalinowski
Copy link
Member Author

(or at least I don't think the fix is in RC1...)

@333fred
Copy link
Member

333fred commented Oct 7, 2020

(or at least I don't think the fix is in RC1...)

I believe that's correct, it should be in RC2

@jasonmalinowski jasonmalinowski requested review from a team as code owners October 7, 2020 20:43
@jasonmalinowski jasonmalinowski self-assigned this Oct 7, 2020
@@ -502,12 +502,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
#If DEBUG Then
' Compile time asserts.
Private Const s_delegateRelaxationLevelMask_AssertZero = SmallFieldMask.DelegateRelaxationLevelMask - ConversionKind.DelegateRelaxationLevelMask
Private _delegateRelaxationLevelMask_Assert1(s_delegateRelaxationLevelMask_AssertZero) As Boolean
Private _delegateRelaxationLevelMask_Assert2(-s_delegateRelaxationLevelMask_AssertZero) As Boolean
Private ReadOnly _delegateRelaxationLevelMask_Assert1(s_delegateRelaxationLevelMask_AssertZero) As Boolean
Copy link
Member

Choose a reason for hiding this comment

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

The IDE Analyzer MakeFieldReadOnly is already enabled. Why it didn't catch these?

Copy link
Member

Choose a reason for hiding this comment

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

The updated analyzer catches more cases.

@@ -15,6 +16,7 @@ namespace Microsoft.CodeAnalysis.Interactive
{
internal static class InteractiveHostEntryPoint
{
[SupportedOSPlatform("windows")]
Copy link
Member

Choose a reason for hiding this comment

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

Can this be surrounded by #if NET5_0 instead of having to add the PlatformAttributes.cs file? or this won't work?

Copy link
Member

@sharwell sharwell Oct 7, 2020

Choose a reason for hiding this comment

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

I prefer to localize the directives to PlatformAttributes.cs and have the code itself look uniform and, where possible, modern.

@@ -15,6 +16,7 @@ namespace Microsoft.CodeAnalysis.Interactive
{
internal static class InteractiveHostEntryPoint
{
[SupportedOSPlatform("windows")]
Copy link
Member

Choose a reason for hiding this comment

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

Is there not a constant for these?

Copy link
Member

Choose a reason for hiding this comment

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

I didn't see one. dotnet/runtime seems to use strings.

@jasonmalinowski jasonmalinowski requested a review from a team as a code owner October 7, 2020 21:37
@jasonmalinowski jasonmalinowski merged commit f3ef882 into dotnet:master Oct 8, 2020
@ghost ghost added this to the Next milestone Oct 8, 2020
@jasonmalinowski jasonmalinowski deleted the fix-integration-tests branch October 8, 2020 04:09
@jasonmalinowski
Copy link
Member Author

Merging as this is needed to unblock integration test running in master.

@Cosifne Cosifne modified the milestones: Next, 16.9.P1 Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants