Skip to content

Add overload for ProjectCollection constructor to prevent binary breaking change#12296

Merged
YuliiaKovalova merged 1 commit intomainfrom
fix-logger-related-api-breaking-change
Aug 7, 2025
Merged

Add overload for ProjectCollection constructor to prevent binary breaking change#12296
YuliiaKovalova merged 1 commit intomainfrom
fix-logger-related-api-breaking-change

Conversation

@baronfel
Copy link
Copy Markdown
Member

@baronfel baronfel commented Aug 6, 2025

Context

#12082 introduced a binary-breaking change to the ProjectCollection constructors, which is breaking VMR codeflow at dotnet/dotnet#1764.

Changes Made

Made the new change in a binary-compatible way by adding the old constructor signature and forwarding to the new constructor with a default value set for the new parameter. This also meant that we get to remove the CompatibilitySuppression, which should have been a red flag in the first place.

@baronfel baronfel requested review from a team, SimaTian and Copilot August 6, 2025 15:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses a binary-breaking change in the ProjectCollection constructors by adding back the original constructor signature to maintain backward compatibility. The solution forwards calls to the new constructor with a default value for the new parameter.

  • Added overloaded constructor with original signature to maintain binary compatibility
  • Removed compatibility suppressions that were hiding the breaking change
  • New constructor forwards to the extended version with enableTargetOutputLogging: false as default

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Build/Definition/ProjectCollection.cs Adds overloaded constructor that forwards to new signature with default parameter
src/Build/CompatibilitySuppressions.xml Removes compatibility suppressions for the ProjectCollection constructor

Comment thread src/Build/Definition/ProjectCollection.cs
@baronfel baronfel force-pushed the fix-logger-related-api-breaking-change branch from d3af420 to a8e596d Compare August 6, 2025 15:49
@baronfel baronfel requested a review from a team August 6, 2025 20:44
@YuliiaKovalova YuliiaKovalova merged commit 67034fe into main Aug 7, 2025
9 checks passed
@YuliiaKovalova YuliiaKovalova deleted the fix-logger-related-api-breaking-change branch August 7, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants