android-maps-compose icon indicating copy to clipboard operation
android-maps-compose copied to clipboard

fix: add stability configuration file to the core maps-compose projec…

Open bubenheimer opened this issue 1 year ago • 2 comments

…t. The currently configured types are all the immutable data types from com.google.android.gms.maps.model that are currently used in android-maps-compose:maps-compose. These types will now be considered @Stable by the compiler. Making immutable data types @Stable can be a more effective measure than relying on strong skipping, as stable types can use structural equality, whereas strong skipping merely relies on referential equality, as of today.

This commit also makes compose compiler report generation available via command-line options (-PcomposeCompilerMetrics=true, -PcomposeCompilerReports=true)

Fixes #152

bubenheimer avatar Jan 29 '24 09:01 bubenheimer

@kikoso are you open to reviewing this PR?

bubenheimer avatar Feb 08 '24 10:02 bubenheimer

@wangela can this PR receive a review, please?

bubenheimer avatar Feb 28 '24 22:02 bubenheimer

Hi @bubenheimer . Thanks for the PR, and for the patience while getting this reviewed.

This should improve the stability and performance. Is there a reason why you would not include the other types in the model folder?

kikoso avatar Apr 15 '24 13:04 kikoso

@kikoso The types in model are not generally immutable, which commonly would make them non-stable for Compose purposes. They would be covered by the upcoming strong skipping changes for handling non-stable types in Compose, which is a little less powerful than what we can achieve with stability configuration files.

I've validated for the types in the stability configuration file that they are immutable. These are all the Maps SDK model types currently in use in the maps-compose library.

I did not look at what's being used in maps-compose-utils, and did not provide a stability configuration file there, as I don't use that lib, not familiar with it. It can be done independently of this PR.

bubenheimer avatar Apr 15 '24 14:04 bubenheimer

@kikoso Actually, maps-compose uses some mutable types from model as well (e.g. Marker), but they need to be handled via strong skipping changes, not stability configuration file, for the the reason I gave above.

bubenheimer avatar Apr 15 '24 14:04 bubenheimer

Thanks @bubenheimer , that makes sense. We will wait until the strong skipping mode exits its experimental phase before adopting it. However, this already represents an improvement in terms of performance.

kikoso avatar Apr 16 '24 15:04 kikoso

:tada: This PR is included in version 4.3.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

googlemaps-bot avatar Apr 16 '24 16:04 googlemaps-bot