-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Update nullability convention to new nullability metadata #16385
Update nullability convention to new nullability metadata #16385
Conversation
@roji I was hoping to have a PR against the preview 7 branch. But maybe this is better in some way? |
Unless I'm mistaken, the problem is that branch doesn't have #16370 yet (because it's failing), meaning that this PR would fail as well - it's a catch-22 of PRs... If this PR passes we can merge both into preview7 - or if you prefer me to do it some other way let me know. |
And now it seems that conventions have to be thread-safe - updating for that. |
Note: it seems like there will be another minor metadata change - instead of byte[] there will be a ReadOnlySpan: dotnet/roslyn#36604. We can take care of that when that comes. |
f29ed14
to
baed1cb
Compare
Note: pushed update to make the convention class thread-safe as per @AndriySvyryd's advice. |
Just a meta-point here. Let's not rush this. We need to get it fixed for preview 7 and to unblock the build, but there is time for that to happen. Let's make sure we get a good, high-quality fix in. |
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.
My personal preference is to take out this convention from the default convention set builder for now.
PR #16370 cannot go to preview7 since it has preview8 packages from Extensions. Likely this breaking change in nullability is supposed to be post-preview7. |
You mean disabling nullability support by default? Is that because of the concurrency/caching that's going on, or some other issue? If the caching really seems problematic (would be good to know why), I can also remove it entirely, although that would potentially mean lots of reflection for every member.
|
Concurrency issues.... |
My apologies if the responses below are out of order.
…
We need to confirm this. If the newer Roslyn will be included in the preview 7 SDK, we need to react in our preview 7 branches. Side question: Is the Roslyn change coming in with the new Arcade?
I can't tell looking at that issue what milestone it's going into ("6.3" doesn't mean much to me). Do you have more information?
It's not intended that #16370 has been delayed. But, all of it should be merged into 'master' once we have the correct reactions in place.
|
@AndriySvyryd pushed commit which makes the convention store state in an annotation, can you please re-review to make sure I've done it right? |
@ajcvickers @divega who can we ping to confirm this? It seems like the first two commits need to go into preview7, and those are the ones that introduced this break - but it would be good to make sure.
I'm not sure - I do know that the compiler is brought in via the
16.3 is probably the Visual Studio version this is supposed to go out in - but I don't know more. In any case it seems safe to say this won't be before preview8, and the change is expected to be quite trivial. |
@livarcocc can you help us understand what version of Roslyn will ship in preview 7?
Yeah, I thought it was something like that. The property is implemented in the Arcade SDK and we use it in AspNetCore, AspNetCore-Tooling and Extensions as well as this repo. Arcade presently brings in the 3.3.0-beta1-19327-03 version of the Microsoft.Net.Compilers.Toolset package but I don't know what version is destined for preview 7's core-sdk. |
The version of Roslyn that will ship in preview 7 is found in https://github.com/dotnet/toolset/blob/a75492eb4d209ba79e4a8b8c154f1035f80504df/eng/Version.Details.xml#L24-L27: <Dependency Name="Microsoft.NETCore.Compilers" Version="3.2.0-beta4-19326-12">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>72444d34039295fa7b6d9580c4be528b4275e79c</Sha>
</Dependency> That version looks older than what Arcade is giving us (3.3.0-beta1-19327-03) but I can't tell whether dotnet/roslyn@72444d3 includes these nullability changes -- commit might be related but it's hard to be sure. |
Everyone, I think I have an easy way to test exactly what changes we need as well as provide a base for any Roslyn reactions. I'll open a draft PR to depend directly on the Roslyn package (taking the Arcade SDK out of the middle) in this repo's `release/3.0-preview7' branch. Will get that started after dinner… |
bd290d5
to
b46137b
Compare
Updated and squashed, everything should be OK now. Will wait for feedback on #16394 to know whether this needs to go into preview7, master, etc. |
Because the dependency versions don't flow from our preview branches back into 'master', need to do 'master' separately anyhow. Please merge this into the |
Merged into the |
PR is ready: #16403 |
…n preview 7 (#16394) - see also #16370 and #16385 discussions - grab latest from the '.NET Core 3 Release' channel * Update nullability convention to new nullability metadata - see https://github.com/dotnet/roslyn/blob/master/docs/features/nullable-metadata.md. - thanks @roji❕
…n preview 7 - see also dotnet/efcore#16370 and dotnet/efcore#16385 discussions - grab latest from the '.NET Core 3 Release' channel
…n preview 7 - see also dotnet/efcore#16370 and dotnet/efcore#16385 discussions - grab latest from the '.NET Core 3 Release' channel
…n preview 7 - see also dotnet/efcore#16370 and dotnet/efcore#16385 discussions - grab latest from the '.NET Core 3 Release' channel
…n preview 7 (#1916) - see also dotnet/efcore#16370 and dotnet/efcore#16385 discussions - grab latest from the '.NET Core 3 Release' channel
…n preview 7 (#727) * Explicitly reference Roslyn compiler toolset version that will ship in preview 7 - see also dotnet/efcore#16370 and dotnet/efcore#16385 discussions - grab latest from the '.NET Core 3 Release' channel * Use MicrosoftNetCompilersToolsetPackageVersion
…n preview 7 (#11818) * Explicitly reference Roslyn compiler toolset version that will ship in preview 7 - see also dotnet/efcore#16370 and dotnet/efcore#16385 discussions - grab latest from the '.NET Core 3 Release' channel * Disable tests * Update PackageVersion property * Disable last test
See https://github.com/dotnet/roslyn/blob/master/docs/features/nullable-metadata.md.
Makes #16370 pass.