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

Clean up warnings building CLR tests #34155

Merged
merged 1 commit into from
Mar 27, 2020
Merged

Conversation

jaredpar
Copy link
Member

The CLR test build was producing two different warnings:

  1. Invalid use of C# nullable reference types
  2. Double import of disableversioncheck.targets

Unwinding the double import was tricky due to the way several of the
projects in this tree were double built with different variables which
changed the directories that code was imported from. Eventually settled
on an old C++ trick of using a set variable to avoid the future double
import.

Not particularly happy with this trick but also not a clear way to
unwind the double imports here.

Overall these warnings snuck into the build because warn as error was
disabled for all the MSBuild invocations. That was apparently due to
coreclr#19922 which has long since been closed. Hence I flipped back on
warn as error here.

The CLR test build was producing two different warnings:
1. Invalid use of C# nullable reference types
1. Double import of disableversioncheck.targets

Unwinding the double import was tricky due to the way several of the
projects in this tree were double built with different variables which
changed the directories that code was imported from. Eventually settled
on an old C++ trick of using a set variable to avoid the future double
import.

Not particularly happy with this trick but also not a clear way to
unwind the double imports here.

Overall these warnings snuck into the build because warn as error was
disabled for all the MSBuild invocations. That was apparently due to
coreclr#19922 which has long since been closed. Hence I flipped back on
warn as error here.
Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

LGTM

powershell -NoProfile -ExecutionPolicy ByPass -NoLogo -Command "%__RepoRootDir%\eng\common\msbuild.ps1" %__ArcadeScriptArgs%^
%__ProjectDir%\tests\build.proj -warnAsError:0 /t:BatchRestorePackages /nodeReuse:false^
%__ProjectDir%\tests\build.proj -warnAsError:1 /t:BatchRestorePackages /nodeReuse:false^
Copy link
Member

Choose a reason for hiding this comment

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

Should this also be changed for Unix:

# Disable warnAsError - coreclr issue 19922
nextCommand="\"$__RepoRootDir/eng/common/msbuild.sh\" $__ArcadeScriptArgs --warnAsError false ${buildArgs[@]}"

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch. I have another PR coming up this afternoon. Will include this.

Wanted to get this merged so I can start getting the timeline dumps cleaner. Makes it significantly easier to see what is causing build flakiness that way.

@jaredpar
Copy link
Member Author

Most failures are known:

The XmlResolver failure appears to be a helix hiccup. I've started a FR thread to track this down:

@jaredpar jaredpar merged commit e0d1a99 into dotnet:master Mar 27, 2020
@jaredpar jaredpar deleted the import branch March 27, 2020 17:04
@BruceForstall
Copy link
Member

I don't know that warn-as-error is a good idea unless we have a way to force outerloop CI runs with any change that affects outerloop (or other non-innerloop pipeline).

@jaredpar
Copy link
Member Author

@BruceForstall the pendulum swings both ways here:

  1. Lack of warn as error let bugs go into core CI
  2. Warn as error blocks outerloop

My instinct though is to ask why aren't we building these assets in the core CI loop? Is building the tests that burdensome here?

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants