xamarin / AndroidX

AndroidX bindings for .NET for Android
MIT License
182 stars 45 forks source link

`io.grpc:grpc-api:1.64.2` crashes `dotnet build` #988

Open moljac opened 23 hours ago

moljac commented 23 hours ago

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

nuget packages AndroidX and GooglePlayServices-Firebase-MLKit

Description

Bindings for io.grpc:grpc-api:1.64.2 crashes dotnet build

/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.0.113/tools/Xamarin.Android.Bindings.Core.targets(99,5): 
error MSB6006: 
    "dotnet" exited with code 134. 
[./generated/io.grpc.grpc-api/io.grpc.grpc-api.csproj::TargetFramework=net8.0-android]
    17336 Warning(s)
    1 Error(s)

Steps to Reproduce

  1. bump grpc to 1.64.2
  2. run binderator

Did you find any workaround?

No. undergoing investigation.

Relevant log output

Binlog hangs MsBuildLogViewer (Avalonia App) on Mac.

/usr/local/share/dotnet/packs/Microsoft.Android.Sdk.Darwin/34.0.113/tools/Xamarin.Android.Bindings.Core.targets(99,5): 
error MSB6006: 
    "dotnet" exited with code 134. 
[./generated/io.grpc.grpc-api/io.grpc.grpc-api.csproj::TargetFramework=net8.0-android]
    17336 Warning(s)
    1 Error(s)

msbuild.binlog.zip

Online version at https://live.msbuildlog.com/

System.NotSupportedException: Unsupported log file format. Latest supported version is 16, the log file has version 21. at Microsoft.Build.Logging.StructuredLogger.BinLogReader.EnsureFileFormatVersionKnown(Int32 fileFormatVersion) at Microsoft.Build.Logging.StructuredLogger.BinLogReader.Replay(Stream stream, Func`3 progressFunc) at Microsoft.Build.Logging.StructuredLogger.BinaryLog.ReadBuild(Stream stream, Byte[] projectImportsArchive, Func`3 progressFunc) at StructuredLogViewerWASM.Shared.NavMenu.LoadBinlog(MemoryStream memoryStream) at StructuredLogViewerWASM.Shared.NavMenu.ReadFile(IFileListEntry[] files) 
jpobst commented 5 hours ago

This appears to be a stack overflow:

Repeat 13729 times:
--------------------------------
   at generator.SourceWriters.BoundMethod.GetDeclaringTypeOfExplicitInterfaceMethod(MonoDroid.Generation.Method)
--------------------------------
   at generator.SourceWriters.BoundMethod..ctor(MonoDroid.Generation.GenBase, MonoDroid.Generation.Method, MonoDroid.Generation.CodeGenerationOptions, Boolean)
   at generator.SourceWriters.BoundInterface.AddMethods(MonoDroid.Generation.InterfaceGen, MonoDroid.Generation.CodeGenerationOptions)
   at generator.SourceWriters.BoundInterface..ctor(MonoDroid.Generation.InterfaceGen, MonoDroid.Generation.CodeGenerationOptions, MonoDroid.Generation.CodeGeneratorContext, MonoDroid.Generation.GenerationInfo)
   at MonoDroid.Generation.JavaInteropCodeGenerator.WriteType(MonoDroid.Generation.GenBase, System.String, MonoDroid.Generation.GenerationInfo)
   at MonoDroid.Generation.InterfaceGen.Generate(MonoDroid.Generation.CodeGenerationOptions, MonoDroid.Generation.GenerationInfo)
   at Xamarin.Android.Binder.CodeGenerator.Run(Xamarin.Android.Binder.CodeGeneratorOptions, Java.Interop.Tools.Cecil.DirectoryAssemblyResolver)
   at Xamarin.Android.Binder.CodeGenerator.Run(Xamarin.Android.Binder.CodeGeneratorOptions)
   at Xamarin.Android.Binder.CodeGenerator.Main(System.String[])

Working on a fix here: https://github.com/dotnet/java-interop/pull/1261

It may be able to be worked around by using <remove-node> on io.grpc.InternalConfigurator.