Repository navigation
[build] Make local no-op SDK builds incremental - #13775
Closed
simonrozsival wants to merge 15 commits into
Closed
simonrozsival wants to merge 15 commits into
simonrozsival wants to merge 15 commits into
Conversation
Replace Make and private SDK installers with an SDK pinned in global.json and selected by dotnetup. Run preparation and local workload configuration from solution build hooks, and expose product packaging through the standard solution Pack target. Keep SDK binaries shared while isolating Android and MAUI workloads inside each worktree. Reduce dotnet-local to workload selection and argument forwarding, and use it in CI only where local workloads are required. Update build and test documentation to match. Use the checked-out branch when GitBranch runs in a worktree so packages and workload manifests receive consistent versions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve the SDK argument separator through dotnetup so NUnit run settings and tool arguments reach their intended parsers. Avoid quoting trailing Windows directory separators in workload dependency resolution. Configure source workloads for solution builds on CI as well as local builds. Disable the CLI MSBuild server in the minimal local-workload wrappers so a previously cached resolver cannot select manifests from another workload root. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CI SDKs can already contain every workload dependency. The generated plan then has no _WorkloadPack items, but its Install target still invokes Unzip with an empty DestinationFolder and fails with MSB4044. Skip the target when the plan has no packs, preserving installation for nonempty plans. Reproduced the empty-plan failure locally before the fix, verified the guarded plan succeeds without Unzip execution, and verified a four-pack source dependency installation still runs successfully. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CI installed the SDK pinned by global.json, but workload resolution used the dependency package version from the merged main branch. That SDK directory did not exist, so the resolver silently omitted host-specific Android and MonoTargets packs. Extraction appeared successful, then app and test builds failed with NETSDK1147 or missing SDK directories. Use NETCoreSdkVersion, as the workload feature-band calculation already does, and reject nonexistent SDK directories before resolving packs. A local mismatched-version reproduction confirmed the missing host packs; the corrected MSBuild target produced the complete plan, and a legitimate empty-plan Install still succeeds. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Context: #13430 A source build with NUGET_PACKAGES pointing at a private cache reached workload installation, then failed with MSB3932 because the generated path joined the cache directory and package ID without a separator. NuGetPackageRoot can retain the environment-provided directory without a trailing slash. Use MSBuild EnsureTrailingSlash when generating dependency archive paths. Item evaluation with and without a trailing separator now produces identical paths, including the physically present archive from the failed build. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Context: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1672175 The worktree-local installer uses MSBuild Unzip instead of the SDK workload installer. Unzip preserves zone-less ZIP entry timestamps, so files packed on another agent can be extracted into the future. CI consequently rebuilt unchanged SDK and reference inputs on every invocation: AutoImport.props invalidated Android targets, and Java.Interop.dll forced CoreCompile to run again. Finalize each unpacked workload pack by clamping only future file timestamps to the current UTC time before applying Unix permissions. Existing older timestamps, file contents and modes remain unchanged; packed template and library archives are unaffected. The generated-install fixture reproduces future inputs with the old tool, verifies the timestamp correction and permission preservation, and skips an unchanged installation. After real extraction under America/Los_Angeles, retained ordinary and unchanged CoreCLR app build logs show CoreCompile, Java stubs, Java compilation and Dalvik compilation correctly skipped on the second build. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Context: #13430 Linux template tests in Azure build 1672175 fail with "No templates or subcommands found matching: android". The local workload installer preserves the uppercase Microsoft.Android.Templates archive filename when copying it into template-packs, but the SDK workload resolver requires a lowercase package ID and version. Case-insensitive hosts conceal the mismatch. Copy template and library archives to the existing canonical PackageFileName instead of preserving the source basename. A generated two-pack Install fixture verifies the exact directory entries and copied bytes for mixed-case package IDs and prerelease versions; both unchanged Install batches skip without copying again. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Update the newly added local-build skill for the shared SDK and standard solution build entrypoints. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Host-side tools targeting earlier frameworks need their runtimes, not separate SDK installations. Keep the repository-pinned SDK as the single build SDK and install the .NET 11 runtime independently of the stable tooling target framework. Use the same SDK for the isolated Arcade signing adapter, preserve its global.json pin, and publish the resolved shared dotnet root to Arcade. Install the .NET 8 runtime for SwixBuild. Make the manifest project SDK-free and remove its obsolete SDK 8 pin and redundant restore, so desktop MSBuild does not need to import the newer SDK. Validation: git diff --check passed. Parsed 48 pipeline YAML files and both signing XML projects; checked 29 affected template calls, runtime pins, signing working directories and obsolete-variable removal. Compared all six PowerShell scripts and the property-query project with the previously accepted V5 inputs; they remain unchanged apart from checkout line endings. The earlier V5 check parsed representative parameter-rendered scripts and evaluated MSBuildToolsPath successfully. Actual provisioning and Windows Swix/signing were not run; no new managed validation phase was executed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep SDKs, runtimes, and dotnetup metadata shared across worktrees while making CI installation explicitly noninteractive. Log the selected tool's path and version so differences between cached agent tools are visible. Resolve the first application match once and invoke that executable for the entire setup step; Get-Command can otherwise return multiple paths. Apply the same noninteractive option to signing's .NET 8 runtime install. Validation: the installed dotnetup accepts all three install argument sets with --help. An extracted PowerShell step harness passed seven stubbed success/failure cases, including paths with spaces, multiple application matches, command order, and native exit propagation. All 48 pipeline YAML documents parse, and git diff --check passed. No SDK/runtime installation or Windows signing execution was performed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Darc already updates tools.dotnet and an existing sdk.version together when Arcade brings a newer bootstrap SDK. Setting tools.pinned disables both updates and leaves the shared SDK selection stuck. Remove that opt-out without changing the currently selected SDK. Document that automatic updates follow Arcade's bootstrap SDK, not the produced Microsoft.NET.Sdk dependency, and never downgrade to an older version. Validation: JSON parsing and a semantic comparison against the parent passed: tools.pinned is the only removed setting, both SDK version fields remain equal, and the resolver policy is unchanged. git diff --check passed. No SDK installation or build was needed because the selected SDK and build inputs are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Normal solution Pack also builds, so mark its Build dependency before local workload configuration and preserve extracted workloads in that context. Keep ordinary Build/Rebuild cleanup unchanged. Condition preparation and finalization on build-enabled Mono.Android solution references so host-only filters skip both hooks and their dependencies. Replace the deleted skill-runner installer invocation with dotnetup and regenerate its workflow lock using the existing compiler. Validated the generator solution filter and BootstrapTasks builds, nine focused MSBuild regression cases, and six isolated bootstrap success/failure cases. Normal workflow compilation passed; diagnostic dry-run failed on existing token-pool shellcheck findings. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Solution Clean deleted shared Android SDK/NDK and JDK installations and cached downloads. Native cleanup also invoked Ninja in potentially missing CMake directories, while Java utility cleanup required Gradle. Preserve shared toolchains and cached archives. Initialize native flavor paths before removing generated intermediates and per-RID outputs, without deleting a custom output root. Remove local Java build directories directly and correct aapt2 cleanup to delete executables rather than directories. Document the selected-configuration Clean entrypoint. Validation on macOS: both commands passed, including repeated Debug cleanup and cleanup after the generator build: * dotnetup dotnet clean Microsoft.Android.slnx -c Debug -m:2 -nr:false -v:minimal * dotnetup dotnet clean Microsoft.Android.slnx -c Release -m:2 -nr:false -v:minimal DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER=1 dotnetup dotnet build src/generator/generator.slnf -c Debug -m:2 -nr:false -v:minimal passed with 38 existing SourceLink/repository-information warnings and no errors. A temporary regression harness passed all 17 actual-project MSBuild invocations, including missing native/Java tools, repeated cleanup, flavor/configuration/output-root isolation, and preservation of 21 owned shared-tool sentinels. An additional aapt2 custom-output-path probe passed. XML parsing and git diff --check passed. Windows, full SDK rebuild, product packaging, and device tests were not run for this Clean-only correction. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.