Replacement for RuntimeFrameworkService
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 234
- Forks
- 163
- Avg merge
- 13h 32m
- Merged PRs (30d)
- 25
Description
RuntimeFrameworkService suffers from a number of problems:
- Lack of thread-safety (#173) - preventing improvements in other areas (#140)
- Mix of functionality relating to runtimes and target frameworks, leading to confusion in code (e.g. use of
Runtime.Any, #406). - High-overhead in certain usecases - e.g. every test run currently calculates and discovers all available runtimes, when only a minority of runners require that information.
- Limited testing, due to tight integration of assembly inspection/File system requirements, and logic.
- Lot's of netfx specific functionality, which can't be compiled for the .NET Standard builds
- Reliance on two different versions of Mono Cecil, due to no version of Cecil having support for both .NET 2.0 and .NET Standard.
After spending a couple of years teasing round the edges of this, and not making a lot of progress (https://github.com/nunit/nunit-console/pull/407, https://github.com/nunit/nunit-console/pull/402, https://github.com/nunit/nunit-console/pull/408, https://github.com/nunit/nunit-console/pull/670, #406) I'd like to instead propose a wholesale replacement for these classes. I'm marking this as high priority, as it's an area which is going to need lots of upcoming development for the .NET Standard improvements - and I'd like to create a better structure here, before we start building on top of it.
I'm proposing two new services to replace it:
- AssemblyTargetingService: Responsible for everything around what an assembly was built to target. Would be used to inspect and annotate test packages, and inspect engine extensions.
- RuntimesService: Responsible for all functionality around discovering available runtimes, and deciding on the runtime to be used for each agent.
I'd then like the Obsolete the current RuntimeFrameworkService, and remove in v4.
Thoughts welcome. 🙂
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading RuntimeFrameworkService and the earlier work referenced in #173, #140, #406 and pull requests #407, #402, #408 and #670. Compare the proposed AssemblyTargetingService and RuntimesService responsibilities, then trace the current runtime and target-framework callers. Done means the replacement structure is agreed, the old service is obsolete, and its removal path for v4 is defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 20/100