Skip to content
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

Manual updates 20220215 (after 3 months) #575

Closed
wants to merge 43 commits into from
Closed

Manual updates 20220215 (after 3 months) #575

wants to merge 43 commits into from

Conversation

moljac
Copy link
Member

@moljac moljac commented Feb 16, 2022

PR split into:

Does this change any of the generated binding API's?

Most likely due to

  • updates
  • new packages

Describe your contribution

Fixes for

@moljac moljac mentioned this pull request Feb 16, 2022
@jpobst
Copy link
Contributor

jpobst commented Apr 14, 2022

The current CI error is:

Xamarin.Firebase.Measurement.Connector.Impl depends on Xamarin.GooglePlayServices.Measurement.Api (>= 117.0.5.4) but Xamarin.GooglePlayServices.Measurement.Api 117.0.5.4 was not found. An approximate best match of Xamarin.GooglePlayServices.Measurement.Api 117.2.2 was resolved.

This is likely because we have both of these entries:

{
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-api",
        "version": "19.0.2",
        "nugetVersion": "119.0.2",
        "nugetId": "Xamarin.GooglePlayServices.Measurement.Api",
        "dependencyOnly": false
},
{
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-api",
        "version": "16.3.0",
        "nugetVersion": "117.0.5.4",
        "nugetId": "Xamarin.GooglePlayServices.Measurement.Api",
        "dependencyOnly": true
}

This will cause some projects to take a <ProjectReference> on the 119.0.2 version while other projects take a <PackageReference> to the 117.0.5.4 version.

Each artifact should only be specified once so that everything uses the same version, preventing conflicts.

@moljac
Copy link
Member Author

moljac commented Apr 14, 2022

The current CI error is:

Xamarin.Firebase.Measurement.Connector.Impl depends on Xamarin.GooglePlayServices.Measurement.Api (>= 117.0.5.4) but Xamarin.GooglePlayServices.Measurement.Api 117.0.5.4 was not found. An approximate best match of Xamarin.GooglePlayServices.Measurement.Api 117.2.2 was resolved.

This is likely because we have both of these entries:

{
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-api",
        "version": "19.0.2",
        "nugetVersion": "119.0.2",
        "nugetId": "Xamarin.GooglePlayServices.Measurement.Api",
        "dependencyOnly": false
},
{
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-api",
        "version": "16.3.0",
        "nugetVersion": "117.0.5.4",
        "nugetId": "Xamarin.GooglePlayServices.Measurement.Api",
        "dependencyOnly": true
}

This will cause some projects to take a <ProjectReference> on the 119.0.2 version while other projects take a <PackageReference> to the 117.0.5.4 version.

Each artifact should only be specified once so that everything uses the same version, preventing conflicts.

good spot... but, IIRC 1st one is new to bind and 2nd one is dependency of some package I had to add to make binderator happy.

I will try not to bump/update the 1st one. That might unblock the rest

Wild guess only

@moljac
Copy link
Member Author

moljac commented Apr 15, 2022

Entry

{
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-api",
        "version": "16.3.0",
        "nugetVersion": "117.0.5.4",
        "nugetId": "Xamarin.GooglePlayServices.Measurement.Api",
        "dependencyOnly": true
}

was dangerous trick (pushing different nuget version)

So after doing it correctly (proper version):

      {
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-api",
        "version": "16.3.0",
        "nugetVersion": "116.3.0",
        "nugetId": "Xamarin.GooglePlayServices.Measurement.Api",
        "dependencyOnly": true
      },

leads to binderator errors:

Dependency errors : 4
1
	System.Exception: 
No matching artifact config found for: 
			com.google.android.gms.play-services-measurement-base:[19.0.1]
to satisfy dependency of: 
			com.google.android.gms.play-services-measurement-api:19.0.1

	Please add following json snippet to config.json:


      {
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-base",
        "version": "[19.0.1]",
        "nugetVersion": "CHECK PREFIX [19.0.1]",
        "nugetId": "CHECK NUGET ID",
        "dependencyOnly": true/false
      }
						


2
	System.Exception: 
No matching artifact config found for: 
			com.google.android.gms.play-services-measurement-sdk-api:[19.0.1]
to satisfy dependency of: 
			com.google.android.gms.play-services-measurement-api:19.0.1

	Please add following json snippet to config.json:


      {
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-sdk-api",
        "version": "[19.0.1]",
        "nugetVersion": "CHECK PREFIX [19.0.1]",
        "nugetId": "CHECK NUGET ID",
        "dependencyOnly": true/false
      }
						


3
	System.Exception: 
No matching artifact config found for: 
			com.google.android.gms.play-services-measurement-api:19.0.2
to satisfy dependency of: 
			com.google.firebase.firebase-analytics:19.0.2

	Please add following json snippet to config.json:


      {
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-api",
        "version": "19.0.2",
        "nugetVersion": "CHECK PREFIX 19.0.2",
        "nugetId": "CHECK NUGET ID",
        "dependencyOnly": true/false
      }
						


4
	System.Exception: 
No matching artifact config found for: 
			com.google.android.gms.play-services-measurement-api:[16.3.0]
to satisfy dependency of: 
			com.google.firebase.firebase-measurement-connector-impl:17.0.5

	Please add following json snippet to config.json:


      {
        "groupId": "com.google.android.gms",
        "artifactId": "play-services-measurement-api",
        "version": "[16.3.0]",
        "nugetVersion": "CHECK PREFIX [16.3.0]",
        "nugetId": "CHECK NUGET ID",
        "dependencyOnly": true/false
      }

The problem is requirement for exact version [16.3.0] which was not published as nuget with AndroidX support (100 prefix), though it was published with Android.Support support (71 prefix)

https://www.nuget.org/packages/Xamarin.GooglePlayServices.Measurement.Api/

@jpobst
Copy link
Contributor

jpobst commented Apr 19, 2022

It feels like this has gotten so far out of date that doing it all as one gigantic PR isn't going to be feasible. Let's try to break this up into smaller more manageable chunks.

I would suggest we start at the bottom of the dependency tree, get those updates merged, and then move up the tree.

That is, we work through this list as separate PRs:

  • Dependencies (glide/square/grpc/etc)
  • GPS (minus MLKit stuff like play-services-mlkit)
  • Firebase
  • MLKit

If we need to update everything to MonoAndroid12.0 first due to AndroidX dependencies, let's do that first in a separate PR and get it merged.

@moljac
Copy link
Member Author

moljac commented Apr 20, 2022

It feels like this has gotten so far out of date that doing it all as one gigantic PR isn't going to be feasible.

7 months. Postponing will only make it worse.

Let's try to break this up into smaller more manageable chunks.

I'm not sure this will be easy task:

see:

https://www.nuget.org/packages/Xamarin.GooglePlayServices.Measurement.Api/

GPS depending on FB.

And since begin of 2022 we have AndroidX depending on FB:

https://github.com/xamarin/AndroidX/blob/mu-20220124/config.json#L1817-L1840

xamarin/AndroidX#468

I would suggest we start at the bottom of the dependency tree, get those updates merged, and then move up the tree.

That is, we work through this list as separate PRs:

  • Dependencies (glide/square/grpc/etc)
  • GPS (minus MLKit stuff like play-services-mlkit)
  • Firebase
  • MLKit

If we need to update everything to MonoAndroid12.0 first due to AndroidX dependencies, let's do that first in a separate PR and get it merged.

main is on MonoAndroid12.0 and this PR was created 2 months ago, about the time when we switched AndroidX to MonoAndroid12.0, so it was added later.

https://github.com/xamarin/GooglePlayServicesComponents/blob/mu-20220215/source/GooglePlayServicesProject.cshtml#L6-L7

IMO hopefully feasible PRs will be:

  1. dependencies and MonoAndroid12.0
  2. GPS-FB
  3. MLKit

feasible in a sense that it will not take weeks to approve, merge and publish.

And skipping versions should not be done. I am willing to do manual updates until we catch up with current status. From my experience skipping minor version could lead to acceptable cadence and results.

@moljac
Copy link
Member Author

moljac commented Apr 21, 2022

More fun:

Blocked by dependencies having dependencies from FB:

updating dependencies only:

Dependency errors : 1
1
	System.Exception: 
No matching artifact config found for: 
			com.google.firebase.firebase-encoders-proto:16.0.0
to satisfy dependency of: 
			com.google.android.datatransport.transport-runtime:3.1.3

	Please add following json snippet to config.json:


      {
        "groupId": "com.google.firebase",
        "artifactId": "firebase-encoders-proto",
        "version": "16.0.0",
        "nugetVersion": "CHECK PREFIX 16.0.0",
        "nugetId": "CHECK NUGET ID",
        "dependencyOnly": true/false
      }						

it boils down almost to do config.json update per artifact.

@moljac moljac closed this Jun 12, 2023
@moljac moljac deleted the mu-20220215 branch February 9, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment