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
Replay linker diagnostics on ILLink task cache hits - #136405
Replay linker diagnostics through normal task logging on cache hits, so MSBuild's current warning policy still applies. Previously, a successful warning-producing invocation could seed the cache and a later -warnaserror build would incorrectly succeed because the hit omitted the warnings.
Azure Pipelines:
Successfully started running 4 pipeline(s).
11 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human confirmation is needed for warning escalation against real MSBuild because builds and regression tests were not run during this review.
No open issues 🎉
What changed in this PR
This PR makes ILLink task cache hits replay linker diagnostics through normal task logging, allowing MSBuild’s current warning policy to apply to cached results.
Changes:
Capture linker output and persist it with integrity metadata in cache entries.
Replay diagnostics after successful restoration and fail cache hits when logging reports errors.
Add regression coverage for warning policies, malformed diagnostics, and restore failures, and update cache documentation.
Replaying the saved importance ignores the current StandardOutputImportance and StandardErrorImportance, neither of which is included in TryComputeCacheKey. An entry populated with stdout at Low still replays at Low after the caller requests High, hiding ordinary messages that a fresh invocation would display. Include these settings in the cache key, or preserve each line's originating stream and apply its current importance during replay.
Record original stdout/stderr lines independently of task logging policy. Apply the current stream importance, stderr-as-error setting, and MSBuild warning policy on hits rather than keying logging settings.
Assisted-by: GitHub Copilot CLI:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 83c1f7dd-040c-4e6a-b365-9c4493526616
Preserve warning capture and replay in the shared invocation cache. Update the shared manifest test to validate the diagnostics record.
Assisted-by: GitHub Copilot CLI:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1816be82-3e42-462e-a6e3-76e479aa7144
Capture and store stdout and stderr separately, preserving line order within each stream and replaying them in a fixed stream order. Return diagnostics from execution and restore while keeping capture lifetime and logging policy in the task.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1816be82-3e42-462e-a6e3-76e479aa7144
Let the cache trigger replay after successful restoration while CachedToolTask owns capture and ToolTask logging policy. Keep ILLink-specific discovery and output preparation in ILLink.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1816be82-3e42-462e-a6e3-76e479aa7144
Return cache-owned capture buffers only on misses and narrow replay to the diagnostic streams. Store successful tool results even when current MSBuild logging policy fails the task, while preserving failure and replay behavior.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1816be82-3e42-462e-a6e3-76e479aa7144
Move cache creation and lazy input discovery into CachedToolTask, passing the description directly to the cache instance. Keep TryCreateFromEnvironment unchanged and retain cache-owned validation, timestamping, hashing, and restoration.
Build and test validation deferred because the shared-host memory reserve was unavailable.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1816be82-3e42-462e-a6e3-76e479aa7144
Capture eligible executions without live logging, then replay raw stdout and stderr through the current ToolTask policy on both misses and hits. Preserve EOF notifications and partial output on exceptions, and keep bypass logging unchanged.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1816be82-3e42-462e-a6e3-76e479aa7144
Replace pending invocation preparation and completion with a cache execution callback returning the task-owned capture result. Preserve unified replay, uncached execution, and partial-output replay and cleanup on exceptions.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1816be82-3e42-462e-a6e3-76e479aa7144
Use sequential cache guards and one uncached execution call site without wrapping uncached output in an invocation result. Preserve logging-based exit normalization, simplify capture allocation, and document buffer ownership and replay ordering rationale.
Assisted-by: Copilot:gpt-6.1-sol
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1816be82-3e42-462e-a6e3-76e479aa7144
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
3 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.
Replay linker diagnostics through normal task logging on cache hits, so MSBuild's current warning policy still applies. Previously, a successful warning-producing invocation could seed the cache and a later
-warnaserrorbuild would incorrectly succeed because the hit omitted the warnings.This is the same class of issue as dotnet/roslyn#86198.
Note
This content was created with assistance from AI.