Skip to content

Fix incremental build failures#58429

Merged
sharwell merged 4 commits into
dotnet:mainfrom
sharwell:incremental-build
Jan 4, 2022
Merged

Fix incremental build failures#58429
sharwell merged 4 commits into
dotnet:mainfrom
sharwell:incremental-build

Conversation

@sharwell
Copy link
Copy Markdown
Contributor

No description provided.

These projects were expecting but not creating XML documentation files.
These projects were expecting but not creating output binaries.
@sharwell sharwell requested a review from a team as a code owner December 20, 2021 18:43
@ghost ghost added the Area-Infrastructure label Dec 20, 2021
Copy link
Copy Markdown
Contributor

@Forgind Forgind left a comment

Choose a reason for hiding this comment

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

I'm assuming you don't have any files that aren't copied in the list?

Comment thread eng/targets/Imports.targets
@sharwell
Copy link
Copy Markdown
Contributor Author

sharwell commented Jan 4, 2022

I'm assuming you don't have any files that aren't copied in the list?

@Forgind I'm not sure I understand the question here

-->
<PropertyGroup Condition="'$(RunAnalyzersDuringBuild)' == ''">
<RunAnalyzersDuringBuild Condition="'$(DesignTimeBuild)' != 'true' AND '$(ContinuousIntegrationBuild)' != 'true' AND !('$(RoslynEnforceCodeStyle)' == 'true' OR '$(RunCodeAnalysis)' == 'true')">false</RunAnalyzersDuringBuild>
<RunAnalyzersDuringBuild Condition="'$(RoslynEnforceCodeStyle)' != 'true' AND '$(RunCodeAnalysis)' != 'true'">false</RunAnalyzersDuringBuild>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this change required for this fix or is just a cleanup?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

➡️ Required for this fix

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This line fixes the following error:

1>FastUpToDate: Input UpToDateCheckInput item 'C:\dev\roslyn\artifacts\obj\Microsoft.CodeAnalysis.XunitHook\Debug\net472\Microsoft.CodeAnalysis.XunitHook.csproj.BuildWithSkipAnalyzers' is newer (1/4/2022 7:24:46 AM) than earliest output 'C:\dev\roslyn\artifacts\obj\Microsoft.CodeAnalysis.XunitHook\Debug\net472\Microsoft.CodeAnalysis.XunitHook.xml' (1/4/2022 7:24:46 AM), not up to date. (Microsoft.CodeAnalysis.XunitHook)

Copy link
Copy Markdown
Contributor

@mavasani mavasani left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for fixing this Sam!

<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>
<Import Project="..\..\..\Directory.Build.targets" />
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need this set of changes?

Copy link
Copy Markdown
Contributor Author

@sharwell sharwell Jan 4, 2022

Choose a reason for hiding this comment

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

This is not strictly required, but it unifies all cases where a nested Directory.Build.targets is provided to import PackageProject.targets (previously the Import line varied based on file location, so copy/paste was potentially problematic). All copies of this file are now identical.

@sharwell sharwell merged commit d97ec05 into dotnet:main Jan 4, 2022
@ghost ghost added this to the Next milestone Jan 4, 2022
@sharwell sharwell deleted the incremental-build branch January 4, 2022 18:37
@Forgind
Copy link
Copy Markdown
Contributor

Forgind commented Jan 4, 2022

I'm assuming you don't have any files that aren't copied in the list?

@Forgind I'm not sure I understand the question here

That wasn't very clear, and I actually don't remember what exactly I meant. I believe the bug BenVillalobos had been trying to fix was when a file is in the list of files to copy but shouldn't actually be copied for some other reason, so it's skipped. If we keep touching the CopyUpToDate marker, it can keep building. I think that was a somewhat unusual case? But worth verifying that building several times in a row doesn't rebuild the target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants