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

Ensure reference isolation #4132

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ packages
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
!src/Packages
!eng/Packages
!src/[Pp]ackages
!eng/[Pp]ackages

# Microsoft Azure Build Output
csx/
Expand Down
4 changes: 1 addition & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)\eng\Packages\BuildOnly.props" />
<Import Project="$(MSBuildThisFileDirectory)\eng\Packages\General.props" />
<Import Project="$(MSBuildThisFileDirectory)\eng\Packages\TestOnly.props" />
<Import Project="$(MSBuildThisFileDirectory)\eng\packages\General.props" />
</Project>
2 changes: 2 additions & 0 deletions bench/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)\..\eng\packages\TestOnly.props" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need test-related props in benchmarks?

Copy link
Member Author

Choose a reason for hiding this comment

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

The benchmarks (at least some of those) are, essentially, test projects, so they too have test-only dependencies. We can iterate on this in the future, but the main goal here is to ensure the shippable artifacts don't accidentally pull in test-only dependencies.


<PropertyGroup>
<GenerateDocumentationFile Condition="'$(GenerateDocumentationFile)' == ''">false</GenerateDocumentationFile>
</PropertyGroup>
Expand Down
16 changes: 0 additions & 16 deletions eng/Packages/BuildOnly.props

This file was deleted.

16 changes: 8 additions & 8 deletions eng/build.proj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.Build.Traversal">
<ItemGroup>
<!-- We recursively add all of the projects inside the src directory, except for the exclusions above -->
<_ProjectsToBuild Include="$(MSBuildThisFileDirectory)..\src\**\*.csproj" Exclude="@(_ProjectsToExclude)" />
<!-- We recursively add all of the test projects -->
<_ProjectsToBuild Include="$(MSBuildThisFileDirectory)..\test\**\*.csproj" />
<_ProjectsToBuild Include="$(MSBuildThisFileDirectory)..\bench\**\*.csproj" />
<!-- Add all the projects we want to build as project references, so the traversal SDK can build them -->
<ProjectReference Include="@(_ProjectsToBuild)" />
<!-- We recursively add all of the projects inside the src directory, except for the exclusions above -->
<_ProjectsToBuild Include="$(MSBuildThisFileDirectory)..\src\**\*.csproj" Exclude="@(_ProjectsToExclude)" />
<!-- We recursively add all of the test projects -->
<_ProjectsToBuild Include="$(MSBuildThisFileDirectory)..\test\**\*.csproj" />
<_ProjectsToBuild Include="$(MSBuildThisFileDirectory)..\bench\**\*.csproj" />

<!-- Add all the projects we want to build as project references, so the traversal SDK can build them -->
<ProjectReference Include="@(_ProjectsToBuild)" />
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions eng/Packages/General.props → eng/packages/General.props
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
<PackageVersion Include="YamlDotNet" Version="13.1.1" />
</ItemGroup>

<ItemGroup>
<PackageVersion Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.5.22" />
<PackageVersion Include="SonarAnalyzer.CSharp" Version="8.52.0.60960" />
<PackageVersion Include="StyleCop.Analyzers.Unstable" Version="1.2.0.435" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageVersion Include="Microsoft.AspNetCore.Http.Features" Version="2.2.0" />
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<Project>
<Import Project="$(MSBuildThisFileDirectory)\..\eng\packages\TestOnly.props" />

<PropertyGroup>
<GenerateDocumentationFile Condition="'$(GenerateDocumentationFile)' == ''">false</GenerateDocumentationFile>
</PropertyGroup>
Expand Down