Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>

<MicroBuildVersion>2.0.201</MicroBuildVersion>
<MetadataVersion>69.0.7-preview</MetadataVersion>
<MetadataVersion>70.0.11-preview</MetadataVersion>
<WDKMetadataVersion>0.13.25-experimental</WDKMetadataVersion>
<!-- <DiaMetadataVersion>0.2.185-preview-g7e1e6a442c</DiaMetadataVersion> -->
<ApiDocsVersion>0.1.42-alpha</ApiDocsVersion>
Expand Down
6 changes: 1 addition & 5 deletions test/CsWin32Generator.Tests/CsWin32GeneratorTestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,7 @@ protected async Task CompileGeneratedFilesWithSourceGenerators(string outputPath
}
}

// Filter out SYSLIB1092 diagnostics (related to DisableRuntimeMarshalling) as they are expected
var filteredGeneratorDiagnostics = generatorDiagnostics.Where(d =>
!(d.Descriptor.Id == "SYSLIB1092" && d.Descriptor.Title.ToString().Contains("The return value in the managed definition will be converted to an additional 'out' parameter at the end of the parameter list when calling the unmanaged COM method.", StringComparison.OrdinalIgnoreCase)));
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English is not my main language, so due to the message check I first got a bunch of red tests because of to this diagnostic. The message check isn't necessary here since diagnostic ID on its own is its unique identifier, but I figured even a better fix: this diagnostic is reported in our generated files, which have suppressions for it on the top. So it is better to filter out suppressed diagnostics in general since it is more representative of a real-world usage

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I like that idea! Thanks, I just did not know about that flag.


allDiagnostics.AddRange(filteredGeneratorDiagnostics);
allDiagnostics.AddRange(generatorDiagnostics.Where(d => !d.IsSuppressed));
}
else
{
Expand Down
Loading