-
Notifications
You must be signed in to change notification settings - Fork 228
[main] Source code updates from dotnet/roslyn #3147
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
[main] Source code updates from dotnet/roslyn #3147
Conversation
Diff: https://github.com/dotnet/roslyn/compare/a01d6a0838430706cea74ad38e054c2877ffbfa1..d4a697d01ea70799b5dd603ffff005dfb176253a From: dotnet/roslyn@a01d6a0 To: dotnet/roslyn@d4a697d [[ commit created by automation ]]
…13d-9aeb-6b42485f21ea
|
Important There are conflicts with the {
"barId": 288936,
"path": "roslyn",
"remoteUri": "https://github.com/dotnet/roslyn",
"commitSha": "d4a697d01ea70799b5dd603ffff005dfb176253a"
}💡 You may consult the FAQ for more information or tag @dotnet/product-construction for assistance. |
Diff: https://github.com/dotnet/roslyn/compare/d4a697d01ea70799b5dd603ffff005dfb176253a..bdc3713c08fc24a1c47c5ed348404dc686ff7f61 From: dotnet/roslyn@d4a697d To: dotnet/roslyn@bdc3713 [[ commit created by automation ]]
…13d-9aeb-6b42485f21ea
|
Note PRs from original repository included in this codeflow update:
💡 You may consult the FAQ for more information or tag @dotnet/product-construction for assistance. |
|
Diff: https://github.com/dotnet/roslyn/compare/bdc3713c08fc24a1c47c5ed348404dc686ff7f61..25e8c72fa42d9c6ae6b1c34dfd09c1d7de5ac1ab From: dotnet/roslyn@bdc3713 To: dotnet/roslyn@25e8c72 [[ commit created by automation ]]
…13d-9aeb-6b42485f21ea
|
Note PRs from original repository included in this codeflow update:
💡 You may consult the FAQ for more information or tag @dotnet/product-construction for assistance. |
Diff: https://github.com/dotnet/roslyn/compare/25e8c72fa42d9c6ae6b1c34dfd09c1d7de5ac1ab..6ea3a6601bb6e7124a399a5e25f10af72dfd10d1 From: dotnet/roslyn@25e8c72 To: dotnet/roslyn@6ea3a66 [[ commit created by automation ]]
…13d-9aeb-6b42485f21ea
|
Note PRs from original repository included in this codeflow update:
💡 You may consult the FAQ for more information or tag @dotnet/product-construction for assistance. |
Diff: https://github.com/dotnet/roslyn/compare/6ea3a6601bb6e7124a399a5e25f10af72dfd10d1..f695099448581f1f2e84ee493c2c5abc7951e8f9 From: dotnet/roslyn@6ea3a66 To: dotnet/roslyn@f695099 [[ commit created by automation ]]
…13d-9aeb-6b42485f21ea
|
Note PRs from original repository included in this codeflow update:
💡 You may consult the FAQ for more information or tag @dotnet/product-construction for assistance. |
|
Talked to @tmat offline; needs sdk changes from 10.0.2xx to flow into sdk main first (dotnet/sdk#51207) |
Diff: https://github.com/dotnet/roslyn/compare/f695099448581f1f2e84ee493c2c5abc7951e8f9..7b48e0879c2f350cfc8b5d828c120c902873ce0c From: dotnet/roslyn@f695099 To: dotnet/roslyn@7b48e08 [[ commit created by automation ]]
…13d-9aeb-6b42485f21ea
|
Note PRs from original repository included in this codeflow update:
💡 You may consult the FAQ for more information or tag @dotnet/product-construction for assistance. |
I assume also dotnet/sdk#51540 is needed since the original was quite old |
Diff: https://github.com/dotnet/roslyn/compare/7b48e0879c2f350cfc8b5d828c120c902873ce0c..85dda97a0480af42cbae9c4c0aa990f32e174530 From: dotnet/roslyn@7b48e08 To: dotnet/roslyn@85dda97 [[ commit created by automation ]]
|
@jjonescz VMR now has latest SDK. Can you please take a look at the failures? Thanks |
|
The error is src/sdk/src/BuiltInTools/Watch/Microsoft.DotNet.HotReload.Watch.csproj(0,0): error NU1102: (NETCORE_ENGINEERING_TELEMETRY=Restore) Unable to find package Microsoft.CodeAnalysis.Contracts with version (>= 5.3.0-ci) Where in the binlog I additionally see: - Versions from source-built-roslyn were not considered And Package source mapping matches found for package ID 'Microsoft.CodeAnalysis.Contracts' are: 'source-built-source-build-reference-packages,dotnet6,dotnet6-transport,dotnet7,dotnet7-transport,dotnet8,dotnet8-transport,dotnet8-workloads,dotnet9,dotnet9-transport,dotnet10,dotnet10-transport,dotnet11,dotnet11-transport,dotnet-public,dotnet-eng,dotnet-tools,dotnet-tools-transport,dotnet-libraries,dotnet-libraries-transport,vs-impl,richnav,test-tools'. I would expect the Contracts package to come from source-built-roslyn, i.e., source build seems badly configured, but I don't know where exactly is this configured, any ideas? |
|
A Version.Details.xml entry is missing in sdk (and a corresponding Version.Details.props property). |
|
Hm, that doesn't seem to be present in the 10.0.2xx branch either (so why that one doesn't fail?), but I guess I can try adding it here, thanks. |
|
Ah nevermind, I see that those packages all share one version: https://github.com/dotnet/sdk/blob/eb80929b472550eee0e593017adff6773cff9859/Directory.Packages.props#L26 |
|
The package doesn't get produced in roslyn: |
|
|
I don't know why this works in 2xx. Would need to dig deeper. |
|
As far as I can see, the project |
|
It is a declared as dependency though in main in those two source projects: https://github.com/search?q=repo%3Adotnet%2Fsdk%20Microsoft.CodeAnalysis.Contracts&type=code |
|
Those projects don't seem to be built in source-build, so it shouldn't matter. |
|
Yeah, right. OK I'm very confused now. I have absolutely no idea where that dependency is coming from then.
|
|
I remembered something that we set in other repos: https://github.com/dotnet/msbuild/blob/92212c00730dfb52f81c7f1e0a8a8d172fe9bb80/eng/Build.props#L3-L6 This could be it. Don't ask me why it shows up now. |
|
OK lol that's not it either. The binlog shows that Restore is using normal, non static-graph restore. |
|
@dotnet/nuget-team we are stuck here. The error in the source-build job shows that NuGet tries to download Any idea how to further diagnose this? Last resort would be building locally and debugging NuGet. |
|
I manually flew latest roslyn main in #3944 (as this PR is pretty outdated) and I don't seem to be getting the restore problem there |
|
I verified that the PSB archive that gets used in this source-build job doesn't have any nuget dependencies that depend on But I noticed that the package itself is inside PSB even though the package is marked as exclude from source-build in at least main and 2xx. Nevermind, it's coming from SBRP (text-only package). |
|
My guess is that there's a transitive package which has a dependency on Microsoft.CodeAnalysers.Contracts, but that package is eclipsed when every unique package name has its version selected. See the second example here, the one where there are two different versions of Package D: https://learn.microsoft.com/en-us/nuget/concepts/dependency-resolution#cousin-dependencies NuGet downloads both versions of Package D, so that the next time it needs to resolve the full graph, it doesn't need to make HTTP requests to determine its dependencies. I think in the case of "direct dependency" NuGet avoids downloadaing the package, but this is getting into the nitty gritty details of restore that I personally have never needed to investigate, so I'm not 100% sure: https://learn.microsoft.com/en-us/nuget/concepts/dependency-resolution#direct-dependency-wins dotnet nuget why does not show packages "culled" from the graph (packages not in the final selection because the parent package was changed to a different version that does not have the same dependencies). Unfortunately it's not easy to confirm. If you want to, just thinking on the spot, my guess would be to use the NUGET_PACKAGES environment variable to restore packages to a currently empty directory. Then use grep to scan all *.nuspec files for Microsoft.CodeAnalysis.Contracts, to see if any of the packages do indeed have it as a dependency. |
|
This looks to be a point-in-time issue. CSharp.Features has a dependency on an older version of FileBasedPrograms. This has a package dependency on CodeAnalysis.Contracts. This version gets lifted to 5.3.0-ci, causing the restore error because SB doesn't build it. It's important to note that even if the restore had succeeded, it would have hit a prebuilt failure later on. |
|
I'm closing this PR and re-triggering. We need to pull in newer commits that break the cyclic dep. |
|
@zivkan thanks for chiming in here. We found the issue and it was a cyclic dependency kinda of. But interestingly, NuGet also crashed here. Might be something to guard against: |
|
I'm not a restore algorithm expert, so I sent a link to your comment to them. I don't understand the scenario well enough to create a repro, but does this sound like it's related? If not, and you're able to create a repro for easy local debugging, please create an issue over at NuGet/Home. |
Note
This is a codeflow update. It may contain both source code changes from the source repo as well as dependency updates. Learn more here.
This pull request brings the following source code changes
From https://github.com/dotnet/roslyn