Should we turn on support for certain V3 extensions for the final release or remove the code?

Abierto
#9 4 comentarios 0 reacciones 1 asignado Ver en GitHub

@CharliePoole ya está trabajando en esto.

Desde el 10/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

question

UPDATE: After discussion, We decided to turn off support for the existing wrappers for the next beta, maintaining the code so we can turn it back on if there is a need. We should make a final decision about this feature before the 4.0 release... ideally before the first RC.


In issue nunit/nunit-console#1649, we decided to support wrappers for V3 extensions in the first 2.0 beta release. Our reasoning was that, without wrappers, we would not have any extension support one or more of them was converted to use the V4 API nad the code for ExtensionService and its dependencies would not be exercised as we developed.

We are well beyond that point now. Beta.6 of the engine is about to be released and the code for extensibility is now encapsulated in a separate package. NUnit.Extensibility is already at beta.4, working toward beta.5. Two of our own extensions have been converted to the V4 API and the others will follow. This issue addresses the question of whether to continue to support V3 extensions and -- if the answer is yes -- how we will do it.

CURRENT STATUS

In version 3, extensions were only supported in the engine, which provides 5 extension points.

  • /NUnit/Engine/TypeExtensions/IService
  • /NUnit/Engine/TypeExtensions/ITestEventListener
  • /NUnit/Engine/TypeExtensions/IDriverFactory
  • /NUnit/Engine/TypeExtensions/IProjectLoader
  • /NUnit/Engine/TypeExtensions/IResultWriter

Wrappers are in place for the extension points in bold text. A few points are worth noting:

  • There are no known implementations of IService extensions.
  • ITestEventListener and IResultWriter were trivial to emulate. Conversion by the author to V4 is equally trivial.
  • The IProjectLoader wrapper works for NUnit projects but not VS projects. For VS, conversion of the extension may be simpler.
  • No work has yet been done on either converting or wrapping IDriverFactory but this is probably quite far from trivial.
  • Two out of our own four extensions, NUnitV2ResultWriter and NUnitProjectLoader have been converted to V4, and don't require a wrapper.

Also worth noting, Support for V3 Wrappers is controlled by a compiler constant in my current codebase, which will make it relatively easy to implement whatever decision we make here.

CHOICES

I see three...

  1. Remove support for V3 extensions entirely. Authors of any extensions will need to convert to the V4 API. If the extensions are published, they'll need to provide a new release. This was the original plan for V4 of the engine and is still my preference. Even keeping the existing wrappers, which seem to work for us, may lead to future demands on our time since users may have their own in-house extensons and expect us to support them. Frankly, this is hard enough already, without adding V3 support to the mix.
  2. Support only the wrappers what in which we have full confidence. For me, this would mean ITestEventListener and IResultWriter. Although not my favorite, it may be reasonable if we believe others are already using it. In the case of ITestEventListener, which is called many times during the execution of tests, this will probably cause a performance issue for some users but that should motivate them to convert to the V4 API.
  3. ** Support the wrappers we currently have.** This is the same as option 2 with the addition of IProjectLoader. Since the wrapper doesn't work for VSProjectLoader and we've already converted NUnitProjectLoader to V4, I think this could only be justified if someone knows of a published extension that requires it.
  4. ** Support wrappers for all V3 extension points.** This is feasible only in theory. Having spent a lot of time on the creation of the simple wrappers we already have, I feel wrappers are a dead end, which I don't want to work on. If anyone advocates this approach, please volunteer to carry it out as well. :-)

One other choice... if we remove wrappers should we remove all the code or just disable it conditionally? I'd lean toward full removal but it may be OK to merely disable for the next beta cycle and remove later.

@nunit/engine-team Your thoughts about all this? Ive made it a question for the team for now and will convert to a feature once we decide.

Lenguaje dominante
C#
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nunit/NUnit.Extensibility

Todos los issues de nunit/NUnit.Extensibility

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.