-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Conversation
…into buildwork
Capture logs from test runs Tweak Directory.Build.props use from runtest.proj and xunitconsolerunner so that it "works"
/azp help |
Supported commands
See additional documentation. |
/azp run coreclr-ci |
Pull request contains merge conflicts. |
c417065
to
a7dd5b4
Compare
@@ -0,0 +1,2 @@ | |||
<Project> |
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.
What is the purpose of this file? Do you mind adding it as a comment in the file?
@@ -324,7 +324,7 @@ for /l %%G in (1, 1, %__NumberOfTestGroups%) do ( | |||
|
|||
if not "%__CopyNativeTestBinaries%" == "1" ( | |||
REM Disable warnAsError - coreclr issue 19922 | |||
set __MSBuildBuildArgs=!__ProjectDir!\tests\build.proj -warnAsError:0 !__Logging! !TargetsWindowsMsbuildArg! !__msbuildArgs! !__PriorityArg! !__UnprocessedBuildArgs! /p:CopyNativeProjectBinaries=!__CopyNativeProjectsAfterCombinedTestBuild! | |||
set __MSBuildBuildArgs=!__ProjectDir!\tests\build.proj -warnAsError:0 /nodeReuse:false !__Logging! !TargetsWindowsMsbuildArg! !__msbuildArgs! !__PriorityArg! !__UnprocessedBuildArgs! /p:CopyNativeProjectBinaries=!__CopyNativeProjectsAfterCombinedTestBuild! |
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.
Thank you for adding nodeReuse=false!
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.
We should make a note to set nodeReuse to false in configure-toolset.ps1/sh (separately from this change).
@@ -302,6 +302,7 @@ if /i %__BuildType% NEQ Release set __RestoreOptData=0 | |||
|
|||
set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%" | |||
set "__IntermediatesDir=%__RootBinDir%\obj\%__BuildOS%.%__BuildArch%.%__BuildType%" | |||
set "__ArtifactsIntermediatesDir=%__ProjectDir%\artifacts\obj\" |
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 we no longer using bin/obj
?
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 native ones still in bin/obj
? Might be worth commenting.
@@ -321,6 +322,9 @@ if not exist "%__IntermediatesDir%" md "%__IntermediatesDir%" | |||
if not exist "%__LogsDir%" md "%__LogsDir%" | |||
if not exist "%__MsbuildDebugLogsDir%" md "%__MsbuildDebugLogsDir%" | |||
|
|||
if not exist "%__RootBinDir%\Directory.Build.props" copy %__ProjectDir%\EmptyProps.props %__RootBinDir%\Directory.Build.props |
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.
Same as emptyprops, this seems to need comments explaining what this is doing and why.
@@ -430,7 +434,7 @@ REM === | |||
REM ========================================================================================= | |||
|
|||
set __IntermediatesIncDir=%__IntermediatesDir%\src\inc | |||
set __IntermediatesEventingDir=%__IntermediatesDir%\Eventing | |||
set __IntermediatesEventingDir=%__ArtifactsIntermediatesDir%\Eventing\%__BuildArch%\%__BuildType% |
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.
+1 for buildarch and build type. Could you also add OS?
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.
This matches with where the Arcade logic puts stuff. I'm not changing that.
@@ -1,6 +1,6 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<Import Project="$([MSBuild]::GetPathOfFileAbove(dir.props))" /> | |||
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" /> |
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.
Same issue as the ilasm pkgproj
@@ -419,7 +417,7 @@ | |||
</ItemGroup> | |||
<Import Project="shared\System.Private.CoreLib.Shared.projitems" /> | |||
<PropertyGroup> | |||
<CheckCDefines Condition="'$(CheckCDefines)'==''">true</CheckCDefines> | |||
<CheckCDefines Condition="'$(CheckCDefines)'=='' And '$(PYTHON)' != ''">true</CheckCDefines> |
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.
It seems like silently avoiding checks if python is not installed is incorrect. My opinion would be to allow it to fail, and we create a follow up future work item to convert the check to msbuild.
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.
Mmm. I don't need to make this change at all. Its really just a convenience as I prefer for it to be possible to compile major projects in the tree without specifying any special parameters to the msbuild command. I'll remove this adjustment.
@@ -1,6 +1,6 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<Import Project="src\dir.props" /> | |||
<Import Project="Directory.Build.props" /> |
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.
This also should probably be an sdk style project.
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.
Converting .proj files into sdk style projects does odd things. If we need to do that, it should be a separate change.
tests/Directory.Build.props
Outdated
<!-- Add test-specific package restore sources. --> | ||
<PropertyGroup> | ||
<RestoreSources Condition="'$(DotNetBuildOffline)' != 'true'"> | ||
https://dotnet.myget.org/F/dotnet-corefxlab/api/v3/index.json; | ||
https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json; |
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.
Why were these added, and would it be possible to put them in NuGet.Config instead? Arcade is recommending to move away from RestoreSources
: https://github.com/dotnet/arcade/blob/f8fc65bce78b79d00c66cb22ff658fb3a3e46dfb/Documentation/RestoreSourcesUpdateStatus.md.
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.
Well, we weren't using nuget.config in our test builds at all. But the move to unify the properties resulted in an empty RestoreSources at this point in the build. This then added a single entry, and that wasn't sufficient for restore to work. I've moved the test build process to use nuget.config and that appears to work fine. Nice catch.
dependencies.props
Outdated
@@ -11,9 +11,6 @@ | |||
</RestoreSources> |
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.
Can we remove RestoreSources
now that everything is through Arcade? These should be set in the repo's nuget.config already.
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 we can. See my response to @sbomer
@@ -11,9 +11,6 @@ | |||
</RestoreSources> | |||
</PropertyGroup> | |||
|
|||
<!-- [ARCADE REMOVE] Versions.props is imported by Arcade SDK targets when building with Arcade --> | |||
<Import Project="eng/Versions.props" Condition="'$(ArcadeBuild)' != 'true'" /> | |||
|
|||
<!-- Source of truth for dependency tooling: the commit hash of the dotnet/versions master branch as of the last auto-upgrade. --> |
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.
How exactly do all these dependency tooling / auto-upgrade properties get used?
From the comments in this file (and only finding references to them in Microsoft.DotNet.VersionTools), I'd think we don't need or want them always chained in by the top-level Directory.Build.props?
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.
To be honest, I have no idea what any of the dependency stuff does. I don't think these changes I've made don't actually add these to our build, they have always been there.
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.
Yeah, just noticed that it is always being included now (by the top-level .props), which doesn't seem to hurt anything, but might be good to clean up. Maybe @sbomer knows from his work to consume Microsoft.DotNet.VersionTools for updating published versions?
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.
I'm not familiar with them either - they were used for buildtools dependency flow, and we can probably get rid of most of them now that we're on arcade. I'd need to go through them one-by-one to see which ones are still required for VersionTools.
dir.common.props
Outdated
<!-- Default to portable build if not explicitly set --> | ||
<PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild> | ||
|
||
<OverrideRestoreOutputPath>true</OverrideRestoreOutputPath> |
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.
I think this property was for BuildTools
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.
I dunno. There don't appear to be any uses of it. So I've removed it.
@@ -1,7 +1,7 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
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.
Everything in this file should only be needed for .pkgproj files. It seems unnatural to me that, with this rename, all the SDK-style projects (.builds) - which only need the Directory.Build.targets in the parent directory - will automatically chain this in, while the non-SDK-style projects (.pkgproj) - which actually need the settings directly in the file - still need to explicitly chain this in.
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.
Everything is now hierarchical. Yes, its not ideal to add pollution to the .builds files, but its consistent, and non-harmful.
<Import Project="../Directory.Build.props" /> | ||
<Import Project="packaging.props" /> |
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.
These two imports are the only things that packages.builds
needs from this file. I guess it isn't actually breaking anything right now, but it seems like adding noise.
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.
Everything is now hierarchical. Yes, its not ideal to add pollution to the .builds files, but its consistent, and non-harmful.
<!-- This file is intentionally empty. It is copied by build.cmd into the bin directory as both Directory.Build.props | ||
and Directory.Build.targets to prevent CMake built projects from dependending on the Directory.Build infrastructure | ||
in the root of the source tree. In particular this was necessary to compile DacTableGen, which is currently compiled | ||
against the desktop framework. |
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.
Can we configure the generated projects in CMake such that they set ImportDirectoryBuildProps
and ImportDirectoryBuildTargets
to false?
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.
No
src/.nuget/Directory.Build.props
Outdated
<Import Project="packaging.props" /> | ||
|
||
<!-- Allow specialization of the packaging by creating a props file of the same name of the project immediately next to the project --> | ||
<Import Condition="Exists('$(MSBuildProjectDirectory)/$(MSBuildProjectName).props')" Project="$(MSBuildProjectDirectory)/$(MSBuildProjectName).props"/> |
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.
Did you have a chance to try renaming the Microsoft.NETCore.Native.props instead? I think it should work and it would be more in line with msbuild's existing system for customization.
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.
Yeah, that looks to work.
/azp list |
CI/CD Pipelines for this repository: |
/azp run coreclr-outerloop |
Azure Pipelines successfully started running 1 pipeline(s). |
@elinor-fung could you take a look and confirm that your concerns have been addressed? |
tests/build.proj
Outdated
@@ -1,14 +1,14 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<Import Project="dir.props" /> | |||
<Import Project="Directory.Build.props" /> | |||
|
|||
<Import Project="$(ToolsDir)VersionTools.targets" Condition="Exists('$(ToolsDir)VersionTools.targets')" /> |
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.
Remove? Pretty sure ToolsDir
was for BuildTools
@@ -27,7 +27,6 @@ | |||
<RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers> | |||
<IsTestProject>false</IsTestProject> | |||
</PropertyGroup> | |||
<Import Project="$(MSBuildThisFileDirectory)..\src\dir.targets" /> |
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.
Does this need to explicitly pull in a Directory.Build.targets?
@davidwrighton yeah, I think I'm generally okay with the product - honestly, did not look hard at the tests... |
No description provided.