-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Update compiler version to 3.8.0 #28125
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
Conversation
These feel like contradictory statements. The PR starts by saying Razor references two compilers but the description is updating "the compiler version". Feel like one of these statements needs to be made clearer. Intuition says that the latter should be talking about the Razor Runtime correct? If so what version of Roslyn is the Razor SDK using and how does that version get updated. |
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, thanks.
In case someone is looking for more info on the connection to source-build: we essentially already have this change in the 5.0.0 source-build: it only includes Roslyn 3.8.0. Merging this PR for 5.0.1 will bring the Microsoft-built SDK into alignment with the source-built SDK.
Hello human! Please make sure you've included the Shiproom Template in a comment or (preferably) the PR description. Also, make sure this PR is not marked as a draft and is ready-to-merge. |
We ship a version of Razor as part of the SDK (rzc) and one as a runtime package. |
Sorry to answer your second question, there is no automation to update this. The version number is manually updated. One option that we could considere is to have the version referenced by rzc update using automation while leaving the one referenced by runtime compilation to be manually updated. That's definitely something we could consider. Unfortunately it might need some build trickery and most of our build team is out the rest of the week. |
The bug though mentions an incoherency. Essentially that we're presently shipping two versions of MS.CA. If there is only a single version here how do we have this incoherency. Feel like I'm missing a step here. |
There are two groups of Roslyn versions in Line 152 in 371a26f
Lines 182 to 184 in 371a26f
From a simple "find all", it looks like the first one is only used by tests. I'm kind of lost on the "two versions" vs. one version that affects two scenarios. (Note that the first group is 3.8.0, so AFAIK it wouldn't show up as an incoherency even if it were tracked. (Or maybe it would be an additional incoherency w/ preview versioning?) @mmitche pointed at #26329 as removing some automation for the first group, but it looks like the second group was never involved. Just as a note on the "automation improvements to make later" side of this.)
My understanding is that the .NET SDK takes a version of Roslyn, and independently, ASP.NET Core has this manually updated version of Roslyn (which wasn't updated). Then when they're mashed together into the 5.0.0 .NET SDK, we get incoherency:
I don't know if there's any incoherency in ASP.NET Core's outputs themselves--the one we noticed in source-build only showed up in the .NET SDK. |
The version of Microsoft.NET.Compilers.Toolset that's shipping as part of the the SDK is 3.8.0-5.20570.14. We would want rzc to reference the corresponding version of Updating |
That was true at 5.0 RTM but has changed with every bug fix we take to the compiler. There have been two such fixes since RTM. We should make sure we understand how this process works to ensure Razor has the Roslyn bits it's expected to be getting. Think that can be a follow up discussion though.
This is still where I'm stuck. If they both get their version from a single project reference then how did they get out of sync at all? I can definitely understnad how they would be the wrong version but not how they would be out of sync. |
I think he doesn't mean "shared", he means there is one in sdk, and one in aspnetcore? |
I didn't say "shared" in my comment so not sure how to respond to this. The quote I'm responding to is "Both of these get the compiler version through a single project / package reference". Feel like there is only one way to interpret that statement. |
I was referring to him not saying shared...but the statement is a bit confusing. Anyways, there's one reference to roslyn in the sdk, and one in aspnetcore. Which means by definition they can get out of sync. |
Razor requires referencing two different versions of Roslyn
Roslyn doesn't follow the runtime ship schedule so to reliably the 2nd item, ASP.NET Core manually updates this package version. As part of 5.0.1, it was discovered that there's two different versions of these binaries in the SDK (a 3.8.0 version carried by the compiler and a 3.7.0 version carried by Razor). This is a bit vexxing, more so in source build which only builds the newer version.
Fixes #28096
Description
Update the Roslyn version referenced by Razor to 3.8.0
Customer impact
Regression
No
Risk
Low.