MessagePack-CSharp / MessagePack-CSharp

Extremely Fast MessagePack Serializer for C#(.NET, .NET Core, Unity, Xamarin). / msgpack.org[C#]
Other
5.82k stars 700 forks source link

SourceGenerator recursion crash from recursive generic type constraints #2034

Closed s-anzai closed 1 month ago

s-anzai commented 1 month ago

Thank you for your hard work.

The fix for #2005 was fixed in v3.0.233-rc.1, so I updated it with NgetForUnity, but I got the following compile error:

Stack overflow.
   at System.Runtime.CompilerServices.CastHelpers.ChkCastAny(Void*, System.Object)
   at Microsoft.CodeAnalysis.CSharp.Symbols.SymbolExtensions.GetPublicSymbol[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.CSharp.Symbol)
   at Microsoft.CodeAnalysis.CSharp.Symbols.PublicModel.Symbol.Microsoft.CodeAnalysis.ISymbol.get_ContainingNamespace()
   at MessagePack.SourceGenerator.AnalyzerUtilities.GetFullNamespaceName(Microsoft.CodeAnalysis.INamespaceSymbol)
   at MessagePack.SourceGenerator.AnalyzerUtilities.GetFullNamespaceName(Microsoft.CodeAnalysis.INamespaceSymbol)
   at MessagePack.SourceGenerator.AnalyzerUtilities.GetFullNamespaceName(Microsoft.CodeAnalysis.INamespaceSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon><message truncated>

Additional information

I tried to find the cause by following the setup procedure from the initial Unity project, but it seems that this compilation error occurs when you install addressables from Unity's package manager.

"com.unity.addressables": "2.1.0"
Stack overflow.
   at System.Linq.Enumerable.Select[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Func`2<System.__Canon,System.__Canon>)
   at System.Linq.ImmutableArrayExtensions.Select[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Immutable.ImmutableArray`1<System.__Canon>, System.Func`2<System.__Canon,System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo..ctor(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities+<>c.<GetTypeParameters>b__9_0(Microsoft.CodeAnalysis.ITypeParameterSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.ToImmutableArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at MessagePack.SourceGenerator.CodeAnalysis.CodeAnalysisUtilities.GetTypeParameters(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedNamedTypeName..ctor(Microsoft.CodeAnalysis.INamedTypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.QualifiedTypeName.Create(Microsoft.CodeAnalysis.ITypeSymbol)
   at MessagePack.SourceGenerator.CodeAnalysis.GenericTypeParameterInfo+<>c.<.ctor>b__8_0(Microsoft.CodeAnalysis.ITypeSymbol)
   at System.Linq.Enumerable+SelectArrayIterator`2[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ToArray()
   at System.Linq.Enumerable.ToArray[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Collections.Immutable.ImmutableArray.CreateRange[[System.__Canon, System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, Public<message truncated>

Unity 6000.0.10f1 Message Pack v3.0.233-rc.1

AArnott commented 1 month ago

Thanks for reporting. Here is the repro I contrived from the callstack:

using System;
using MessagePack;

[MessagePackObject]
public class A<T>
    where T : IEquatable<A<T>>
{
}