Repository navigation
Report extensions to runners without NUnit.Extensibility.Api types - #28
Merged
Merged
Conversation
IExtensionService now lists extensions with plain data types defined in the engine API: ExtensionPointInfo, ExtensionInfo and ExtensionInfoStatus. GetExtensionPoint and both GetExtensionNodes overloads are removed. The engine API no longer references NUnit.Extensibility.Api, which removes its side of the dependency cycle (nunit/nunit-console#1980). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CharliePoole
approved these changes
Dec 5, 2026
CharliePoole
left a comment
Member
There was a problem hiding this comment.
Good step toward eliminating dependency on extensibility api.
This was referenced Dec 5, 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.
Part of nunit/nunit-console#1980.
IExtensionServiceexposesIExtensionPointandIExtensionNodefrom NUnit.Extensibility.Api, so the engine API depends on Extensibility.Api while NUnit.Extensibility depends on the engine API. This PR removes the engine API's side of that cycle before 4.0.0 freezes it.Changes
NUnit.Engine:ExtensionPointInfoandExtensionInfoare sealed classes with init-only properties, so members can be added in 4.x without breaking anyone.ExtensionInfoStatusreplacesExtensionStatus. An extension's load error is a string, and its properties are a read-only name-to-values dictionary.IExtensionService:ExtensionPointsandExtensionsreturn the new types.GetExtensionPointand bothGetExtensionNodesoverloads are removed. No runner outside the engine calls them, and the engine itself uses its concrete service class.Directory.Packages.props, and the package check for that dependency is dropped frombuild.cake.This is a breaking change for runners that list extensions. NUnit.Extensibility needs no code change.
Tests
A new fixture,
ExtensionInfoApiTests, checks the shape of the API through reflection, likeExtensionDirectoryApiTests. It checks that the assembly no longer references NUnit.Extensibility.Api, and that no public member uses an Extensibility type. It also covers the interface's members, the new types, their init-only properties and their defaults. All 100 tests pass on net462 and net8.0. The package builds and verifies, with no dependencies.Follow-up
--list-extensionsoutput and its--enableand--disableoptions.Claude prepared this PR through a bot account, as in the trial described on nunit/nunit-console#1983.
🤖 Generated with Claude Code