-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove services from nunit.engine.core assembly #934
Comments
Sounds good. I did some work before to look at moving ExtensionService and DriverService into the main engine while keeping custom driver support. The main engine should have all the info to decide on the appropriate driver (including any in extensions), and then just pass a class name and optional assembly path to the agent, to load the driver from. Unfortunately, another one I never finished! |
Yes, we talked about that. I'd like to try both alternatives. I could remember wrong but it seems as if the original extension service was about a third the size of the current one. It didn't make any attempt to deal with conflicting runtimes beforehand, but just handled exceptions gracefully. We couldn't keep it that way once we started dealing with .Net Standard and Core. But the added complexity is currently borne both by the "main" engine and the agents. That seems unnecessary. Once you have an agent, you only want to deal with a particular runtime anyway. I have a vague idea about how this can be done, but I need to write code and see how it works out. In any case, the two services above are low-hanging fruit. As I often do, I'm moving ahead with these two in the GUI for later porting to NUnit itself. |
I did this in the GUI and it worked well, but when I tried to do the same in a local branch for the console runner, I ran into problems because the engine still supports all the |
As a part of simplifying agents, I suggest we remove some services from nunit.engine.core. In each case, most of the code would remain but it would no longer function as a service. As a start, I suggest removing the following two services, which will only be used by agents 4.0.
DomainManager
is only used by theTestDomainRunner
, which can access it directly without need for theServiceManager
to be involved. Once we remove the--inprocess
option,TestDomainRunner
will only ever be created by an agent, simplifying things further.InProcessTestRunnerFactory
is now extremely simple. When running under .NETFX, we use aTestDomainRunner
. Under .NET Core, aLocalTestRunner
. This code may be directly incorporated where needed rather than providing a service.Once these two are removed as services, only two will remain in the core:
DriverService
andExtensionService
. If The former is removed, as has been proposed separately, thenExtensionService
is no longer needed in the core and may be moved to thenunit.engine
assembly.If we decide to keep the ability to provide custom drivers, we would need to create a simplified bit of code to locate and load them, which avoided the need to handle incompatible target runtimes through use of conventions.
In either case, removal of the two listed services is beneficial and could result in eventual removal of the
ServiceManager
itself from the core.The text was updated successfully, but these errors were encountered: