Skip to content

[NativeAOT] GenericCompositionNode issue when Instantiation type name ends with _0, _1 or _2 #1821

@tomcashman

Description

@tomcashman

I'm currently getting a Duplicate node name emitted to file on a project. After debugging, it comes from ObjectWriter for the following auto-generated types:

Com.Alchemiccutie.Scripting.Compiled.Npc.Martha.Martha_breed_jelly_tutorial_2
Com.Alchemiccutie.Scripting.Compiled.Npc.Martha.Martha_breed_jelly_tutorial

I've traced the issue to GenericCompositionNode.AppendMangledName where it suffixes a number based on the variance.

I've had trouble making a simple reproduction of this outside of our project. However, I've pinpointed the steps causing the issue:

  • Martha_breed_jelly_tutorial_2 is added first to _previouslyWrittenNodeNames in ObjectWriter
  • Martha_breed_jelly_tutorial is attempted to be added but due to how GenericCompositionNode generates the mangled name (result is Martha_breed_jelly_tutorial_2), it thinks there is a conflict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions