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

[WIP] Add proper versioning of MonoAndroid framework. #2427

Merged
merged 6 commits into from Jun 19, 2017

Conversation

Projects
None yet
3 participants
@dmunch
Contributor

dmunch commented Jun 16, 2017

So far no versioning for the MonoAndroid framework has been handled. However, I've been running into the case of different version constraints on transitive dependencies depending on the MonoAndroid framework version. As an example (and actually the concrete case I'm running into) take the nuspec of Xamarin.Forms.

      <group targetFramework="MonoAndroid1.0">
        <dependency id="Xamarin.Android.Support.v4" version="[23.3.0]" />
        <dependency id="Xamarin.Android.Support.Design" version="[23.3.0]" />
        <dependency id="Xamarin.Android.Support.v7.AppCompat" version="[23.3.0]" />
        <dependency id="Xamarin.Android.Support.v7.CardView" version="[23.3.0]" />
        <dependency id="Xamarin.Android.Support.v7.MediaRouter" version="[23.3.0]" />
      </group>
      <group targetFramework="MonoAndroid7.0">
        <dependency id="Xamarin.Android.Support.v4" version="23.3.0" />
        <dependency id="Xamarin.Android.Support.Design" version="23.3.0" />
        <dependency id="Xamarin.Android.Support.v7.AppCompat" version="23.3.0" />
        <dependency id="Xamarin.Android.Support.v7.CardView" version="23.3.0" />
        <dependency id="Xamarin.Android.Support.v7.MediaRouter" version="23.3.0" />
      </group>

In my case I'd like to update the Xamarin.Android.* packages to a higher version. As a first step, and what worked pretty good and straight forward so far, I implemented proper versioning of the MonoAndroid framework. This is what this PR currently contains.

However, even with the proper MonoAndroid framework version handling paket still is not able to resolve the following paket.dependencies file.

framework: monoandroid70

source https://nuget.org/api/v2

nuget Xamarin.Forms == 2.3.4.247

nuget Xamarin.Android.Support.v4 == 25.3.1
nuget Xamarin.Android.Support.v7.RecyclerView == 25.3.1
nuget Xamarin.Android.Support.Design == 25.3.1
nuget Xamarin.Android.Support.v7.CardView == 25.3.1

From what I understood by reading the latest pull requests is that this involves framework restriction handling and has been refactored quite a lot in the last months.

I'm currently wondering if this kind of behavior is actually possible, and if so, at which part of the code I'd have to look to be able to understand its mechanism and maybe come up with a possible solution. Any hint and help is much appreciated!

Thanks a lot in advance, also for all the past work on paket which really is a joy to use!

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid Jun 16, 2017

Member

Let me take a look :)

Member

matthid commented Jun 16, 2017

Let me take a look :)

@dmunch

This comment has been minimized.

Show comment
Hide comment
@dmunch

dmunch Jun 16, 2017

Contributor

Wait a second, I might have forgotten to bump NuGetPackageCache.CurrentCacheVersion at some point. I just retried with the rebased version on 5.0.0-rc011 and the mentioned example is resolved fine now.

Contributor

dmunch commented Jun 16, 2017

Wait a second, I might have forgotten to bump NuGetPackageCache.CurrentCacheVersion at some point. I just retried with the rebased version on 5.0.0-rc011 and the mentioned example is resolved fine now.

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid Jun 16, 2017

Member

sounds good. btw there is a switch in the test suite to update all tests. so you don't have to update manually. can't link right now as i'm on mobile... just keep an eye on the diff if the changes are sane

Member

matthid commented Jun 16, 2017

sounds good. btw there is a switch in the test suite to update all tests. so you don't have to update manually. can't link right now as i'm on mobile... just keep an eye on the diff if the changes are sane

@matthid

This comment has been minimized.

Show comment
Hide comment
@dmunch

This comment has been minimized.

Show comment
Hide comment
@dmunch

dmunch Jun 16, 2017

Contributor

Thanks for the hint! I wont be able to touch this during the week-end, but I should have updated test-cases and final modifications ready during next week. I've aleady been using paket with those modifications in our solution with the desired results, so I think I'm on the right way here.

Contributor

dmunch commented Jun 16, 2017

Thanks for the hint! I wont be able to touch this during the week-end, but I should have updated test-cases and final modifications ready during next week. I've aleady been using paket with those modifications in our solution with the desired results, so I think I'm on the right way here.

@dmunch

This comment has been minimized.

Show comment
Hide comment
@dmunch

dmunch Jun 19, 2017

Contributor

Ok so from my side this is considered done, not sure why the Travis pipeline fails, is there some flakyness on mono?

Contributor

dmunch commented Jun 19, 2017

Ok so from my side this is considered done, not sure why the Travis pipeline fails, is there some flakyness on mono?

@matthid

Looks very good! If the 4.03 is not a bug (because the mabuild condition should be correct) then it lgtm

@matthid

This comment has been minimized.

Show comment
Hide comment
@matthid

matthid Jun 19, 2017

Member

Travis looks like another failure i've not seen jet...

Member

matthid commented Jun 19, 2017

Travis looks like another failure i've not seen jet...

@forki forki merged commit dbcb318 into fsprojects:master Jun 19, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment