Skip to content

Fix source-backed project reference matching - #150

Merged
dfederm merged 1 commit into
mainfrom
dfederm/fix-referencetrimmer-149
Aug 14, 2026
Merged

Fix source-backed project reference matching#150
dfederm merged 1 commit into
mainfrom
dfederm/fix-referencetrimmer-149

Conversation

@dfederm

@dfederm dfederm commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #149, where RT0002 falsely reported used same-language project references as removable because Roslyn exposes them as source-backed CompilationReference instances rather than file-backed references. Matching now uses full assembly identity for source-backed references and file paths for PE-backed references.

The declared-reference manifest adds an optional project fusion-name column while remaining compatible with existing three-column rows. RT0001 and RT0003 retain their existing path-based behavior.

Why this is safe

  • Preserves backward compatibility with legacy three-column manifests.
  • Uses full assembly identities only for source-backed project references; PE references retain path-based matching.
  • Includes identity-affecting project-reference metadata in incremental hash inputs.
  • Handles transitive and duplicate project identities conservatively.
  • Limits the change to RT0002 and its supporting task and manifest plumbing.

Validation

Test / build Result
GitHub Actions ubuntu-latest Passed
GitHub Actions windows-latest Passed
Current intent review Aligned
Current code review Clean, 0 findings

Closes #149

@dfederm
dfederm force-pushed the dfederm/fix-referencetrimmer-149 branch 3 times, most recently from 41c6e2f to 316e383 Compare August 13, 2026 23:32
Preserve resolved project FusionName values in the declared-reference manifest and match RT0002 candidates by full Roslyn assembly identity while retaining path matching for existing reference kinds.

Copilot-Session: fd367b4f-39d5-45fe-bd61-813ba71259e6
@dfederm
dfederm force-pushed the dfederm/fix-referencetrimmer-149 branch from 316e383 to 5ecfe1c Compare August 14, 2026 18:01
@dfederm
dfederm merged commit 8929614 into main Aug 14, 2026
2 checks passed
@dfederm
dfederm deleted the dfederm/fix-referencetrimmer-149 branch August 14, 2026 18:10
@dfederm
dfederm restored the dfederm/fix-referencetrimmer-149 branch August 14, 2026 18:38
@dfederm
dfederm deleted the dfederm/fix-referencetrimmer-149 branch August 19, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RT0002 reports every project reference as removable when the analyzer runs in a Roslyn workspace

1 participant