0
Need More Information

Ambiguous AOT stubbing C# code generated for implicit operators of third party "Mixpanel" library

Vborcard 6 months ago updated 6 months ago 2

Hi,

I use Mixpanel (game analytics) and added the Mixpanel Assembly and the Value Type (Mixpanel) in the Unit Option Wizard. When I do a AOT Pre-Build, it gives me an error :

Assets/Ludiq/Ludiq.Core/Generated/AotStubs.cs(12596,27): error CS0457: Ambiguous user defined conversions 'Value.implicit operator string[](Value)' and 'Value.implicit operator Uri[](Value)' when converting from 'Value' to 'object[]'

If I comment the line 12596 in AotStubs.cs, everything works fine.

No idea if the error is Mixpanel or Bolt related. And I don't understand the error :-).

Thank you,

Vincent

Bolt Version:
1.4.9
Unity Version:
2019.3.6f1
Platform(s):
iOS
Scripting Backend:
IL2CPP
.NET Version (API Compatibility Level):
.NET 4.x
Need More Information

Hi Vborcard,

Thanks for the report and sorry you're experiencing this issue.

It seems like Bolt fails to generate valid C# for an AOT stub for Mixpanel.

Could you please provide:

  1. The full code of the method that fails to compile in AotStubs.cs
  2. If you're comfortable with Visual Studio, use Go To Definition on the implicit conversion and paste the signature of the ambiguous methods

If we can't deduce what's happening from there, we could try reproducing a project with Mixpanel. Is it free? If so, please send us a minimal project that reproduces this issue. (Make sure to remove the Ludiq folder before uploading).

Hi Lazlo,

Sure. That's the code. I tried to show the signature in Visual Studio but no success. 

And yes, Mixpanel is free. Thx.

// mixpanel.Value.op_Implicit
[global::UnityEngine.Scripting.PreserveAttribute()]
public static void mixpanel_Value_op_Implicit_77()
{
global::mixpanel.Value arg0 = default(global::mixpanel.Value);
string conversion = ((string)(arg0));
global::Ludiq.StaticFunctionInvoker optimized = new global::Ludiq.StaticFunctionInvoker(default(global::System.Reflection.MethodInfo));
optimized.Invoke(null, arg0);
optimized.Invoke(default(object[]));
}