You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extract shared invocation cache storage from ILLink - #135886
Extracts ILLink's experimental invocation cache into shared sources, compiled into each consumer without adding a shared DLL. Tasks provide invocation descriptions and prepare their outputs before executing; the shared engine handles content hashing, lookup, restoration, storage, and purge. This intentionally goes beyond a mechanical extraction: the common output contract supports owned directories and file sets, records absent outputs, and uses checksummed manifests. That changes the experimental v1 entry format: existing entries are not reused, but remain purgable. #135446 builds on this infrastructure to add crossgen2 caching.
Replaces the ILLink-specific maintenance package and command with dotnet-build-cache, shared by both caches. Existing users should install that package instead of dotnet-illink-cache and replace dotnet illink-cache purge ... with dotnet build-cache purge --cache illink .... Commands already selecting an explicit directory can use dotnet build-cache purge --cache-directory <path> ... without a cache name. The cache-enablement environment variables are unchanged.
Validated independently on this branch: 287 ILLink/shared-cache tests and 65 maintenance-tool tests passed. Modern .NET and net472 task builds passed; net472 was built but not executed on Linux.
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.
Keep ILLink configuration and task tests in ILLink, and exercise storage with a tool-independent fixture.
Assisted-by: GitHub Copilot CLI:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da7cf090-9a92-453d-beb2-f672a9a7b541
Share opt-in parsing, cache-directory resolution, diagnostics, and construction while keeping ILLink eligibility and input identity in its task. Move configuration tests alongside the shared storage tests and preserve ILLink configuration behavior.
Assisted-by: GitHub Copilot CLI:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da7cf090-9a92-453d-beb2-f672a9a7b541
Describe inputs, context, and outputs independently of cache policy and compute content identities in the shared layer. Resolve cache configuration lazily and keep output preparation in normal tool execution, with cache-owned restoration on hits.
Assisted-by: GitHub Copilot CLI:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da7cf090-9a92-453d-beb2-f672a9a7b541
Move the ILLink cache CLI into a standalone dotnet-build-cache tool. Support named ILLink and crossgen2 caches with explicit-directory, environment, and shared platform-default resolution, independently of task enablement. Update build, test, CI, and usage wiring and align tool-file identity coverage with explicit absence markers.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da7cf090-9a92-453d-beb2-f672a9a7b541
Use only the explicit cache directory in CI commands and the matching example. Explain that a cache name does not validate directory ownership when an explicit directory is supplied.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da7cf090-9a92-453d-beb2-f672a9a7b541
Let output validation exceptions propagate instead of falling back to normal execution, preserving the existing protection against overlapping cache and output directories. Cover rejected declarations and ILLink output cleanup with regression tests.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: da7cf090-9a92-453d-beb2-f672a9a7b541
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Expanded filesystem restoration and incompatible cache encoding warrant maintainer validation across supported platforms; builds and tests were not rerun in this review.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Update API sketch and lifecycle docs for current cache contract
docs/design/tools/illink/task-cache.md:36
The API sketch and lifecycle paragraph describe an integration that the shared cache no longer exposes. TryCreateFromEnvironment takes InvocationCacheConfiguration; ILLink calls ExecuteCached with an InvocationDescription callback and a parameterless execution callback; restore/store take InvocationOutputs. The shared engine now computes the key from the task's input inventory and context. Update the signatures and ownership explanation together so additional consumers do not follow the obsolete callback contract.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The expanded cache format and destructive output-restoration contract warrant cross-platform maintainer review; builds and tests were not run in this review.
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
area-Tools-ILLink.NET linker development as well as trimming analyzerslinkable-frameworkIssues associated with delivering a linker friendly framework
2 participants
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.
Extracts ILLink's experimental invocation cache into shared sources, compiled into each consumer without adding a shared DLL. Tasks provide invocation descriptions and prepare their outputs before executing; the shared engine handles content hashing, lookup, restoration, storage, and purge. This intentionally goes beyond a mechanical extraction: the common output contract supports owned directories and file sets, records absent outputs, and uses checksummed manifests. That changes the experimental v1 entry format: existing entries are not reused, but remain purgable. #135446 builds on this infrastructure to add crossgen2 caching.
Replaces the ILLink-specific maintenance package and command with
dotnet-build-cache, shared by both caches. Existing users should install that package instead ofdotnet-illink-cacheand replacedotnet illink-cache purge ...withdotnet build-cache purge --cache illink .... Commands already selecting an explicit directory can usedotnet build-cache purge --cache-directory <path> ...without a cache name. The cache-enablement environment variables are unchanged.Validated independently on this branch: 287 ILLink/shared-cache tests and 65 maintenance-tool tests passed. Modern .NET and net472 task builds passed; net472 was built but not executed on Linux.
Note
This content was created with assistance from AI.