-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Fix some fast up to date check issues in VS #32140
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
Tagging @KirillOsenkov, just because I always do when messing with FastUpToDateCheck, and @drewnoakes because there is one case I still don't understand. Remaining issues:
172, 413, 458, and 494 are projects that don't actually generate an output assembly. Any idea how to make them play nicer with the fast up to date check @dotnet/aspnet-build or @drewnoakes. 410 is the one that is puzzling me. I don't actually know what that log means. @drewnoakes can you help me out? |
...ponents/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj
Show resolved
Hide resolved
...ssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj
Show resolved
Hide resolved
src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj
Show resolved
Hide resolved
src/SignalR/clients/ts/FunctionalTests/SignalR.Client.FunctionalTestApp.csproj
Show resolved
Hide resolved
If you're looking at the build, I randomly noticed there are a couple of pending changes after a clean build (file BOM changes?) to blazor.server.js and a couple launchSettings.json files in tests rejiggered. |
Regarding 410, if you have a binlog, look at the timing of file writes for the CopyComplete markers - why is the CopyComplete marker for the Tests project written earlier than the marker for the non-test project? Could be insufficient build ordering?? (just random guesses here) |
You can append |
Hmm I've just realized it's the VS build, not command-line, it's harder to get a decent binlog that involves both projects. Not sure how to investigate this. If you keep building, does it still rebuild every time? |
You can remove the output item from the build, however if that leaves no outputs then the fast up-to-date check will always build it.
It looks like the dependency from |
There seems to be a bunch of special handling of |
@drewnoakes it did seem to be consistent. @pranavkm / @captainsafia for the potential Razor SDK impact. I feel like we struggled with projects that produced no output assembly other places too. @jasonmalinowski do you have any ideas there? Does Roslyn do anything interesting? |
Roslyn has a few projects we are really using for packaging; right now those build time. I haven't looked at fighting with it, maybe @tmat might know details. |
That particular change only affects .NET 5 and below projects where we still produced a Views assembly. I don't suspect this will come into play with the changes here since we are targetting net6.0 and above. |
...ponents/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj
Show resolved
Hide resolved
src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj
Show resolved
Hide resolved
e6a247e
to
dbeacda
Compare
@BrennanConroy / @HaoK if this passes, any objection to merging? There are still a few projects that don't produce outputs where the fast up to date check fails, but @drewnoakes is looking at those. There are also two Blazor identity projects with issues, but I'll ask @javiercn to look at them when he's back. Regardless, this set of changes should reduce needless rebuilds in VS significantly. |
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.
Looks good to me
Would be nice if NativeProjectReference handled the UpToDateCheckInput for us though 😃
Agreed, but @rainersigwald said there isn't a reliable way to go from vcxproj -> output. Otherwise, we might be able to do it in our |
I though they had to be evaluation time constant but that might be wrong: https://github.com/dotnet/project-system/blob/c954a632f74afdac9118a1f505257107789ff00e/docs/up-to-date-check.md#customization talks about a target. So it might be doable to add the NativeContent item to UpToDateCheckInput after RAR/design-time RAR. @drewnoakes, that might be worth clarifying in that doc. |
...ponents/WebAssembly/Authentication.Msal/src/Microsoft.Authentication.WebAssembly.Msal.csproj
Show resolved
Hide resolved
...ssembly.Authentication/src/Microsoft.AspNetCore.Components.WebAssembly.Authentication.csproj
Show resolved
Hide resolved
src/DefaultBuilder/test/Microsoft.AspNetCore.Tests/Microsoft.AspNetCore.Tests.csproj
Show resolved
Hide resolved
...zation.IdentityServer/test/Microsoft.AspNetCore.ApiAuthorization.IdentityServer.Tests.csproj
Outdated
Show resolved
Hide resolved
<UpToDateCheckInput Include="$(AspNetCoreModuleV2OutOfProcessHandlerDll)" /> | ||
<UpToDateCheckInput Include="$(AspNetCoreModuleV2ShimDll)" /> |
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.
Would it help to set $(GeneratePackageOnBuild)
to true
and add an @(UpToDateCheckBuilt)
item for the produced package❔
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.
Are you proposing that to solve the fact that this project doesn't generate an output assembly, or for some other reason?
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.
Yes, to solve the lack of an output assembly -- if it works 😃
(Someone should fix the "compatibility" spelling in the doc too 😃) |
@rainersigwald yes, you can modify the set of I'm unclear on the clarification you're after though.
@dougbu I know you edited this, but regardless: you're right, this is confusing. I've removed mention of the deprecation in dotnet/project-system#7840. Technically
@KirillOsenkov since then you pointed me to the use of @Pilchie can you suggest a solution filter and project to test the no-output case with? I've burnt my budget today on trying to get the solution building locally. Narrowing to a subset of projects might be helpful. |
|
Is the idea here to do something like: <Target Name="CollectUpToDateCheckInputDesignTime" AfterTargets="ResolveAssemblyReference">
<UpToDateCheckInput Include="@(NativeContent)" />
</Target> And that would solve our native references? @drewnoakes / @rainersigwald - does that look right? |
That's the idea. Check the implementation of that target in the .NET project system and make sure it's returning the same thing. From memory (I'm on a phone) you need I guess our documentation can be improved here with an example. I'll do that when I'm back. |
Unable to repro the two npm/yarn projects writing to their own inputs today 🤷🏻♂️ . |
Still looking if I can do something better with native content and no output projects, but I'm going to merge this in the meantime. |
Fix several issues:
There are still 3 projects that don't build properly, and 5 that fail the fast up to date check for me with this, but getting closer.