Skip to content

Commit 036d573

Browse files
Fix sparse checkout to include Azure.Core shared source files (#9092)
PR #9082 switched to sparse checkout but omitted `sdk/core/Azure.Core/src/Shared`, causing build failures when Azure test projects reference shared source files like `TrimmingAttribute.cs`, `RawRequestUriBuilder.cs`, etc. ### Changes - Added `sdk/core/Azure.Core/src/Shared` to sparse checkout pattern in `Submit-AzureSdkForNetPr.ps1` ```powershell git sparse-checkout set eng/packages/http-client-csharp eng sdk/core/Azure.Core/src/Shared ``` <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Build is now failing in the Update PR</issue_title> > <issue_description>#9082 updated to use sparse checkout but we are missing the Azure.Core shared source files: > > CSC : error CS2001: Source file '/tmp/azure-sdk-for-net-20251125-171710/eng//../sdk/core/Azure.Core/src/Shared/TrimmingAttribute.cs' could not be found. [/tmp/azure-sdk-for-net-20251125-171710/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/example/basic/src/_Specs_.Azure.Example.Basic.csproj::TargetFramework=net8.0] > CSC : error CS2001: Source file '/tmp/azure-sdk-for-net-20251125-171710/eng//../sdk/core/Azure.Core/src/Shared/RawRequestUriBuilder.cs' could not be found. [/tmp/azure-sdk-for-net-20251125-171710/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj::TargetFramework=net8.0] > CSC : error CS2001: Source file '/tmp/azure-sdk-for-net-20251125-171710/eng//../sdk/core/Azure.Core/src/Shared/TypeFormatters.cs' could not be found. [/tmp/azure-sdk-for-net-20251125-171710/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj::TargetFramework=net8.0] > CSC : error CS2001: Source file '/tmp/azure-sdk-for-net-20251125-171710/eng//../sdk/core/Azure.Core/src/Shared/RequestHeaderExtensions.cs' could not be found. [/tmp/azure-sdk-for-net-20251125-171710/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj::TargetFramework=net8.0] > CSC : error CS2001: Source file '/tmp/azure-sdk-for-net-20251125-171710/eng//../sdk/core/Azure.Core/src/Shared/AppContextSwitchHelper.cs' could not be found. [/tmp/azure-sdk-for-net-20251125-171710/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj::TargetFramework=net8.0] > CSC : error CS2001: Source file '/tmp/azure-sdk-for-net-20251125-171710/eng//../sdk/core/Azure.Core/src/Shared/ClientDiagnostics.cs' could not be found. [/tmp/azure-sdk-for-net-20251125-171710/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj::TargetFramework=net8.0] > CSC : error CS2001: Source file '/tmp/azure-sdk-for-net-20251125-171710/eng//../sdk/core/Azure.Core/src/Shared/DiagnosticScopeFactory.cs' could not be found. [/tmp/azure-sdk-for-net-20251125-171710/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/api-version/header/src/_Specs_.Azure.ClientGenerator.Core.ApiVersion.Header.csproj::TargetFramework=net8.0] > CSC : error CS2001: Source file '/tmp/azure-sdk-for-net-20251125-171710/eng//../sdk/core/Azure.Core/src/Shared/DiagnosticScope.cs' could not be found. [/tmp/azure-</issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> - Fixes #9091 <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/microsoft/typespec/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: JoshLove-msft <[email protected]>
1 parent 7fe4fe9 commit 036d573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/http-client-csharp/eng/scripts/Submit-AzureSdkForNetPr.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ try {
9595
}
9696

9797
# Set the sparse checkout patterns - only the directories we need
98-
git sparse-checkout set eng/packages/http-client-csharp eng
98+
git sparse-checkout set eng/packages/http-client-csharp eng sdk/core/Azure.Core/src/Shared
9999
if ($LASTEXITCODE -ne 0) {
100100
throw "Failed to set sparse checkout patterns"
101101
}

0 commit comments

Comments
 (0)