Enable package validation for the MCP extension packages - #1793
Open
jeffhandley wants to merge 1 commit into
Open
Enable package validation for the MCP extension packages#1793jeffhandley wants to merge 1 commit into
jeffhandley wants to merge 1 commit into
Conversation
ModelContextProtocol.Extensions.Apps and ModelContextProtocol.Extensions.Tasks both opted out of package validation with EnablePackageValidation=false and the comment "New package with no published baseline yet". That is no longer true: both packages have shipped 2.0.0 and 2.1.0 on NuGet.org, so the central PackageValidationBaselineVersion of 2.0.0 in src/Directory.Build.props now resolves for them just like it does for the other three shipping packages. Removing the opt-out means these packages get the same ApiCompat breaking-change detection as ModelContextProtocol.Core, ModelContextProtocol, and ModelContextProtocol.AspNetCore. Verified with a clean Release pack: both packages validate against their 2.0.0 baselines with zero diagnostics, so no suppression file is needed for either. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Why
ModelContextProtocol.Extensions.AppsandModelContextProtocol.Extensions.Taskseach opted out of NuGet package validation with:That was correct when the comment was written, but it is no longer true. Both packages have shipped
2.0.0and2.1.0on NuGet.org, so a baseline exists. The opt-out left two shipping packages silently exempt from the ApiCompat breaking-change detection that every other shipping package in the repo gets.What changed
Deleted those two lines from both
.csprojfiles. Nothing else. Both projects now inheritEnablePackageValidation=trueandPackageValidationBaselineVersion=2.0.0fromsrc/Directory.Build.props, which is where the baseline is already configured centrally for the other three packages. No per-project wiring and no new pattern was introduced.No
CompatibilitySuppressions.xmlwas added for either package, because neither needs one.Validation
dotnet clean -c Releasefollowed bydotnet pack -c Releasecompletes with 0 errors and 0 warnings, producing all five packages. No CP0xxx diagnostics and no "Unnecessary suppressions found".A clean pack alone would look identical if validation had silently no-op'd, so that was verified separately two ways:
Microsoft.NET.ApiCompat.ValidatePackage.semaphoreis now present underartifacts/obj/for all five packable projects, including both extension packages. Previously it existed for only three.2.0.0baseline nupkgs for both extension packages were restored into the global packages folder, which only happens when baseline validation is actually enabled.So the clean result is a real signal: there are no breaking changes in either extension package between
2.0.0and HEAD.dotnet buildsucceeds with 0 warnings and 0 errors.dotnet testfailures in this environment are pre-existing and unrelated: conformance tests cannot launchnode_modules/.bin/conformance.cmd(npm dependencies not installed locally), andClientIntegrationTests.CallTool_Stdio_MemoryServershells out to the npx-based memory server.Note for reviewers
PackageValidationBaselineVersionstays at2.0.0even thoughVersionPrefixis2.1.0. That gap is intentional and is the steady state, not drift: the baseline pins to the last MAJOR release for the duration of the series and only moves when3.0.0ships. Bumping it to2.1.0would re-baseline the API surface against itself and discard the compatibility guarantee across2.x.Note
This pull request description was generated by GitHub Copilot.