nunit-console
nunit-console copied to clipboard
nunit.engine.api: backward compatibility is broken in master branch
Hey guys,
We noticed that in the current master the TestPackage class lacks a .ctor(string) it used to have, replaced instead with .ctor(params string[]). Are you going to remove this constructor in the next released version or not?
The reason we are asking this question is that this constructor had already been absent in nunit.engine.api.dll coming with NUnit3TestAdapter 4.3.0-alpha-net7.4 nuget, but was restored in versions released later on.
We are currently using the .ctor(string) in the R#/Rider runner. When running tests we are trying to use nunit.*.dll from the test project's folder to enable user running tests using the version they want instead of a bundled one. (And we usually do find them, since NUnit3TestAdapter puts them there). Now because of this change, all already released versions of R#/Rider will be failing to run tests using the upcoming versions of nunit.engine.api/nunit.engine, should you decide to release it as is. As for the new versions of R#/Rider, the fix is not difficult, but ugly, since we will be resorting to reflection.
We would appreciate if you consider keeping this constructor for backward compatibility. Thank you.
Although I'm no longer part of the project, I'll answer because I'm the guy who did it. :-)
The master branch is the branch used for developing NUnit V4, for which there are as yet no releases. Version 4 is, of course, a major release and is able to break compatibility. More to the point, however, this constructor issue is probably the least of the compatibility breaks you will find in running the V4 engine.
That constructor has long been a problem because, in version 3, the resulting test package using it is substantially different from that produced using the string[] constructor with an array containing a single member. So getting rid of it for V4 was one of our goals for the release.
I would not advise anyone to use the unreleased V4 code at this point. It's not even alpha-level code. I don't know if some release of the adapter actually used it, but I would be surprised if that were the case. @OsirisTerje can probably tell you.
FWIW, if I had continued on the project, I would probably have created a new repository for V4 in order to more strongly signal that there are significant changes. NUnit is a project that only has done two major updates in it's 22 year history, by the way. This one, when it comes will be the third.
@CharliePoole Thank you for answering. I see no problem if compatibility breaks between major versions.
P.S. I double checked few last released test adapters, and I admit I was slightly wrong: the constructor was absent in nunit3testadapter.4.3.0-alpha-net7, not 7.4 as I originally indicated.