-
Notifications
You must be signed in to change notification settings - Fork 392
Closed
Labels
enhancementGeneral enhancement requestGeneral enhancement request
Description
Hello.
The latest (at the time of this post - 3.1.2) version of Coverlet uses Mono.Cecil 0.11.1. Unfortunately, this is an outdated version of Mono.Cecil that contains some bugs. For example, const null arrays are not processed correctly:
using Mono.Cecil;
using Mono.Cecil.Rocks;
await using var moduleStream = File.OpenRead(typeof(TestClass).Assembly.Location);
using var module = ModuleDefinition.ReadModule(moduleStream, new ReaderParameters { ReadSymbols = true });
var type = module.GetType(string.Empty, nameof(TestClass));
var method = type.GetMethods().Single();
try
{
var debugInformation = method.DebugInformation; // fails on Mono.Cecil 0.11.1, works fine on 0.11.4
Console.WriteLine("Success");
}
catch (Exception ex)
{
Console.WriteLine("Error: {0}", ex);
}
public class TestClass
{
public void TestMethod()
{
const object[]? testVariable = null;
}
}
This prevents Coverlet from instumenting modules and calculating code coverage correctly.
It would be nice if you could update Mono.Cecil dependency to 0.11.4. Thanks in advance.
Metadata
Metadata
Assignees
Labels
enhancementGeneral enhancement requestGeneral enhancement request