Allow to prevent RestoreOriginalModule when GetCoverageResult is called#577
Allow to prevent RestoreOriginalModule when GetCoverageResult is called#577shargon wants to merge 2 commits intocoverlet-coverage:masterfrom
Conversation
|
For prevent the revert after the process die we use this var helper = (IInstrumentationHelper)DependencyInjection.Current.GetService(typeof(IInstrumentationHelper));
var field = (ConcurrentDictionary<string, string>)helper
.GetType()
.GetField("_backupList", BindingFlags.Instance | BindingFlags.NonPublic)
.GetValue(helper);
field.Clear();There are an easier way? |
|
Hi @shargon before go on with this we need to re-open discussion with @tonerdo @petli on future of core lib. The issue with this kind of update is that are not "well structured" and "planned". I mean at the moment we don't guarantee core lib types stability(reason for hide everything) so we're concerned about take direct dependency on classes in these assembly. My idea was hide all and expose only public pertinent/stable object through interfaces/factories and be free to update internal implementation. The only other way is a fork of coverlet...with all the risks for future synching. |
|
@shargon to view instrumented asm you could use also msbuild #296 (comment) |
|
If you don't expose a stable "core" nuget, you are killing some good ideas. Is possible with a fork yes, but have sense to do that? |
|
@shargon close this, because we'll start to shape public api. |
There are specific situations when you want to preserve the Instrumentation. For example fuzzing techniques, we are working on an fuzzer using this library for the coverage and we need this change.
Thanks for your amazing work