Open jaredpar opened 7 months ago
@tmat the compiler tests are failing on Linux due to this assert you added into PEModuleBuilder.cs:
private static void GetDocumentsForMethodsAndNestedTypes(PooledHashSet<Cci.DebugSourceDocument> documentList, ArrayBuilder<Cci.ITypeDefinition> typesToProcess, EmitContext context)
{
Debug.Assert(!context.MetadataOnly);
That assert is valid from the perspective of the command line API because never emit PDB data for metadata references. That is normalized during command line parsing:
EmitPdb = emitPdb && !refOnly, // silently ignore emitPdb when refOnly is set
From the compiler API perspective though it's quite possible to create a PDB when building a metadata only assembly. All that needs to be done is construct the EmitOptions
manually and pass them through. That is what's happening in these failures, the compiler is passing along an EmitOptions
that specifies a PDB when building ref assemblies and it triggers the assert.
Not sure how to proceed here. Assuming you added the assert for a good reason but it does seem like a situation that is allowed by the APIs.
When the compiler moved a few test assemblies to
net8.0
the stopped running on Linux due to an infrastructure issue. This was discovered in #71556 where we simplified how TFMs were handled in our build / test infrastructure.These tests are being disabled on Linux for the moment to get the PR through (stop the bleeding). Will go back and evaluate the disabled tests later. This issue is tracking those tests.