Skip to content

[google_maps_flutter] remove warning when cloudMapId is used #6821

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

Closed
wants to merge 3 commits into from
Closed

[google_maps_flutter] remove warning when cloudMapId is used #6821

wants to merge 3 commits into from

Conversation

cedvdb
Copy link
Contributor

@cedvdb cedvdb commented May 28, 2024

fix #fix #149060
should be test-exempt, just warning removal.

List which issues are fixed by this PR. You must list at least one issue.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@cedvdb cedvdb requested a review from ditman as a code owner May 28, 2024 11:42
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@cedvdb cedvdb changed the title fix 149060 [google_maps_flutter] remove warning when cloudMapId is used May 28, 2024
@cedvdb
Copy link
Contributor Author

cedvdb commented May 29, 2024

@ditman can this be test exempted ?

@stuartmorgan-g
Copy link
Contributor

should be test-exempt, just warning removal

The reason this PR eliminates the warning is that it changes the behavior of the plugin; it is not exempt.

@cedvdb cedvdb closed this May 30, 2024
@cedvdb
Copy link
Contributor Author

cedvdb commented May 30, 2024

I'm not sure what behavior change you are referring to beside the log output ?
Maybe the fact that it is not passing styles anymore if the map ID is passed, which I thought was an implementation detail with no impact on behaviors. If this changes something which wasn't caught by existing tests, I'm not willing to dig deeper ( didn't dig much tbh) so I'm closing for now but may reopen in the future.

@stuartmorgan-g
Copy link
Contributor

I'm not sure what behavior change you are referring to ?
Maybe the fact that it is not passing styles anymore if the map ID is passed

Yes, exactly.

which I thought was an implementation detail with no impact on behaviors.

It does have an impact on behavior though; calling the underlying API incorrectly is causing a warning. That's why the issue and the PR exist in the first place.

@cedvdb
Copy link
Contributor Author

cedvdb commented Aug 5, 2024

It does have an impact on behavior though; calling the underlying API incorrectly is causing a warning. That's why the issue and the PR exist in the first place.

It seems to me that it'd be more appropriate to test that there is no warning (the end user behavior). You probably have good reasons to suggest that alternative. I'm interested in having those reasons here in case I end up having some time for this in the future.

My guess is that testing for warnings would be harder to write. However this kind of test could be reused for other warnings, in other packages as well, so may be worth it. Not sure if there is a precedent to this (if not, I was thinking about monkey patching console.warn and console.error to emit events)

@stuartmorgan-g
Copy link
Contributor

We want our tests to test the code we control. We control whether we are making a combination of API calls that the docs explicitly say we shouldn't. We don't control what the result of doing that is, whether it's a warning to the console or something else.

I was thinking about monkey patching console.warn and console.error to emit events

We don't want to intentionally introduce tests that are highly susceptible to out-of-band breakage due to changes in code we don't control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[google_maps] warning on the web when adding a map id
2 participants