Skip to content

Red main: AotConverterScanTests.SkipsConversionsBlockedByObsoleteError fails on net472 (IsExternalInit) #7329

Closed

Description

@thomhurst

Red main: SkipsConversionsBlockedByObsoleteError fails on net472

main run 41311511530 (commit d43977c, #7317), job modularpipeline (windows-latest), module RunSourceGeneratorTestsModule, TUnit.Core.SourceGenerator.Tests on net472:

failed SkipsConversionsBlockedByObsoleteError
  AssertionException: Expected to be empty
  but collection contains items: [(4,44): error CS0518: Predefined type 'System.Runtime.CompilerServices.IsExternalInit' is not defined or imported]

tests/TUnit.Core.SourceGenerator.Tests/AotConverterScanTests.cs compiles a fixture that declares public readonly record struct Token(string Value). A positional record's init accessor needs IsExternalInit, and the net472 reference set (ReferencesHelper.References) does not include it. The test passes on net8.0+ and fails on net472. Every PR inherits the failure (for example #7321).

Expected: the fixture compiles against every target framework of the test project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High: significant user-facing bug, fix soonbugSomething isn't workingin-progressWork is in progress

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions