dotnet / dotnet/android-libraries
Error running `api-diff` on `Xamarin.AndroidX.Car.App.App`
- Dominant language
- C#
- Stars
- 317
- Forks
- 73
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 17
Description
Attempting to run `api-diff` on `Xamarin.AndroidX.Car.App.App` `1.4.0` produces the following error:
```
System.ArgumentOutOfRangeException
HResult=0x80131502
Message=Length cannot be less than zero. (Parameter 'length')
Source=System.Private.CoreLib
StackTrace:
at System.String.Substring(Int32 startIndex, Int32 length)
at Mono.ApiTools.Helper.GetTypeName(String type, State state) in C:\code\Mono.ApiTools.NuGetDiff\Mono.ApiTools.ApiDiffFormatted\Helper.cs:line 154
```
This code is attempting to "pretty" format the following type:
```
System.Collections.Generic.IDictionary`2[System.Collections.Generic.ICollection`1[AndroidX.Car.App.Hardware.Common.CarZone],System.Collections.Generic.ICollection`1[Java.Lang.Integer]]
// which recurses into:
System.Collections.Generic.ICollection`1[AndroidX.Car.App.Hardware.Common.CarZone],System.Collections.Generic.ICollection`1[Java.Lang.Integer]
// which recurses into:
AndroidX.Car.App.Hardware.Common.CarZone],System.Collections.Generic.ICollection`1[Java.Lang.Integer
```
Our `api-diff-tools` tooling is in flux currently, and we probably shouldn't prioritize this fix right now.
As such, this is the documentation for the future fix, and we will just skip running `api-diff` on this one package for now.
Contributor guide
Assessment
This issue has not been assessed yet.