Rebuild Compose.Material3.Android to pick up CornerBasedShape APIs (#1452)#1469
Open
jonathanpeppers wants to merge 1 commit into
Open
Rebuild Compose.Material3.Android to pick up CornerBasedShape APIs (#1452)#1469jonathanpeppers wants to merge 1 commit into
jonathanpeppers wants to merge 1 commit into
Conversation
…1452) Fixes #1452. When `Xamarin.AndroidX.Compose.Material3Android 1.4.0.3` was packaged in PR #1418, several of its Compose dependencies were still empty facades (real bindings for `Compose.UI.Graphics`, `Compose.UI.Text`, `Compose.UI.Unit`, and parts of `Compose.Foundation` were un-stripped *after* that release in PRs #1438, #1440, #1448, #1454, #1458). In particular, `androidx.compose.foundation.shape.CornerBasedShape` was not resolvable to the binding generator at the time `material3-android` was built, so the generator silently dropped every member that referenced it - including the `Shapes(extraSmall, small, medium, large, extraLarge)` secondary constructor reported in #1452, the `Shapes.{ExtraSmall, Small, Medium, Large, ExtraLarge}` properties, `Shapes.Copy(...)`, and the `*Defaults.GetShape(...)` / `SegmentedButtonDefaults.GetBaseShape(...)` accessors across the package. Concretely, `Xamarin.AndroidX.Compose.Material3.Shapes` in the published 1.4.0.3 binary has zero references to `CornerBasedShape` and only exposes the no-arg `Shapes()` ctor. A fresh rebuild against the current dependency graph produces 27 references to `CornerBasedShape` on that same class, including the 5-arg ctor. No source/transform changes are required - rebuilding against the now- real Compose dependencies is the fix. This bumps the NuGet revision so the rebuilt assembly actually ships, and refreshes `PublicAPI.Unshipped.txt` to record the ~446 newly bound members (auto-regenerated by `Mono.ApiTools.MSBuildTasks` in `_GeneratePublicApiFiles`). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR rebuilds the androidx.compose.material3:material3-android binding so the Xamarin.AndroidX.Compose.Material3Android NuGet ships the now-bindable CornerBasedShape-related APIs (and other members that were previously dropped when Compose dependencies were still empty facades).
Changes:
- Bumps
Xamarin.AndroidX.Compose.Material3AndroidnugetVersionfrom1.4.0.3to1.4.0.4to publish the rebuilt assembly. - Updates the
material3-androidPublicAPI baseline to include the newly surfaced members (includingShapes(CornerBasedShape × 5),Shapes.Copy(...),ShapeDefaults.*, and many related*Defaults.GetShape(...)accessors).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| config.json | Bumps material3-android nugetVersion to ship the rebuilt binding. |
| source/androidx.compose.material3/material3-android/PublicAPI/PublicAPI.Unshipped.txt | Regenerated PublicAPI baseline capturing the newly bound Material3 APIs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1452.
What's happening
When
Xamarin.AndroidX.Compose.Material3Android 1.4.0.3was packaged in #1418, several of its Compose dependencies were still empty facades. Real bindings forCompose.UI.Graphics,Compose.UI.Text,Compose.UI.Unit, and parts ofCompose.Foundationwere un-stripped after that release in #1438, #1440, #1448, #1454, and #1458.In particular,
androidx.compose.foundation.shape.CornerBasedShapewas not resolvable to the binding generator at the timematerial3-androidwas built, so the generator silently dropped every member that referenced it — including theShapes(extraSmall, small, medium, large, extraLarge)secondary constructor reported in #1452, theShapes.{ExtraSmall, Small, Medium, Large, ExtraLarge}properties,Shapes.Copy(...), and the*Defaults.GetShape(...)/SegmentedButtonDefaults.GetBaseShape(...)accessors across the package.Evidence
Same source, just a rebuild against the current dependency graph:
ShapesShapesCornerBasedShapeShapes()onlyShapes(),Shapes(CornerBasedShape × 5),ExtraSmall,Small,Medium,Large,ExtraLarge,Copy(CornerBasedShape × 5), …(Note: the issue was filed against
ShapesKt.Shapes(...)— that top-level Kotlin function does not exist upstream. The actual missing API is the secondary constructornew Shapes(extraSmall, small, medium, large, extraLarge)on theShapesclass. The reporter's recommended call site,Shapes(extraSmall = ..., small = ..., ...), will work once this constructor is bound.)What this PR does
config.json: bumpsmaterial3-androidnugetVersion1.4.0.3→1.4.0.4so the rebuilt assembly actually ships.source/androidx.compose.material3/material3-android/PublicAPI/PublicAPI.Unshipped.txt: records the ~446 newly-bound members. This file is auto-regenerated byMono.ApiTools.MSBuildTasksvia_GeneratePublicApiFilesinDirectory.Build.targets; the diff is just thePublicApiAnalyzerbaseline catching up to reality.No source-level transforms or
Metadata.xmlchanges are needed — rebuilding against the now-real Compose dependencies is the actual fix.