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

Fix the incompatibility issue between Analytics and Messaging #319

Closed
wants to merge 3 commits into from

Conversation

Iguins
Copy link
Contributor

@Iguins Iguins commented Apr 7, 2020

Google Play Services Version (eg: 8.4.0):

V9.0

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

Yes

Describe your contribution

@mattleibow
Copy link
Contributor

mattleibow commented Apr 7, 2020

Error from CI:

...
2020-04-07T03:16:09.0434840Z ========================================
2020-04-07T03:16:09.0435200Z samples
2020-04-07T03:16:09.0435570Z ========================================
...
2020-04-07T03:16:09.0501560Z Errors in /Users/runner/runners/2.165.2/work/1/s/samples/all/FbAll/FbBuildAll.csproj
2020-04-07T03:16:09.0502380Z     NU1107: Version conflict detected for Xamarin.Android.Support.Compat. Install/reference Xamarin.Android.Support.Compat 28.0.0.3 directly to project FbBuildAll to resolve this issue.
2020-04-07T03:16:09.0504120Z      FbBuildAll -> Xamarin.Firebase.Ads 71.1601.0 -> Xamarin.GooglePlayServices.Ads 71.1720.1 -> Xamarin.Android.Support.CustomTabs 28.0.0.3 -> Xamarin.Android.Support.Compat (= 28.0.0.3)
2020-04-07T03:16:09.0505640Z      FbBuildAll -> Xamarin.Firebase.Abt 71.1601.0 -> Xamarin.GooglePlayServices.Basement 71.1620.0 -> Xamarin.Android.Support.v4 28.0.0.1 -> Xamarin.Android.Support.Compat (= 28.0.0.1).
2020-04-07T03:16:09.0506340Z 
2020-04-07T03:16:09.0506800Z Errors in /Users/runner/runners/2.165.2/work/1/s/samples/all/GpsBuildAll/GpsBuildAll.csproj
2020-04-07T03:16:09.0507650Z     NU1107: Version conflict detected for Xamarin.Android.Support.Compat. Install/reference Xamarin.Android.Support.Compat 28.0.0.3 directly to project GpsBuildAll to resolve this issue.
2020-04-07T03:16:09.0509390Z      GpsBuildAll -> Xamarin.GooglePlayServices.Cast.Framework 71.1602.0 -> Xamarin.Android.Support.v7.MediaRouter 28.0.0.3 -> Xamarin.Android.Support.Media.Compat 28.0.0.3 -> Xamarin.Android.Support.Compat (= 28.0.0.3)
2020-04-07T03:16:09.0511280Z      GpsBuildAll -> Xamarin.GooglePlayServices.Basement 71.1620.0 -> Xamarin.Android.Support.v4 28.0.0.1 -> Xamarin.Android.Support.Compat (= 28.0.0.1).
2020-04-07T03:16:09.0511910Z 
...

Basically, somewhere there is a dependency on a support library 28.0.0.1 and 28.0.0.3. I think Xamarin.GooglePlayServices.Basement is referencing an old versions somehow...

@moljac might know offhand why the versions are not matching in this build...

@moljac
Copy link
Member

moljac commented Apr 8, 2020

@GuillaumeSE @mattleibow

During repo consolidation attempts I have set (or tried to set) all dependencies in config.json to 28.0.0.3. Why 28.0.0.1 appears I have no idea.

https://github.com/xamarin/GooglePlayServicesComponents/blob/master/config.json#L693-L732

Smells like some transitive dependency pulls 28.0.0.1 version[s]. Not sure. Wild guess.

Copy link
Member

@moljac moljac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

due to the fact that dotnet does not have reinstall concept. I use this trick for installation/reinstallation:

dotnet tool uninstall --global Cake.Tool
dotnet tool install --global Cake.Tool

This way users are safe with the newest versions of the tools used to build the repo.

Othrewise approved.

@Iguins
Copy link
Contributor Author

Iguins commented Apr 8, 2020

Pushed a new commit to fix Xamarin.GooglePlayServices.Ads

@@ -613,13 +637,13 @@
"version" : "17.0.5",
"nugetVersion" : "71.1705.0",
"nugetId" : "Xamarin.Firebase.Measurement.Connector.Impl",
"dependencyOnly" : false
"dependencyOnly" : true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Firebase package, so we must bind it. It should be

"dependencyOnly" : false

@@ -461,7 +485,7 @@
"version" : "16.3.0",
"nugetVersion" : "71.1630.0",
"nugetId" : "Xamarin.Firebase.Analytics.Impl",
"dependencyOnly" : false
"dependencyOnly" : true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Firebase package, so we must bind it. It should be

"dependencyOnly" : false

Meaning of

"dependencyOnly" : true 

is that it is not bound in. this repo, but there is dependency nuget. Dependency nuget could have jar/aar as payload (reference jar) which is not bound, but we don't do that. You will see all of "dependencyOnly" : true are external packages (Android.Support and other mostly from XamarinComponents repo, TensorFlow, etc...)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand it is Impl, so maybe not relevant for bindings, but our internal convention was to bind those too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes the only issue what that the binderator was complaining for a superior version But no new version have been Feb, 2019.
What should be the good approach for that kind of situation?

Copy link
Member

@moljac moljac Apr 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

binderator was complaining for a superior version

This usually indicates something. OK. I have forked and am building. Will raise you PR (I hope)

@moljac
Copy link
Member

moljac commented Apr 9, 2020

This is crazy:

2020-04-07T03:16:09.0505640Z      FbBuildAll -> Xamarin.Firebase.Abt 71.1601.0 -> Xamarin.GooglePlayServices.Basement 71.1620.0 -> Xamarin.Android.Support.v4 28.0.0.1 -> Xamarin.Android.Support.Compat (= 28.0.0.1).

so:

Xamarin.GooglePlayServices.Basement 71.1620.0 -> Xamarin.Android.Support.v4 28.0.0.1 

and nuspec looks like this:

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>Xamarin.GooglePlayServices.Basement</id>
    <version>71.1620.0</version>
    <title>Xamarin.Android Bindings for Google Play Services -  Basement</title>
    <authors>Microsoft</authors>
    <owners>Microsoft</owners>
    <requireLicenseAcceptance>true</requireLicenseAcceptance>
    <licenseUrl>https://go.microsoft.com/fwlink/?linkid=865373</licenseUrl>
    <projectUrl>https://go.microsoft.com/fwlink/?linkid=865435</projectUrl>
    <iconUrl>https://raw.githubusercontent.com/xamarin/GooglePlayServicesComponents/master/icons/play-services-basement_128x128.png</iconUrl>
    <description>Xamarin.Android Bindings for Google Play Services - Basement 71.1620.0 

         - do not install directly</description>
    <copyright>© Microsoft Corporation. All rights reserved.</copyright>
    <tags>Xamarin.Android Bindings for Google Play Services</tags>
    <dependencies>
      <group targetFramework="MonoAndroid9.0">
        <dependency id="Xamarin.Android.Support.v4" version="28.0.0.3" include="All" />
        <dependency id="Xamarin.Build.Download" version="0.10.0" exclude="Build,Analyzers" />
      </group>
    </dependencies>
    <frameworkAssemblies>
      <frameworkAssembly assemblyName="Java.Interop" targetFramework="MonoAndroid9.0" />
    </frameworkAssemblies>
  </metadata>
</package>

Where does 28.0.0.1 come from?

@moljac
Copy link
Member

moljac commented Apr 10, 2020

@GuillaumeSE
When I build your fork I do get:

/Users/Shared/Projects/d/X/GPS-FB-gse/source/com.google.firebase/firebase-common/additions/TaskExtensions.cs(9,24): error CS0234: The type or namespace name 'Auth' does not exist in the namespace 'Firebase' (are you missing an assembly reference?) [/Users/Shared/Projects/d/X/GPS-FB-gse/generated/com.google.firebase.firebase-common/com.google.firebase.firebase-common.csproj]
    386794 Warning(s)
    1 Error(s)

I will check it and fix it with other stuff.

@Iguins
Copy link
Contributor Author

Iguins commented Apr 10, 2020

@GuillaumeSE
When I build your fork I do get:

/Users/Shared/Projects/d/X/GPS-FB-gse/source/com.google.firebase/firebase-common/additions/TaskExtensions.cs(9,24): error CS0234: The type or namespace name 'Auth' does not exist in the namespace 'Firebase' (are you missing an assembly reference?) [/Users/Shared/Projects/d/X/GPS-FB-gse/generated/com.google.firebase.firebase-common/com.google.firebase.firebase-common.csproj]
    386794 Warning(s)
    1 Error(s)

I will check it and fix it with other stuff.

Thanks! I'm investigating on my side with part I did wrong!.
But At least now seams the dependencies mismatch seams like solved

@moljac
Copy link
Member

moljac commented May 11, 2020

@GuillaumeSE

Sorry for delay, but I have to make master green with new tooling. As soon as I finish that I'll check this PR.

I hope this is OK with you.

@epsmae
Copy link

epsmae commented Aug 17, 2022

@moljac Is there any update for this? Can you give a rough estimation when you expect to have this fixed?

@jpobst
Copy link
Contributor

jpobst commented May 3, 2024

These versions predate AndroidX, so I'm guessing this is no longer relevant.

@jpobst jpobst closed this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants