Skip to content

Commit

Permalink
Merge pull request #73408 from dotnet/darc-main-2d23f62f-5696-4b5e-91…
Browse files Browse the repository at this point in the history
…03-23a78af8f6f0

[main] Update dependencies from dotnet/arcade
  • Loading branch information
jaredpar authored May 16, 2024
2 parents 50f7484 + 22c5933 commit f086d7c
Show file tree
Hide file tree
Showing 115 changed files with 3,042 additions and 4,101 deletions.
10 changes: 9 additions & 1 deletion docs/contributing/Target Framework Strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Projects in our repository should include the following values in `<TargetFramew
5. `$(NetRoslyn)`: code that needs to execute on .NET but does not have any specific product deployment requirements. For example utilities that are used by our infra, compiler unit tests, etc ... This property also controls which of the frameworks the compiler builds against are shipped in the toolset packages. This value will potentially change in source builds.
6. `$(NetRoslynAll)`: code, generally test utilities, that need to build for all .NET runtimes that we support.
7. `$(NetRoslynBuildHostNetCoreVersion)`: the target used for the .NET Core BuildHost process used by MSBuildWorkspace.
8. `$(NetRoslynNext)`: code that needs to run on the next .NET Core version. This is used during the transition to a new .NET Core version where we need to move forward but don't want to hard code a .NET Core TFM into the build files.

This properties `$(NetCurrent)`, `$(NetPrevious)` and `$(NetMinimum)` are not used in our project files because they change in ways that make it hard for us to maintain corect product deployments. Our product ships on VS and VS Code which are not captured by arcade `$(Net...)` macros. Further as the arcade properties change it's very easy for us to end up with duplicate entries in a `<TargetFarmeworks>` setting. Instead our repo uses the above values and when inside source build or VMR our properties are initialized with arcade properties.

Expand Down Expand Up @@ -58,7 +59,7 @@ This problem primarily comes from our use of polyfill APIs. To avoid this we emp
This comes up in two forms:

### Pattern for types
### Pattern for types

When creating a polyfill for a type use the `#if !NET...` to declare the type and in the `#else` use a `TypeForwardedTo` for the actual type.

Expand Down Expand Up @@ -99,6 +100,13 @@ When creating a polyfill for an extension use the `#if NET...` to declare the ex
#endif
```

## Transitioning to new .NET SDK

As the .NET team approaches releasing a new .NET SDK the Roslyn team will begin using preview versions of that SDK in our build. This will often lead to test failures in our CI system due to underlying behavior changes in the runtime. These failures will often not show up when running in Visual Studio due to the way the runtime for the test runner is chosen.

To ensure we have a simple developer environment such project should be moved to to the `$(NetRoslynNext)` target framework. That ensures the new runtime is loaded when running tests locally.

When the .NET SDK RTMs and Roslyn adopts it all occurrences of `$(NetRoslynNext)` will be moved to simply `$(NetRoslyn)`.

**DO NOT** include both `$(NetRoslyn)` and `$(NetRoslynNext)` in the same project unless there is a very specific reason that both tests are adding value. The most common case is that the runtime has changed behavior and we simply need to update our baselines to match it. Adding extra TFMs for this just increases test time for very little gain.

6 changes: 4 additions & 2 deletions eng/SourceBuildPrebuiltBaseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis.VisualBasic.CodeStyle/*" />
<UsagePattern IdentityGlob="Microsoft.Net.Compilers.Toolset/*" />

<!-- Roslyn's source-build CI builds both NetPrevious and NetCurrent. This 7.0 ref pack shows up as
<!-- Roslyn's source-build CI builds both NetPrevious and NetCurrent. This 7.0 / 8.0 ref pack shows up as
prebuilt only for the repo CI build but not full source-build. -->
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/7.0*" />
<UsagePattern IdentityGlob="Microsoft.AspNetCore.App.Ref/8.0*" />

<!-- Roslyn's source-build CI builds both NetPrevious and NetCurrent. This 7.0 ref pack shows up as
<!-- Roslyn's source-build CI builds both NetPrevious and NetCurrent. This 7.0 / 8.0 ref pack shows up as
prebuilt only for the repo CI build but not full source-build. -->
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/7.0*" />
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Ref/8.0*" />

<!-- This is upgraded to latest version in full source-build and can be baselined for repo build -->
<UsagePattern IdentityGlob="Microsoft.Extensions.Configuration*/8.0*" />
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.24225.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24265.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>67d23f4ba1813b315e7e33c71d18b63475f5c5f8</Sha>
<Sha>15eea424d3b2dd25a5c0b10e8adc8aeed50129a1</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="8.0.0-beta.24225.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.arcade" Version="9.0.0-beta.24265.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>67d23f4ba1813b315e7e33c71d18b63475f5c5f8</Sha>
<Sha>15eea424d3b2dd25a5c0b10e8adc8aeed50129a1</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.XliffTasks" Version="1.0.0-beta.23475.1" CoherentParentDependency="Microsoft.DotNet.Arcade.Sdk">
Expand All @@ -144,9 +144,9 @@
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>5d10d428050c0d6afef30a072c4ae68776621877</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.24225.1">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24265.1">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>67d23f4ba1813b315e7e33c71d18b63475f5c5f8</Sha>
<Sha>15eea424d3b2dd25a5c0b10e8adc8aeed50129a1</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0-preview.23468.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
Expand Down
3 changes: 3 additions & 0 deletions eng/common/build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0build.ps1""" %*"
exit /b %ErrorLevel%
3 changes: 3 additions & 0 deletions eng/common/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Param(
[switch] $pack,
[switch] $publish,
[switch] $clean,
[switch][Alias('pb')]$productBuild,
[switch][Alias('bl')]$binaryLog,
[switch][Alias('nobl')]$excludeCIBinarylog,
[switch] $ci,
Expand Down Expand Up @@ -58,6 +59,7 @@ function Print-Usage() {
Write-Host " -sign Sign build outputs"
Write-Host " -publish Publish artifacts (e.g. symbols)"
Write-Host " -clean Clean the solution"
Write-Host " -productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)"
Write-Host ""

Write-Host "Advanced settings:"
Expand Down Expand Up @@ -120,6 +122,7 @@ function Build {
/p:Deploy=$deploy `
/p:Test=$test `
/p:Pack=$pack `
/p:DotNetBuildRepo=$productBuild `
/p:IntegrationTest=$integrationTest `
/p:PerformanceTest=$performanceTest `
/p:Sign=$sign `
Expand Down
15 changes: 14 additions & 1 deletion eng/common/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ usage()
echo " --sourceBuild Source-build the solution (short: -sb)"
echo " Will additionally trigger the following actions: --restore, --build, --pack"
echo " If --configuration is not set explicitly, will also set it to 'Release'"
echo " --productBuild Build the solution in the way it will be built in the full .NET product (VMR) build (short: -pb)"
echo " Will additionally trigger the following actions: --restore, --build, --pack"
echo " If --configuration is not set explicitly, will also set it to 'Release'"
echo " --rebuild Rebuild solution"
echo " --test Run all unit tests in the solution (short: -t)"
echo " --integrationTest Run all integration tests in the solution"
Expand Down Expand Up @@ -59,6 +62,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
restore=false
build=false
source_build=false
product_build=false
rebuild=false
test=false
integration_test=false
Expand Down Expand Up @@ -105,7 +109,7 @@ while [[ $# > 0 ]]; do
-binarylog|-bl)
binary_log=true
;;
-excludeCIBinarylog|-nobl)
-excludecibinarylog|-nobl)
exclude_ci_binary_log=true
;;
-pipelineslog|-pl)
Expand All @@ -126,6 +130,13 @@ while [[ $# > 0 ]]; do
-sourcebuild|-sb)
build=true
source_build=true
product_build=true
restore=true
pack=true
;;
-productBuild|-pb)
build=true
product_build=true
restore=true
pack=true
;;
Expand Down Expand Up @@ -219,7 +230,9 @@ function Build {
/p:RepoRoot="$repo_root" \
/p:Restore=$restore \
/p:Build=$build \
/p:DotNetBuildRepo=$product_build \
/p:ArcadeBuildFromSource=$source_build \
/p:DotNetBuildSourceOnly=$source_build \
/p:Rebuild=$rebuild \
/p:Test=$test \
/p:Pack=$pack \
Expand Down
Loading

0 comments on commit f086d7c

Please sign in to comment.