Skip to content

Source generator retains unused metadata generation entry points #7568

Closed

Description

@thomhurst

Summary

TestMetadataGenerator contains additional private methods with no callers, outside the generic concrete-metadata chain removed for #7194. Removing these remaining obsolete entry points would make the live generator paths easier to identify.

Reproduction

On main at 8d0cffe384, search src/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs for GenerateMetadata, AppendOptionalFactoryParameters, GenerateTypeReference, GenerateGenericTypeInfo, and GenerateGenericMethodInfo. Each exact identifier occurs only in its own private declaration.

Expected and actual

The generator should retain only reachable generation paths. These five methods remain unused; inspect their exclusive helper dependencies before removing them, and verify that generator snapshots remain unchanged.

Environment

Current main 8d0cffe384, .NET SDK 10.0.403. Found while implementing #7194; that PR removes only the requested chain and its exclusive helpers. Please remove the remaining unused generation methods in a separate cleanup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: cleanup, minor enhancement, or rare edge casegood first issueGood for newcomersin-progressWork is in progress

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions