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

Aperta
#9 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@CharliePoole ci sta già lavorando.

Dal 10/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
C#
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nunit/NUnit.Extensibility

Tutte le issue di nunit/NUnit.Extensibility

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.