New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paket doesn't properly respect MonoAndroid7.0 dependencies on Xamarin.Forms package #2762

Closed
tastyeggs opened this Issue Sep 14, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@tastyeggs
Copy link
Contributor

tastyeggs commented Sep 14, 2017

Description

Xamarin.Forms >= 2.3.4 depends Xamarin.Android.Support.* packages >= 23.3, but for MonoAndroid1, it is pinned at exactly 23.3.

Paket always assumes it needs to be exactly 23.3

Repro steps

This paket.dependencies file will fail:

content: none
redirects: on
source https://www.nuget.org/api/v2/

nuget Xamarin.Forms 2.3.4.231
nuget Xamarin.Android.Support.Design 25.4.0.2

Expected behavior

Same as NuGet, both packages must install, as they're compatible

Actual behavior

Paket version 5.96.1
Resolving packages for group Main:
 - Xamarin.Android.Support.Design is pinned to 25.4.0.2
 - Xamarin.Forms is pinned to 2.3.4.231
Performance:
 - Resolver: 2 seconds (1 runs)
    - Runtime: 317 milliseconds
    - Blocked (retrieving package details): 317 milliseconds (2 times)
    - Blocked (retrieving package versions): 1 second (2 times)
 - Average Request Time: 448 milliseconds
 - Number of Requests: 16
 - Runtime: 3 seconds
Paket failed with
-> There was a version conflict during package resolution.
     Resolved packages:
      - Xamarin.Android.Support.Design 25.4.0.2
     Conflict detected:
      - Dependencies file requested package Xamarin.Android.Support.Design: 25.4.0.2
      - Xamarin.Forms 2.3.4.231 requested package Xamarin.Android.Support.Design: 23.3

     Please try to relax some conditions or resolve the conflict manually (see http://fsprojects.github.io/Paket/nuget-dependencies.html#Use-exactly-this-version-constraint).

Known workarounds

  1. Use NuGet
  2. Don't use Xam.Support > 23.3

Event specifying == doesn't work, with nuget Xamarin.Android.Support.v7.AppCompat == 25.4.0.2:

Conflict detected: - Dependencies file requested package Xamarin.Android.Support.v7.AppCompat: == 25.4.0.2 - Xamarin.Android.Support.Design 25.4.0.2 requested package Xamarin.Android.Support.v7.AppCompat: 25.4.0.2 - Xamarin.Forms 2.3.4.231 requested package Xamarin.Android.Support.v7.AppCompat: 23.3

@matthid

This comment has been minimized.

Copy link
Member

matthid commented Sep 14, 2017

@forki it seems like finally they got us ;)

@forki

This comment has been minimized.

Copy link
Member

forki commented Sep 14, 2017

oh myy...

@tastyeggs

This comment has been minimized.

Copy link
Contributor

tastyeggs commented Sep 14, 2017

what's the scoop?

@matthid

This comment has been minimized.

Copy link
Member

matthid commented Sep 14, 2017

So I guess you don't want to build for MonoAndroid1? I guess you might be able to filter that with framework restrictions ..

@matthid

This comment has been minimized.

Copy link
Member

matthid commented Sep 14, 2017

Paket by default/design tries to find a global solution of packages valid to compile for all frameworks. It will not (like Nuget) allow different versions of a single package.

Paket tells you that such a solution doesn't exist for your specified dependencies...

So you can either change your version or tell paket you don't care about monoandroid framework

@matthid

This comment has been minimized.

Copy link
Member

matthid commented Sep 14, 2017

== on the other hand should work as well if applied to the correct packages, but you basically will have an unsound resolution in that case.

@tastyeggs

This comment has been minimized.

Copy link
Contributor

tastyeggs commented Sep 14, 2017

Ah, so simple. Works :)

content: none
redirects: on
source https://www.nuget.org/api/v2/

nuget Xamarin.Forms 2.3.4.231 framework: MonoAndroid7.0
nuget Xamarin.Android.Support.Design == 25.4.0.2
nuget Xamarin.Android.Support.v7.AppCompat == 25.4.0.2

@tastyeggs tastyeggs closed this Sep 14, 2017

@forki

This comment has been minimized.

Copy link
Member

forki commented Sep 14, 2017

to make it very clear: This is abuse of the concept of a package. I wished MS would be more careful...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment