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

Work around MSBuild task ordering bug #74205

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Conversation

jjonescz
Copy link
Member

Fixes #74156.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Issues and PRs which have not yet been triaged by a lead label Jun 28, 2024
@@ -60,6 +60,9 @@

<!-- TODO -->
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>

<!-- https://github.com/dotnet/msbuild/issues/10306 -->
<CoreCompileDependsOn>$(CoreCompileDependsOn);ResolveKeySource</CoreCompileDependsOn>
Copy link
Member

Choose a reason for hiding this comment

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

This will solve the immediate issue but I'm worried about other similar target dependencies. No objection to checking it in but I'm not sure it'll fix everything.

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 have actually seen some more non deterministic issues while having this fix locally, so we should probably solve differently. Thanks

@arkalyanms
Copy link
Member

@jjonescz / @rainersigwald until the msbuild fix comes in from dotnet/msbuild#10306 (comment), can we publish and check this in?

@jjonescz
Copy link
Member Author

jjonescz commented Jul 9, 2024

I'm not 100% sure this won't cause other issues, but if you are observing the bug and can try this out locally to verify it works, then we can merge it.

cc @CyrusNajmabadi

@CyrusNajmabadi
Copy link
Member

Unfortunately, this branch fails to build/restore. It causes:

image

@CyrusNajmabadi
Copy link
Member

restore in VS is also failing:

Failed to restore D:\github\roslyn\src\Tools\BuildBoss\BuildBoss.csproj (in 21 ms).
Failed to restore D:\github\roslyn\src\Tools\ExternalAccess\RazorCompiler\Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.csproj (in 22 ms).
Failed to restore D:\github\roslyn\src\Tools\AnalyzerRunner\AnalyzerRunner.csproj (in 22 ms).
Failed to restore D:\github\roslyn\src\Tools\GenerateRulesMissingDocumentation\GenerateRulesMissingDocumentation.csproj (in 21 ms).
Failed to restore D:\github\roslyn\src\Tools\ExternalAccess\Razor\Microsoft.CodeAnalysis.ExternalAccess.Razor.csproj (in 21 ms).
Failed to restore D:\github\roslyn\src\Features\Core\Portable\Microsoft.CodeAnalysis.Features.csproj (in 27 ms).
Failed to restore D:\github\roslyn\src\Tools\ExternalAccess\RazorCompilerTest\Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.UnitTests.csproj (in 23 ms).
Failed to restore D:\github\roslyn\src\Features\ExternalAccess\AspNetCore\Microsoft.CodeAnalysis.ExternalAccess.AspNetCore.csproj (in 21 ms).
Failed to restore D:\github\roslyn\src\Tools\BuildValidator\BuildValidator.csproj (in 21 ms).

Causing major failures in VS:

image

@jjonescz
Copy link
Member Author

jjonescz commented Jul 9, 2024

Unfortunately, this branch fails to build/restore. It causes:

This branch is not up to date, please just try the change on latest main.

Those NU1010 errors were fixed by #74299.

@CyrusNajmabadi
Copy link
Member

CyrusNajmabadi commented Jul 9, 2024

Have merged main in:

image

I get:

image

@CyrusNajmabadi
Copy link
Member

CyrusNajmabadi commented Jul 9, 2024

@jjonescz What would you need to be able to move forward on this. Right now the core issue is preventing being able to dev in VS reasonably :( Thanks very much for your help!

@jjonescz
Copy link
Member Author

jjonescz commented Jul 9, 2024

From the picture it doesn't look like the latest main is merged in, I see #74291 as the last commit in the main you merged if I interpret the picture correctly. That doesn't have the fix from today. I have updated this branch with the latest main now.

@jjonescz
Copy link
Member Author

jjonescz commented Jul 9, 2024

What would you need to be able to move forward on this. Right now the core issue is preventing being able to dev in VS reasonably :( Thanks very much for your help!

If this workaround doesn't work, let me know, I can look again to see if there is a better workaround or if we can flow the internal fix here sooner.

@arkalyanms
Copy link
Member

The internal fix is getting inserted into VS now via https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/563555. ETA tonight.

@jjonescz
Copy link
Member Author

The internal fix is getting inserted into VS now via https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/563555. ETA tonight.

Don't we need the VSSDK packages to be updated in Roslyn? I've tried that in #74329 but tests are failing, it's outside my area of expertise.

@arkalyanms
Copy link
Member

The internal fix is getting inserted into VS now via https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/563555. ETA tonight.

Don't we need the VSSDK packages to be updated in Roslyn? I've tried that in #74329 but tests are failing, it's outside my area of expertise.

Yes I ve sent the PR to the Extensibility team you validate the version that got published. In the meantime, we would want to work with our infra on test failures.

@jjonescz
Copy link
Member Author

I'm not sure if we can easily update VSSDK, see #74329 (comment).

But from #74320 (comment) I understand this workaround works for @CyrusNajmabadi, so perhaps we can merge it in the meantime.

@CyrusNajmabadi CyrusNajmabadi merged commit 1f4d6a0 into dotnet:main Jul 11, 2024
29 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 11, 2024
@RikkiGibson RikkiGibson modified the milestones: Next, 17.12 P1 Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can only build Roslyn.sln a single time before building breaks (2)
5 participants