Skip to content

Conversation

@kentcb
Copy link
Contributor

@kentcb kentcb commented Nov 24, 2017

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Bug fix (build).

What is the current behavior? (You can also link to an open issue here)

The release of Xamarin.Forms 2.5 broke the build. Here's what happened, to the best of my understanding...

Xamarin.Forms 2.5 is the first version to have different platforms depend on different versions of the Android support libraries:

image

For reasons I don't fully understand, this was causing the NuGet package install in the XamForms event generation step to fail with:

2017-11-24 19:46:34.242 +10:30 [Warning] An exception was thrown whilst retrieving or installing "Xamarin.Forms": "System.InvalidOperationException: Updating 'Xamarin.Android.Support.v4 23.3.0' to 'Xamarin.Android.Support.v4 25.4.0.2' failed. Unable to find versions of 'Xamarin.Forms, Xamarin.Android.Support.v7.AppCompat, Xamarin.Android.Support.Vector.Drawable, Xamarin.Android.Support.Animated.Vector.Drawable, Xamarin.Android.Support.v7.RecyclerView, Xamarin.Android.Support.Design, Xamarin.Android.Support.v7.MediaRouter' that are compatible with 'Xamarin.Android.Support.v4 25.4.0.2'.
   at NuGet.InstallWalker.OnBeforePackageWalk(IPackage package)
   at NuGet.PackageWalker.Walk(IPackage package)
   at NuGet.PackageWalker.Walk(IPackage package)
   at NuGet.InstallWalker.ResolveOperations(IPackage package)
   at NuGet.PackageManager.Execute(IPackage package, IPackageOperationResolver resolver)
   at NuGet.PackageManager.InstallPackage(IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
   at EventBuilder.Platforms.XamForms.<>c__DisplayClass1_0.<.ctor>b__2() in C:\Users\Kent\Repository\ReactiveUI\src\EventBuilder\Platforms\XamForms.cs:line 48
   at Polly.Retry.RetryPolicy.Implementation(Action action, IEnumerable`1 shouldRetryPredicates, Func`1 policyStateFactory)"

But I don't see why we even need to install dependencies when installing the Xamarin.Forms package for the purposes of generating events. Therefore, I disabled the installation of dependencies to get past this problem.

However, the second problem was that XF 2.5 includes events that depend on types that are not in 2.4. Therefore, in order to build the generated events, the ReactiveUI.XamForms.Events library had to also depend on 2.5. And I figured it makes sense for the ReactiveUI.XamForms library to follow suit.

What might this PR break?

Anyone who isn't on XF 2.5 yet won't be able to upgrade.

Please check if the PR fulfills these requirements

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Other information:

@dnfclas
Copy link

dnfclas commented Nov 24, 2017

@kentcb,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@coveralls
Copy link

Coverage Status

Coverage remained the same at 69.619% when pulling cbc9879 on kentcb:xf-events-build-issue into 05fed1a on reactiveui:develop.

@kentcb kentcb changed the title [WIP] fix build chore: fix build Nov 24, 2017
@kentcb
Copy link
Contributor Author

kentcb commented Nov 24, 2017

It would be aces if @ghuntley and @olevett could validate my thinking here - I'm not 💯 sure of our policy with respect to bumping our XF dependency.

@olevett
Copy link
Member

olevett commented Nov 24, 2017

Not sure how big a problem upgrading to XF2.5 is likely to be for consumers, if it's likely to be difficult, it might be worth adding a monoandroid7.0 and a monoandroid7.1 target with the different dependencies.

(I'm pro upgrading though, and think this should be fine)

@kentcb kentcb added this to the vNext milestone Nov 28, 2017
@kentcb kentcb merged commit 7184cc9 into reactiveui:develop Nov 28, 2017
glennawatson pushed a commit that referenced this pull request Mar 23, 2019
 
chore: fix build (#1542)
@lock lock bot locked and limited conversation to collaborators Jun 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants