Skip to content

Conversation

@ditman
Copy link
Member

@ditman ditman commented Mar 5, 2024

During the package:web migration, some packages that needed the TrustedTypes API defined those as custom JS-interop.

In google_identity_services_web, the names of the JS-interop types clashed with those from the incoming package:web, breaking the build.

In google_maps_flutter_web, the whole definition code is redundant now that the standard API is exposed through package:web.

Part of: flutter/flutter#117022

Pre-launch Checklist

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

@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.

@ditman ditman requested review from srujzs and stuartmorgan-g March 5, 2024 21:55
@ditman ditman added the emergency Override tree-status signal (land even with closed tree), combine with the autosubmit label. label Mar 5, 2024
@Hixie
Copy link
Contributor

Hixie commented Mar 5, 2024

test-exempt: rolling dependency

@ditman
Copy link
Member Author

ditman commented Mar 5, 2024

Linux_web web_build_all_packages stable is a good canary for this issue (that's how I discovered it in an unrelated PR)

@srujzs
Copy link
Contributor

srujzs commented Mar 5, 2024

In google_identity_services_web, the names of the JS-interop types clashed with those from the incoming package:web, breaking the build.

I didn't realize this broke Flutter. :( It seems like it was because there were two extension members with the same name now? I think we should be more aggressive about releasing breaking change versions instead of minor versions when there are new members being added.

Linux_web web_build_all_packages stable is a good canary for this issue (that's how I discovered it in an unrelated PR)

I think this wouldn't be caught because this bot isn't run when we publish package:web. I wonder if we can enable this bot for that package.

Copy link
Contributor

@kevmoo kevmoo left a comment

Choose a reason for hiding this comment

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

LGTM

@ditman
Copy link
Member Author

ditman commented Mar 5, 2024

I didn't realize this broke Flutter.

@srujzs It didn't break Flutter, only some packages that wanted to use TrustedTypes before they were exposed by package:web.

It seems like it was because there were two extension members with the same name now?

This is totally my bad, I should have namespaced package:web as web or similar so there wouldn't be ambiguity with the package:web API (in fact, we did it right in google maps).

@ditman ditman added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 5, 2024
@auto-submit auto-submit bot merged commit 83b72ba into flutter:main Mar 5, 2024
@ditman ditman deleted the use-web-trusted-types branch March 5, 2024 22:26
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 6, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Mar 6, 2024
flutter/packages@2aa6e3f...9b88dbc

2024-03-06 [email protected] [image_picker_for_web] migrates to package:web (flutter/packages#5799)
2024-03-06 [email protected] [video_player_web] migrates to package:web (flutter/packages#5800)
2024-03-06 49699333+dependabot[bot]@users.noreply.github.com [in_app_pur]: Bump org.json:json from 20240205 to 20240303 in /packages/in_app_purchase/in_app_purchase/example/android/app (flutter/packages#6253)
2024-03-05 [email protected] [rfw] Change test coverage logic to enforce 100% coverage (flutter/packages#6272)
2024-03-05 [email protected] [in_app_purchase_storekit] backfill native tests for more complete test coverage (flutter/packages#6209)
2024-03-05 [email protected] [tool] Add features to support GCB auto-publish flow (flutter/packages#6218)
2024-03-05 [email protected] [web] Use TrustedTypes from pkg web. (flutter/packages#6273)
2024-03-05 [email protected] Roll Flutter from 65cd84b to 3b5a2ec (26 revisions) (flutter/packages#6269)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
LouiseHsu pushed a commit to LouiseHsu/packages that referenced this pull request Mar 7, 2024
During the `package:web` migration, some packages that needed the TrustedTypes API defined those as custom JS-interop.

In `google_identity_services_web`, the names of the JS-interop types clashed with those from the incoming package:web, breaking the build.

In `google_maps_flutter_web`, the whole definition code is redundant now that the standard API is exposed through package:web.

Part of: flutter/flutter#117022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App emergency Override tree-status signal (land even with closed tree), combine with the autosubmit label. p: google_maps_flutter platform-web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants