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

Enable restore for ref and src projects in libraries #33242

Merged
merged 44 commits into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
b3cf550
Enable restore for projects in libraries
ViktorHofer Mar 5, 2020
0ce2d86
Remove winrt.depproj
ViktorHofer Mar 5, 2020
f16320d
Remove tools.depproj
ViktorHofer Mar 5, 2020
760517e
Enable upfront restore
ViktorHofer Mar 5, 2020
bf91cc2
Stop flowing of package dependencies
ViktorHofer Mar 5, 2020
2e0cb60
Merge illink.tasks packageref with others
ViktorHofer Mar 5, 2020
6f9d305
Update TargetFramework.Sdk
ViktorHofer Mar 5, 2020
b80e055
Error task cleanup in composits
ViktorHofer Mar 5, 2020
6db735c
Add comments for Target ordering
ViktorHofer Mar 5, 2020
0202258
Set composit tfms to BuildTargetFramework
ViktorHofer Mar 5, 2020
7b063a1
Disable project restore for others
ViktorHofer Mar 5, 2020
c095003
Fix analyzers and build references in P2P
ViktorHofer Mar 6, 2020
7eb863e
Reenable codeanalysis package
ViktorHofer Mar 6, 2020
964fb2f
Fix casing of PInvokeAnalyzerException file
ViktorHofer Mar 6, 2020
317a436
Update global.json
ViktorHofer Mar 6, 2020
99074d8
Update Versions.props
ViktorHofer Mar 6, 2020
9522d84
Update Version.Details.xml
ViktorHofer Mar 6, 2020
3dd120b
Enable static graph evaluation for restore
ViktorHofer Mar 6, 2020
0cfae53
Make ApiCmpat.proj restorable
ViktorHofer Mar 7, 2020
ae5432a
Optimize restore and disable RestoreTaskEx meanwhile
ViktorHofer Mar 7, 2020
7d44c9c
Remove dir.traversal.tarets from depproj container
ViktorHofer Mar 7, 2020
3184f2a
Remove harvestPackages.depproj and refactoring
ViktorHofer Mar 7, 2020
af638ca
Fix WindowsRuntime test
ViktorHofer Mar 7, 2020
4c17df5
Revert dirs.proj depproj change
ViktorHofer Mar 8, 2020
7da6e40
Add sourcelink back to Tools.props
ViktorHofer Mar 8, 2020
2705614
Set ilasm/ildasm RID for restore
ViktorHofer Mar 8, 2020
b579b3d
Sequence restore into steps out of upfront restore
ViktorHofer Mar 9, 2020
0c1d442
Fix docker entrypoints by using build
ViktorHofer Mar 9, 2020
a492cf6
Move build of generate shims into ref.proj
ViktorHofer Mar 9, 2020
17a15cc
PR feedback
ViktorHofer Mar 9, 2020
273f9fd
Fixing enterprise pipeline
ViktorHofer Mar 9, 2020
5f78ca0
Revert dirs.proj depproj refactoring
ViktorHofer Mar 9, 2020
72c7458
Enable restore in dirs.proj libraries
ViktorHofer Mar 9, 2020
8638a58
It must work!!
ViktorHofer Mar 9, 2020
60d0600
Please work
ViktorHofer Mar 9, 2020
ef3e477
Fix one error at a time
ViktorHofer Mar 9, 2020
a6f4038
Add packages.proj to upfront restore
ViktorHofer Mar 10, 2020
aacea8c
Fix sequencing
ViktorHofer Mar 10, 2020
2f824ef
Remove unnecessary packageref
ViktorHofer Mar 10, 2020
6856d29
More fixes in ProjectRef composition
ViktorHofer Mar 10, 2020
7144258
Undo commented out lines in dirs.proj
ViktorHofer Mar 10, 2020
4f336ab
Sequence refs correctly and cleanup
ViktorHofer Mar 10, 2020
90fc025
Cleanup proj containers
ViktorHofer Mar 10, 2020
34e403c
Remove wrong condition
ViktorHofer Mar 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@

<!-- Resource naming bug: https://github.com/microsoft/msbuild/issues/4740 -->
<EmbeddedResourceUseDependentUponConvention>false</EmbeddedResourceUseDependentUponConvention>

<!-- Enable NuGet static graph evaluation to optimize incremental restore: https://github.com/dotnet/sdk/pull/10794 -->
<!-- <RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation> -->
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions docs/coding-guidelines/project-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ once before you can iterate and work on a given library project.
- Netstandard Library - Copy to `bin\ref\netstandard2.0`
- NetFx targeting pack - Copy to `bin\ref\net472`
- Build targeting pack
- Build src\ref.builds which builds all references assembly projects. For reference assembly project information see [ref](#ref)
- Build src\libraries\ref.proj which builds all references assembly projects. For reference assembly project information see [ref](#ref)
- Build product
- Build src\src.builds which builds all the source library projects. For source library project information see [src](#src).
- Build src\libraries\src.proj which builds all the source library projects. For source library project information see [src](#src).
- Sign product
- Build src\sign.proj

Expand Down
2 changes: 2 additions & 0 deletions eng/Analyzers.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<Project>
<PropertyGroup>
<CodeAnalysisRuleset>$(MSBuildThisFileDirectory)CodeAnalysis.ruleset</CodeAnalysisRuleset>
<!-- Disable analyzers in sourcebuild -->
<EnableAnalyzers Condition="'$(DotNetBuildFromSource)' == 'true'">false</EnableAnalyzers>
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
</PropertyGroup>
<ItemGroup Condition="'$(EnableAnalyzers)' == 'true'">
<PackageReference Include="Microsoft.DotNet.CodeAnalysis" Version="$(MicrosoftDotNetCodeAnalysisVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
Expand Down
9 changes: 7 additions & 2 deletions eng/Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
https://github.com/dotnet/arcade/issues/388
-->

<!-- Import to have access to properties/items used both during the Arcade phase and in the repo. -->
<Import Project="$(MSBuildThisFileDirectory)Configurations.props" />
<Import Project="$(MSBuildThisFileDirectory)Subsets.props" />

Expand Down Expand Up @@ -76,8 +77,12 @@
</ItemGroup>

<MSBuild Projects="@(RepoTaskProjects)"
Properties="Configuration=Debug;Platform=AnyCPU"
Targets="Restore;Build"/>
Properties="Configuration=Debug;Platform=AnyCPU;__BuildPhase=Restore"
Targets="Restore" />

<MSBuild Projects="@(RepoTaskProjects)"
Properties="Configuration=Debug;Platform=AnyCPU;__BuildPhase=Build"
Targets="Build" />

<WriteLinesToFile File="$(RepoTasksOutputFile)"
Lines="$(RepoTasksOutputFile)"
Expand Down
20 changes: 20 additions & 0 deletions eng/Configurations.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
<Project>
<!--
This file contains properties and items which are used in both the Arcade
steps and in the repository.
-->

<PropertyGroup>
<LibrariesProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'libraries'))</LibrariesProjectRoot>
<CoreClrProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'coreclr'))</CoreClrProjectRoot>
<MonoProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono'))</MonoProjectRoot>
<InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'installer'))</InstallerProjectRoot>
<RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'tools-local'))</RepoToolsLocalDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks'))</RepoTasksDir>
<IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir>
<XmlDocDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs'))</XmlDocDir>
</PropertyGroup>

<PropertyGroup>
<EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and '$(Configuration)' == 'Release'">true</EnableNgenOptimization>
</PropertyGroup>

<!-- Honor the generic RuntimeConfiguration property. -->
<PropertyGroup>
<RuntimeConfiguration Condition="'$(RuntimeConfiguration)' == ''">$(Configuration)</RuntimeConfiguration>
Expand Down
9 changes: 0 additions & 9 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@
artifacts to the test layout, then running the test subset.
-->

<PropertyGroup>
<LibrariesProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'libraries'))</LibrariesProjectRoot>
<CoreClrProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'coreclr'))</CoreClrProjectRoot>
<MonoProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'mono'))</MonoProjectRoot>
<InstallerProjectRoot>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src', 'installer'))</InstallerProjectRoot>
<RepoToolsLocalDir>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'tools-local'))</RepoToolsLocalDir>
<RepoTasksDir>$([MSBuild]::NormalizeDirectory('$(RepoToolsLocalDir)', 'tasks'))</RepoTasksDir>
</PropertyGroup>

<PropertyGroup>
<DefaultSubsetCategories>libraries-installer-coreclr-mono</DefaultSubsetCategories>
<DefaultInstallerSubsets>corehost-managed-depproj-pkgproj-bundle-installers-test</DefaultInstallerSubsets>
Expand Down
30 changes: 2 additions & 28 deletions eng/Tools.props
Original file line number Diff line number Diff line change
@@ -1,39 +1,13 @@
<Project>
<PropertyGroup>
<MSBuildTreatWarningsAsErrors>false</MSBuildTreatWarningsAsErrors>
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
<EnableAnalyzers>true</EnableAnalyzers>
</PropertyGroup>
<!-- Import to have access to properties/items used both during the Arcade phase and in the repo. -->
<Import Project="$(MSBuildThisFileDirectory)Configurations.props" />

<!-- We need to import this props file which contains PackageReferences to analyzers so that
analyzer build assets are imported via the Tools generated props and targets -->
<Import Project="$(RepositoryEngineeringDir)Analyzers.props" Condition="Exists('$(RepositoryEngineeringDir)Analyzers.props') and '$(DotNetBuildFromSource)' != 'true'" />

<!-- source-built packages -->
<ItemGroup>
<!-- arcade -->
<PackageReference Include="Microsoft.DotNet.GenFacades" Version="$(MicrosoftDotNetGenFacadesVersion)" />
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingVersion)" />

<!-- coreclr -->
<!-- Download the package in the initial arcade restore step to work around race conditions when restoring an msbuild SDK. -->
<PackageDownload Include="Microsoft.NET.Sdk.IL" Version="[$(MicrosoftNETSdkILVersion)]" />

<!-- roslyn -->
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="$(MicrosoftNetCompilersToolsetVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />

<!-- mono -->
<PackageReference Include="illink.tasks" Version="$(ILLinkTasksVersion)" PrivateAssets="all" IsImplicitlyDefined="true" ExcludeAssets="build" GeneratePathProperty="true" />
</ItemGroup>

<!-- excluded from offline portion of source build -->
<ItemGroup Condition="'$(DotNetBuildOffline)' != 'true'">
<!-- arcade -->
<PackageReference Include="Microsoft.DotNet.GenAPI" Version="$(MicrosoftDotNetGenApiVersion)" />
</ItemGroup>

<!-- excluded from source build -->
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'">
<PackageReference Include="Microsoft.DotNet.ApiCompat" Version="$(MicrosoftDotNetApiCompatVersion)" />
ViktorHofer marked this conversation as resolved.
Show resolved Hide resolved
<PackageReference Include="Microsoft.DotNet.Build.Tasks.Feed" Version="$(MicrosoftDotNetBuildTasksFeedVersion)" />
<PackageReference Include="Microsoft.DotNet.VersionTools.Tasks" Version="$(MicrosoftDotNetVersionToolsTasksVersion)" />

Expand Down
6 changes: 3 additions & 3 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>421b20fb860907c45673de791177e3fd61402197</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20153.1">
<Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20156.4">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>421b20fb860907c45673de791177e3fd61402197</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="5.0.0-beta.20153.1">
<Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="5.0.0-beta.20155.2">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>421b20fb860907c45673de791177e3fd61402197</Sha>
<Sha>bc4fa8e7149769db4efd466f160417a32b11f0bf</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="5.0.0-beta.20153.1">
<Uri>https://github.com/dotnet/arcade</Uri>
Expand Down
6 changes: 1 addition & 5 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
<UsingToolMicrosoftNetCompilers>true</UsingToolMicrosoftNetCompilers>
<UsingToolIbcOptimization>true</UsingToolIbcOptimization>
<UsingToolXliff>false</UsingToolXliff>
<!-- Paths used during restore -->
<EnableNgenOptimization Condition="'$(EnableNgenOptimization)' == '' and '$(Configuration)' == 'Release'">true</EnableNgenOptimization>
<IbcOptimizationDataDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'ibc'))</IbcOptimizationDataDir>
<XmlDocDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsBinDir)', 'docs'))</XmlDocDir>
<!-- Blob storage container that has the "Latest" channel to publish to. -->
<ContainerName>dotnet</ContainerName>
<ChecksumContainerName>$(ContainerName)</ChecksumContainerName>
Expand Down Expand Up @@ -60,7 +56,7 @@
<!-- Arcade dependencies -->
<MicrosoftDotNetApiCompatVersion>5.0.0-beta.20153.1</MicrosoftDotNetApiCompatVersion>
<MicrosoftDotNetBuildTasksFeedVersion>5.0.0-beta.20153.1</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20153.1</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20156.4</MicrosoftDotNetCodeAnalysisVersion>
<MicrosoftDotNetGenAPIVersion>5.0.0-beta.20153.1</MicrosoftDotNetGenAPIVersion>
<MicrosoftDotNetGenFacadesVersion>5.0.0-beta.20153.1</MicrosoftDotNetGenFacadesVersion>
<MicrosoftDotNetXUnitExtensionsVersion>5.0.0-beta.20153.1</MicrosoftDotNetXUnitExtensionsVersion>
Expand Down
51 changes: 0 additions & 51 deletions eng/codeAnalysis.targets

This file was deleted.

3 changes: 1 addition & 2 deletions eng/docker/build-docker-sdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ if ($buildWindowsContainers)
# Due to size concerns, we don't currently do docker builds on windows.
# Build on the host machine, then simply copy artifacts to the target docker image.
# This should result in significantly lower build times, for now.
& "$REPO_ROOT_DIR/coreclr.cmd" -c Release
& "$REPO_ROOT_DIR/libraries.cmd" -ci -c $configuration -runtimeConfiguration release
& "$REPO_ROOT_DIR/build.cmd" -ci -subsetcategory coreclr-libraries -runtimeconfiguration release -c $configuration

# Dockerize the build artifacts
docker build --tag $imageName `
Expand Down
3 changes: 1 addition & 2 deletions eng/docker/libraries-sdk.linux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ WORKDIR /repo
COPY . .

ARG CONFIGURATION=Release
RUN ./src/coreclr/build.sh -release -skiptests -clang9 && \
./libraries.sh -c $CONFIGURATION -runtimeconfiguration release
RUN ./build.sh -ci -subsetcategory coreclr-libraries -runtimeconfiguration release -c $CONFIGURATION

FROM $SDK_BASE_IMAGE as target

Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/libraries/enterprise/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ variables:
- name: enterpriseTestsSetup
value: $(sourcesRoot)/Common/tests/System/Net/EnterpriseTests/setup
- name: containerRunTestsCommand
value: /repo/.dotnet/dotnet build /t:test --no-restore
value: /repo/.dotnet/dotnet build /t:test
- name: containerLibrariesRoot
value: /repo/src/libraries

Expand All @@ -50,7 +50,7 @@ steps:
displayName: Test linuxclient connection to web server

- bash: |
docker exec linuxclient bash -c '/repo/src/coreclr/build.sh -release -skipnuget -clang9 && /repo/libraries.sh /p:CoreCLRConfiguration=Release'
docker exec linuxclient bash -c '/repo/build.sh -subsetcategory coreclr-libraries -runtimeconfiguration release -ci'
displayName: Build product sources

- bash: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<Project InitialTargets="AddPackageDownload" Sdk="Microsoft.NET.Sdk">
<Project InitialTargets="AddPackageDownload">
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<PackagingTaskAssembly>$(NuGetPackageRoot)microsoft.dotnet.build.tasks.packaging\$(MicrosoftDotNetBuildTasksPackagingVersion)\tools\</PackagingTaskAssembly>
<PackagingTaskAssembly Condition="'$(MSBuildRuntimeType)' == 'core'">$(PackagingTaskAssembly)netcoreapp2.1\</PackagingTaskAssembly>
<PackagingTaskAssembly Condition="'$(MSBuildRuntimeType)' != 'core'">$(PackagingTaskAssembly)net472\</PackagingTaskAssembly>
<PackagingTaskAssembly>$(PackagingTaskAssembly)Microsoft.DotNet.Build.Tasks.Packaging.dll</PackagingTaskAssembly>
</PropertyGroup>

<Import Project="$(PkgDir)baseline/baseline.props" />

<!-- only restore this project during the build, don't copy any of it's packages
The sole purpose of this project is to download packages that can be examined
for harvesting binaries & support. -->
<Target Name="Build" DependsOnTargets="RestorePackages" />
<Import Project="$(LibrariesProjectRoot)pkg\baseline\baseline.props" />

<UsingTask TaskName="GetLastStablePackage" AssemblyFile="$(PackagingTaskAssembly)"/>
<Target Name="AddPackageDownload">
<ItemGroup>
<_AllPkgProjs Include="$(LibrariesProjectRoot)*\pkg\**\*.pkgproj" />
Expand All @@ -20,10 +19,10 @@
</ItemGroup>

<GetLastStablePackage
LatestPackages="@(_AllPkgProjsToPackageIdentity)"
PackageIndexes="$(PackageIndexFile)"
DoNotAllowVersionsFromSameRelease="true">
<Output TaskParameter="LastStablePackages" ItemName="_PackageDownload" />
LatestPackages="@(_AllPkgProjsToPackageIdentity)"
PackageIndexes="$(PackageIndexFile)"
DoNotAllowVersionsFromSameRelease="true">
<Output TaskParameter="LastStablePackages" ItemName="_PackageDownload" />
</GetLastStablePackage>

<!-- Allow to override package download and versions in case there is already a PackageDownload set -->
Expand All @@ -40,5 +39,4 @@
</PackageDownload>
</ItemGroup>
</Target>

</Project>
2 changes: 1 addition & 1 deletion eng/restore/repoRestore.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
<ComputeNETCoreBuildOutputFiles>false</ComputeNETCoreBuildOutputFiles>
<GenerateRuntimeConfigurationFiles>false</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
</Project>
</Project>
2 changes: 0 additions & 2 deletions eng/restore/repoRestore.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<RestoreProjectStyle Condition="'$(MSBuildProjectExtension)' != '.depproj'">Unknown</RestoreProjectStyle>
</PropertyGroup>

<Import Project="$(RepositoryEngineeringDir)codeAnalysis.targets" />

<PropertyGroup>
<!-- Nuget will normally disable all generated imports as part of a restore to avoid
non-determinism where first restore changes a subsequent restore,
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"python": "2.7.15"
},
"msbuild-sdks": {
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20153.1",
"Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20156.4",
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20153.1",
"Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20153.1",
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20153.1",
Expand Down
Loading