Uh oh!
There was an error while loading. Please reload this page.
[api-merge] Update "constant" values if they change between API levels. - #9004
Conversation
With this updated |
89ecb38 to
96e1e86CompareSpaces, not tabs.
jonpryor
commented
Jun 7, 2024
Draft commit message: Context: https://github.com/xamarin/xamarin-android/issues/9000
Context: ac3b405759dfcb3f24a551e8f408ed551b78612f
In Issue #9000, we learned that:
- Constant values can change between Android API levels
-`api-merge` does not update constant values in the final `api.xml`
if they do change
Update `api-merge` to update constant values if they change, and update
`api-VanillaIceCream.xml` with the new `api-merge` logic. |
jonpryor
commented
Jun 7, 2024
Where does this "Mismatch" message come from? I don't see anything in this PR which would emit such a message, and |
It is a quick local script I wrote that compares We can leave the bones of it here for future reference: classMismatchedEnumValues{staticstringenum_csv=@"C:\code\xamarin-android\src\Mono.Android\map.csv";staticstringapi_xml=@"C:\code\xamarin-android-backport\src\Mono.Android\Profiles\api-VanillaIceCream.xml";publicstaticvoidDo(){varconsts=ConstantsParser.FromEnumMapCsv(enum_csv).Where(c =>c.Action.In(ConstantAction.Enumify)).ToList();varxml=newXmlDocument();xml.Load(api_xml);foreach(varcinconsts){varpackage=c.JavaPackage.StartsWith("I:")?c.JavaPackage.Substring(2):c.JavaPackage;varelem=xml.SelectSingleNode($"/api/package[@name='{package.Replace('/','.')}']/*[@name='{c.JavaType.Replace('$','.')}']/field[@name='{c.JavaName}']");if(elemisnull){Console.WriteLine($"Orphan: Could not find {c.JavaPackage}.{c.JavaType}.{c.JavaName} [API-{c.ApiLevel}]");continue;}varvalue=elem.Attributes?["value"]?.Value??"";if(value!=c.Value)Console.WriteLine($"Mismatch: {c.JavaPackage}/{c.JavaType}.{c.JavaName}{c.Value} != {value} [API-{c.ApiLevel}]");}}}(Requires a reference to |
* main: (22 commits) Bump to dotnet/android-tools@1c09dcc (#9026) Bump to dotnet/java-interop@ccafbe6 (#9025) [Mono.Android-Tests] Fix repo URL in redirect tests (#9035) [ci] Update checkout path for nightly build (#9028) [ci] Fix android source path for MAUI test job (#9030) Link Code of Conduct (#9034) [ci] Update sdk-insertions trigger to manual only (#9029) Update java-interop and android-tools submodule mentions (#9023) LEGO: Merge pull request 9022 [Xamarin.Android.Build.Tasks] fastdev works with aab files (#8990) Use new binutils URL (#9019) Localized file check-in by OneLocBuild Task: Build definition ID 17928: Build ID 9686669 (#9011) LEGO: Merge pull request 9015 [api-merge] Update "constant" values to mirror latest API levels (#9004) [Mono.Android] Fix wrong value for `ApplicationExitInfoReason.Other` (#9003) [Mono.Android] Fix omitted Gl* constants. (#9009) [manifest-attribute-codegen] Generate custom attribute declarations (#8781) [tests] Reduce default build output verbosity (#9002) [templates] Update Wear OS en template string (#9005) [build] Do not provision JDK 8 (#8999) ...
* main: (26 commits) Make APK and shared library alignment configurable (#9046) [r8] update proguard rule to keep .NET runtime classes (#9044) Explicitly align to 4k (#9041) [trimming] preserve custom views and `$(AndroidHttpClientHandlerType)` (#8954) Ignore split configs when bundle config moves shared libraries to base.apk (#8987) Bump to dotnet/android-tools@1c09dcc (#9026) Bump to dotnet/java-interop@ccafbe6 (#9025) [Mono.Android-Tests] Fix repo URL in redirect tests (#9035) [ci] Update checkout path for nightly build (#9028) [ci] Fix android source path for MAUI test job (#9030) Link Code of Conduct (#9034) [ci] Update sdk-insertions trigger to manual only (#9029) Update java-interop and android-tools submodule mentions (#9023) LEGO: Merge pull request 9022 [Xamarin.Android.Build.Tasks] fastdev works with aab files (#8990) Use new binutils URL (#9019) Localized file check-in by OneLocBuild Task: Build definition ID 17928: Build ID 9686669 (#9011) LEGO: Merge pull request 9015 [api-merge] Update "constant" values to mirror latest API levels (#9004) [Mono.Android] Fix wrong value for `ApplicationExitInfoReason.Other` (#9003) ...
Context: #9000
In #9000, we learned that:
api-mergedoes not update constant values in the finalapi.xmlif they do changeUpdate
api-mergeto update constant values if they change, and updateapi-VanillaIceCream.xmlwith the newapi-mergelogic.