Fix projects dropped when added as transitive references#14
Open
mscottford wants to merge 4 commits intovladbatushkov:mainfrom
Open
Fix projects dropped when added as transitive references#14mscottford wants to merge 4 commits intovladbatushkov:mainfrom
mscottford wants to merge 4 commits intovladbatushkov:mainfrom
Conversation
- Targets net10.0 (up from net9.0) - Buildalyzer/Workspaces 7.1.0 → 8.0.0 - Microsoft.CodeAnalysis/CSharp 4.13.0 → 5.3.0 (Analyzers pin removed) - Neo4j.Driver 5.27.0 → 6.0.0 - System.CommandLine 2.0.0-beta4 → 2.0.5 (first stable release) - Dockerfile base image updated to dotnet/sdk:10.0-alpine - Neo4j image updated to 2026.03.1 with corrected env var names - docker-compose.yml: removed obsolete version attribute, replaced hardcoded Windows volume path with relative ./SystemUnderTest path - Code updated for breaking API changes in System.CommandLine 2.0 (SetAction, Options.Add, Aliases.Add, Required, AllowMultipleArgumentsPerToken) and Neo4j.Driver 6.0 (IDriver.CloseAsync removed, use await using) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…from analysis When AddToWorkspace(workspace, addProjectReferences: true) is called for a project, Buildalyzer eagerly adds its referenced projects into the workspace. The previous deduplication check silently dropped those projects on their own loop iteration, causing them to receive no CONTAINS triple and no code analysis. Adds a regression test using a two-project fixture solution where ProjectA references ProjectB — ensuring both appear in the analysis context regardless of workspace insertion order. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 10, 2026
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.
Summary
GetAnalysisContextwhere projects pulled into the Roslyn workspace as transitive references by an earlierAddToWorkspace(workspace, addProjectReferences: true)call were subsequently dropped by the deduplication check, causing them to receive noCONTAINStriple and no code analysis.SystemUnderTest.sln) whereProjectAreferencesProjectB. The test asserts both projects appear in the analysis context, catching the original failure mode.Nodes.csandTriples.csto use C# primary constructor syntax (cleanup left uncommitted from the dependency upgrade session).Test plan
dotnet test— 1 test should pass (GetAnalysisContext_IncludesProjectsAddedAsTransitiveReferences)🤖 Generated with Claude Code