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

False positive: Calling a Google Map Composable composable function where a UI Composable composable was expected #598

Open
ln-12 opened this issue Jul 8, 2024 · 0 comments
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@ln-12
Copy link
Contributor

ln-12 commented Jul 8, 2024

I am using version 5.0.4 of this library. On my map, I need to add a composable marker which I am doing via MarkerComposable. This composable is marked with @GoogleMapComposable that should enforce correct usage (introduced in #130). I think there is an issue here as this gets triggered if I use a standard/non maps composable inside the MarkerComposable as this is then not marked with the @GoogleMapComposable annotation. Probably, there should be an exclude for this specific case as I cannot annotate all composables that I want to use with that annotation (for example a simple Text). Or is there a simple way to suppress it?

For me, this is quite annoying as we enforce our builds to not have any warnings.

Steps to reproduce

  1. Use some composable (Card, Text, ...) inside the MarkerComposable
  2. The build warning "Calling a Google Map Composable composable function where a UI Composable composable was expected" is triggered

Code example

MarkerComposable( // <-- has the @GoogleMapComposable annotation
    // ...
) {
    Text(text = "Hello World") // <-- does not have the @GoogleMapComposable annotation, but is a valid use case
}
@ln-12 ln-12 added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
1 participant