Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

[google_maps_flutter_web] Make google_maps_flutter_web work with latest plugins #3673

Merged
merged 12 commits into from
Mar 3, 2021

Conversation

stuartmorgan-g
Copy link
Contributor

@stuartmorgan-g stuartmorgan-g commented Mar 3, 2021

google_maps_flutter_web NNBD migration is currently blocked, but this is an attempt to make a non-NNBD version that's uses the NNBD version of all dependencies for compatibility with the latest versions of other plugins.

Testing

  • Tested manually in google_maps_flutter example app, with // @dart=2.9 in its main.dart file.
  • All tests pass:
Output
plugins/packages/google_maps_flutter/google_maps_flutter_web/test$ ./run_test

chromedriver is running.
No target specified, running all tests...
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value
flutter drive -d web-server '--web-port=7357' '--browser-name=chrome' '--target=test_driver/marker_integration.dart'
Running "flutter pub get" in test...                               773ms
Launching test_driver/marker_integration.dart on Web Server in debug mode...
Waiting for connection from debug service on Web Server...         18.7s
test_driver/marker_integration.dart is being served at http://localhost:7357
The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
Application finished.
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +0: MarkerController onTap gets called"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +1: MarkerController onDragEnd gets called"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +2: MarkerController update"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +3: MarkerController infoWindow null, showInfoWindow."
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +4: MarkerController showInfoWindow"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +5: MarkerController hideInfoWindow"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +6: (tearDownAll)"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "Warning: integration_test test plugin was not detected."
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +7: All tests passed!"
All tests passed.
flutter drive -d web-server '--web-port=7357' '--browser-name=chrome' '--target=test_driver/markers_integration.dart'
Running "flutter pub get" in test...                               822ms
Launching test_driver/markers_integration.dart on Web Server in debug mode...
Waiting for connection from debug service on Web Server...         18.6s
test_driver/markers_integration.dart is being served at http://localhost:7357
The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
Application finished.
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +0: MarkersController addMarkers"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +1: MarkersController changeMarkers"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +2: MarkersController removeMarkers"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +3: MarkersController InfoWindow show/hide"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +4: MarkersController only single InfoWindow is visible"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +5: MarkersController markers with icon:null work"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +6: MarkersController markers with custom bitmap icon work"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +7: MarkersController InfoWindow snippet can have links"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +8: MarkersController InfoWindow content is clickable"
All tests passed.
flutter drive -d web-server '--web-port=7357' '--browser-name=chrome' '--target=test_driver/shape_integration.dart'
Running "flutter pub get" in test...                               794ms
Launching test_driver/shape_integration.dart on Web Server in debug mode...
Waiting for connection from debug service on Web Server...         18.3s
test_driver/shape_integration.dart is being served at http://localhost:7357
The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
Application finished.
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +0: CircleController onTap gets called"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +1: CircleController update"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +2: PolygonController onTap gets called"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +3: PolygonController update"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +4: PolylineController onTap gets called"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +5: PolylineController update"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +6: (tearDownAll)"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "Warning: integration_test test plugin was not detected."
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +7: All tests passed!"
All tests passed.
flutter drive -d web-server '--web-port=7357' '--browser-name=chrome' '--target=test_driver/shapes_integration.dart'
Running "flutter pub get" in test...                               729ms
Launching test_driver/shapes_integration.dart on Web Server in debug mode...
Waiting for connection from debug service on Web Server...         18.7s
test_driver/shapes_integration.dart is being served at http://localhost:7357
The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
Application finished.
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +0: CirclesController addCircles"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +1: CirclesController changeCircles"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +2: CirclesController removeCircles"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +3: CirclesController Converts colors to CSS"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +4: PolygonsController addPolygons"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +5: PolygonsController changePolygons"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +6: PolygonsController removePolygons"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +7: PolygonsController Converts colors to CSS"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +8: PolygonsController Handle Polygons with holes"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +9: PolygonsController Polygon with hole has a hole"
All tests passed.
flutter drive -d web-server '--web-port=7357' '--browser-name=chrome' '--target=test_driver/google_maps_plugin_integration.dart'
Running "flutter pub get" in test...                               817ms
Launching test_driver/google_maps_plugin_integration.dart on Web Server in debug mode...
Waiting for connection from debug service on Web Server...         19.0s
test_driver/google_maps_plugin_integration.dart is being served at http://localhost:7357
The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
Application finished.
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +0: GoogleMapsPlugin init/dispose before buildWidget init throws assertion"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +1: GoogleMapsPlugin init/dispose after buildWidget init initializes controller"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +2: GoogleMapsPlugin init/dispose after buildWidget cannot call methods after dispose"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +3: GoogleMapsPlugin buildView throws without _webOnlyMapCreationId"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +4: GoogleMapsPlugin buildView returns an HtmlElementView and caches the controller for later"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +5: GoogleMapsPlugin buildView returns cached instance if it already exists"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +6: GoogleMapsPlugin setMapStyles translates styles for controller"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +7: GoogleMapsPlugin Noop methods: updateTileOverlays"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +8: GoogleMapsPlugin Noop methods: updateTileOverlays"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +9: GoogleMapsPlugin Pass-through methods: updateMapOptions"
All tests passed.
flutter drive -d web-server '--web-port=7357' '--browser-name=chrome' '--target=test_driver/google_maps_controller_integration.dart'
Running "flutter pub get" in test...                               816ms
Launching test_driver/google_maps_controller_integration.dart on Web Server in debug mode...
Waiting for connection from debug service on Web Server...         18.4s
test_driver/google_maps_controller_integration.dart is being served at http://localhost:7357
The web-server device requires the Dart Debug Chrome extension for debugging. Consider using the Chrome or Edge devices for an improved development workflow.
Application finished.
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +0: GoogleMapController construct/dispose constructor creates widget"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +1: GoogleMapController construct/dispose widget is cached when reused"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +2: GoogleMapController construct/dispose dispose closes the stream and removes the widget"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +3: GoogleMapController init listens to map events"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +4: GoogleMapController init binds geometry controllers to map's"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +5: GoogleMapController init renders initial geometry"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +6: GoogleMapController init empty infoWindow does not create InfoWindow instance."
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +7: GoogleMapController init Initialization options translates initial options"
[INFO]: http://localhost:7357/dart_sdk.js 28041:14 "00:00 +8: GoogleMapController init Initialization options disables gestureHandling with scrollGesturesEnabled false"
All tests passed.

Pre-launch Checklist

  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

@stuartmorgan-g
Copy link
Contributor Author

We should update scripts/nnbd.sh to remove this from the conflict list (and fix the fact that I forgot to move extension_google_sign_in_as_googleapis_auth up to the NNBD list)

@ditman ditman changed the title [google_maps_flutter] Make google_maps_flutter_web work with latest plugins [google_maps_flutter_web] Make google_maps_flutter_web work with latest plugins Mar 3, 2021
@google-cla

This comment has been minimized.

@ditman

This comment has been minimized.

@google-cla google-cla bot added cla: yes and removed cla: no labels Mar 3, 2021
@flutter flutter deleted a comment from google-cla bot Mar 3, 2021
@flutter flutter deleted a comment from google-cla bot Mar 3, 2021
@flutter flutter deleted a comment from google-cla bot Mar 3, 2021
@ditman
Copy link
Member

ditman commented Mar 3, 2021

And because every version of extension_google_sign_in_as_googleapis_auth from path depends on googleapis_auth ^1.0.0 which depends on crypto ^3.0.0, integration_test from path is incompatible with extension_google_sign_in_as_googleapis_auth from path. Womp womp, reverting...

Copy link
Contributor Author

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your changes LGTM

@stuartmorgan-g stuartmorgan-g marked this pull request as ready for review March 3, 2021 21:37
Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Let's merge!

@ditman ditman merged commit bc2514e into flutter:master Mar 3, 2021
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2021
@stuartmorgan-g stuartmorgan-g deleted the maps-web-compat branch March 3, 2021 23:13
@ditman
Copy link
Member

ditman commented Mar 3, 2021

Published https://pub.dev/packages/google_maps_flutter_web/versions/0.2.0

fluttergithubbot pushed a commit to flutter/flutter that referenced this pull request Mar 4, 2021
NickalasB added a commit to NickalasB/plugins that referenced this pull request Mar 8, 2021
* master:
  [google_sign_in] fix test(flutter#3690)
  [extension_google_sign_in_as_googleapis_auth] Update import (flutter#3689)
  [google_sign_in] Updates google_sign_in_platform_interfaces adding parametrized `clientId` (flutter#3686)
  Import flutter_test for future compatibility (flutter#3665)
  [ci] Disable analyze on stable for web plugins that contains null safety integration tests.  (flutter#3681)
  Bring HTML inputs into view automatically (flutter#3655)
  [in_app_purchase] presentCodeRedemptionSheet (flutter#3274)
  [google_maps_flutter_web] Downgrade mockito in example app. (flutter#3679)
  Update CI config for Flutter 2 (flutter#3674)
  [image_picker] fix flutter/flutter#71927 (flutter#3676)
  [google_maps_flutter_web] Move integration tests to example. (flutter#3675)
  [google_maps_flutter_web] Make google_maps_flutter_web work with latest plugins  (flutter#3673)

# Conflicts:
#	packages/webview_flutter/CHANGELOG.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants