Repository navigation
Conversation
|
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. |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Untracked assembly-resolution paths and Windows drive-root rewriting can produce unsound cache keys.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Adds root-relative ILLink cache identities so equivalent worktrees can share eligible cached outputs.
Changes:
- Maps source-root paths into stable cache keys and relative invocations.
- Expands cache eligibility checks and input hashing.
- Adds target wiring, documentation, and extensive tests.
| File | Description |
|---|---|
LinkTask.cs |
Implements path mapping and cache validation. |
Microsoft.NET.ILLink.targets |
Forwards SDK source roots. |
Mock.cs |
Captures cache invocation details. |
ILLink.Tasks.Tests.cs |
Tests sharing, eligibility, and fallback behavior. |
eng/illink.targets |
Defines the runtime repository source root. |
sfx-finish.proj |
Forwards source roots for framework trimming. |
oob-trim.proj |
Forwards source roots for OOB trimming. |
illink-tasks.md |
Documents task behavior and configuration. |
task-cache.md |
Updates cache design decisions. |
Contributor
|
Tagging subscribers to this area: @agocke, @dotnet/illink |
This was referenced Oct 7, 2026
Open
Keep ILLink configuration and input identity in the task while sharing entry validation, publication, directory restoration, and usage metadata. Preserve v1 serialization, mutex names, diagnostics, and purge semantics. Compile shared sources into consumers without adding a runtime assembly. 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
Reference the shared invocation cache entry metadata directly from the purge tool and tests. 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
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
Share entry enumeration, last-used handling, deletion, diagnostics, and summary reporting with explicit layout and tool labels. Keep the ILLink CLI and idle-cache requirement unchanged. Move engine tests into shared sources and cover independent layouts while retaining CLI tests in the tool project. 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 restore-or-execute orchestration and successful-result storage into the shared cache sources. Keep ILLink eligibility, key computation and output preparation in task callbacks, preserving the existing directory-only v1 storage contract. 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
Preserve runtime library ExtraArgs input discovery in DescribeInvocation, including readable XML inputs and assembly search-directory inventories. Adapt bypass returns and diagnostic assertions to the extracted invocation-description contract. 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
sbomer
changed the base branch from
main
to
sbomer/illink-reject-path-shaped-resolution
October 21, 2026 21:48
Base automatically changed from
sbomer/illink-reject-path-shaped-resolution
to
main
October 22, 2026 20:57
Map declared source roots into structured cache identity and use relative execution arguments for eligible single-root invocations. Retain full content hashing, conservative symbol and resolution checks, and original execution for uncached requests. Assisted-by: Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cf203c67-3550-4744-a063-3f1230546d53
Assisted-by: Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cf203c67-3550-4744-a063-3f1230546d53
Bypass unsupported escaped quotes, account for Unix ToolTask normalization, and strengthen disjoint-root coverage. Clarify the SDK mapping prerequisites without changing compilation defaults. Assisted-by: GitHub Copilot CLI:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cf203c67-3550-4744-a063-3f1230546d53
Retain the stricter ILLink identity diagnostics when exercising eligibility tests from the shared-cache extraction. Assisted-by: Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cf203c67-3550-4744-a063-3f1230546d53
) Treat path-shaped assembly-name strings as unresolved before constructing assembly-name references or consulting the loaded cache. This prevents name-based lookup from probing parent directories or other paths while preserving each caller's existing unresolved diagnostics and tolerant reflection probing. Explicit reference file paths and already-created assembly-name references retain their current behavior. Linux validation passed: 1,317 ILLink tests (including 175 focused resolver cases), 212 task tests, 33 cache-tool tests, and 1,135 analyzer tests, with 39 existing skips and no failures. ILTrim also builds successfully. Windows/macOS and the ILC/ILTrim test suites were not run. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 58eb5972-179d-44fb-8b71-3632cb35ab0c (cherry picked from commit 598d884)
sbomer
force-pushed
the
sbomer/illink-cache-worktree-sharing
branch
from
October 23, 2026 22:28
78eb283 to
1dd380b
Compare
Use analyzer-compliant path checks on both task targets and dispose the Cecil reader before rewriting the path-shaped-reference fixture. Assisted-by: Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cf203c67-3550-4744-a063-3f1230546d53
This was referenced Oct 27, 2026
Preserve root-aware cache identity while integrating the shared invocation cache changes. Assisted-by: GitHub Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: af970add-1797-4965-9c32-5230b3bf3400
Assisted-by: GitHub Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: af970add-1797-4965-9c32-5230b3bf3400
Keep cache orchestration in the shared adapter and let ILLink handle root and XML assembly-name validation. Retain metadata-reference and working-directory safeguards, and remove the redundant key version suffix. Assisted-by: GitHub Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: af970add-1797-4965-9c32-5230b3bf3400
Prepare the same root-relative invocation regardless of cache eligibility and reuse initialized SourceRoot items. Describe logical path identities for the shared key builder instead of duplicating serialization and hashing in ILLink. Assisted-by: Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: af970add-1797-4965-9c32-5230b3bf3400
Rely on full-content hashes to distinguish embedded checkout paths instead of rejecting those inputs. Remove scan-only machinery while retaining root mapping, input readability checks, and symbol eligibility checks. Cover identical-byte sharing and embedded-path invalidation. Assisted-by: Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: af970add-1797-4965-9c32-5230b3bf3400
Record input roles while generating execution arguments and logical cache context. Capture normalized file identities in InvocationDescription and extract source-root mapping from LinkTask. Remove override detection and assembly-name/module preflight restrictions; defer hashless linked-resource tracking. Assisted-by: Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: af970add-1797-4965-9c32-5230b3bf3400
Resolve physical input and output locations through a reversible path map instead of retaining parallel path and identity inventories. Assisted-by: Copilot:gpt-6.1-sol Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: af970add-1797-4965-9c32-5230b3bf3400
This was referenced Nov 12, 2026
This branch has not been deployed
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.

Builds on #135886 to share eligible ILLink task cache entries across worktrees with equivalent layouts. Map declared source roots into stable cache identities while retaining full content hashing, and run single-root invocations from that root with structured relative arguments rather than rewriting raw command strings. Use the shared invocation cache for storage and restoration.
Caching remains opt-in, with compiler and symbol-preservation defaults unchanged. Unsupported inputs run uncached with their original arguments and working directory. This branch retains the already-merged resolver fix from #136249 because the current base predates it.
Validated both task targets, 355 task/shared-cache tests, 1,307 linker tests (30 existing skips), and 65 cache-maintenance tests on Linux. Real enclosing-root and disjoint-root cache hits matched uncached DLL/PDB bytes, including concurrent writers and SDK mapping probes. Windows/macOS execution and full runtime builds were not run.
Note
This pull request description was created with assistance from GitHub Copilot.