Repository navigation
StackOverflow exception in fuseConflicts function #4056
Description
Description
Hello!
We receive StackOverflow exception on updating packages in our environment(lots of Xamarin.Android packages). Looking into verbose logs we get alot of following records:
20 requirements left
- Xamarin.Android.Glide.DiskLruCache, >= 4.11.0.1 (from Xamarin.Android.Glide 4.11.0.1)
- Xamarin.Android.Glide.GifDecoder, >= 4.11.0.1 (from Xamarin.Android.Glide 4.11.0.1)
- Xamarin.AndroidX.Navigation.Common, >= 2.3.5.1 (from Xamarin.AndroidX.Navigation.Runtime 2.3.5.1)
- Xamarin.AndroidX.Lifecycle.ViewModel, >= 2.3.1.1 (from Xamarin.AndroidX.Navigation.Runtime 2.3.5.1)
- Xamarin.AndroidX.Lifecycle.ViewModelSavedState, >= 2.3.1.1 (from Xamarin.AndroidX.Navigation.Runtime 2.3.5.1)
- Xamarin.AndroidX.Lifecycle.Common, >= 2.3.1 (from Xamarin.AndroidX.Lifecycle.Runtime 2.3.1.1)
- Xamarin.AndroidX.Lifecycle.LiveData.Core, >= 2.3.0.1 (from Xamarin.AndroidX.Loader 1.1.0.7)
- Xamarin.AndroidX.Arch.Core.Runtime, >= 2.1.0.8 (from Xamarin.AndroidX.Lifecycle.Runtime 2.3.1.1)
- SQLitePCLRaw.core, >= 2.0.4 (from Microsoft.Data.Sqlite.Core 5.0.8)
- SQLitePCLRaw.lib.e_sqlite3.android, >= 2.0.4 (from SQLitePCLRaw.bundle_e_sqlite3 2.0.4)
- SQLitePCLRaw.provider.e_sqlite3, >= 2.0.4 (from SQLitePCLRaw.bundle_e_sqlite3 2.0.4)
- Xamarin.AndroidX.Core, >= 1.5 (from Xamarin.AndroidX.RecyclerView 1.2.1)
- Xamarin.AndroidX.Activity, >= 1.2.4.1 (from Xamarin.AndroidX.Navigation.Runtime 2.3.5.1)
- Xamarin.AndroidX.Annotation, >= 1.2.0.1 (from Xamarin.AndroidX.Arch.Core.Common 2.1.0.9)
- Xamarin.AndroidX.VectorDrawable, >= 1.1.0.7 (from Xamarin.AndroidX.AppCompat.AppCompatResources 1.2.0.7)
- Xamarin.AndroidX.VectorDrawable.Animated, >= 1.1.0.7 (from Xamarin.AndroidX.AppCompat.AppCompatResources 1.2.0.7)
- Xamarin.AndroidX.CustomView, >= 1.1.0.6 (from Xamarin.AndroidX.DrawerLayout 1.1.1.2)
- Xamarin.AndroidX.ExifInterface, >= 1.1.0.1 (from Xamarin.Android.Glide 4.11.0.1)
- Xamarin.AndroidX.Legacy.Support.Core.Utils, >= 1.0.0.7 (from Xamarin.GooglePlayServices.Stats 117.0.1)
- Xamarin.Javax.Inject, >= 1.0 (from Xamarin.Google.Dagger 2.37.0)
and so on... (i.e. 21 req left above).
Looking into the code i have discovered, that possible source of this error is lack of tail recursion in fuseConflicts:
PackegeResolver:1115.
So, the question is - Could somebody guide through this complex piece of code in my tries to fix this issue?
Repro steps
running paket update causes stack overflow
Expected behavior
No SO exception
Actual behavior
SO thrown
Known workarounds
No workaround
Activity
forki commentedon Aug 2, 2021
Hey, which version do you use? Can you please give a deps file which reproduces this?
vshapenko commentedon Aug 2, 2021
Hello, we are using 6.0.0-rc007, although bug is reproduced on 5.247.0 . I have attached a dependencies file.
Dolfik1 commentedon Aug 2, 2021
paket.dependencies.zip
Dolfik1 commentedon Aug 3, 2021
There is minimal repro
paket.dependenciesfile:Fix fsprojects#4056: StackOverflow exception in fuseConflicts function
Merge pull request #4059 from Dolfik1/fix-4056