To reproduce:
var code =
"""
using Rocks;
using System;
#nullable enable
namespace MockTests
{
[Obsolete("This interface is not intended to be used directly by user code")]
public interface IShader
{
[Obsolete("This method is not intended to be used directly by user code")]
uint GetPixelOptions();
}
public interface IPixelShader : IShader
{
void Execute();
}
public static class Test
{
public static void Generate()
{
var rock = Rock.Create<IPixelShader>();
}
}
}
""";
In the test project, because I think generalDiagnosticOption: ReportDiagnostic.Error is not set like it is in the code gen test app, this doesn't fail, but it will when warnings are errors, something like this:
error CS0618: 'ID2D1InputDescriptionsLoader' is obsolete: 'This interface is not intended to be used directly by user code'
This was found on ComputeSharp.D2D1.ID2D1PixelShader
To reproduce:
In the test project, because I think
generalDiagnosticOption: ReportDiagnostic.Erroris not set like it is in the code gen test app, this doesn't fail, but it will when warnings are errors, something like this:This was found on
ComputeSharp.D2D1.ID2D1PixelShader