Repository navigation
Document frozen embedder API structs - #186842
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. 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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
|
This PR is documentation-only for the public embedder C header and does not change runtime behavior. Local verification: |
There was a problem hiding this comment.
Code Review
This pull request updates the embedder.h header to designate several structures as ABI-sealed, establishing a policy that these types must not have fields added to them to maintain binary compatibility. Instead, the documentation specifies that new versioned structures should be introduced for any necessary additions. This change affects a wide range of structures, including those for geometry, renderer configurations, backing stores, and task runners. I have no feedback to provide.
gaaclarke
left a comment
There was a problem hiding this comment.
What basis did you use to determine if these structs are ABI-sealed or not?
|
FYI we have this test to ensure frozen embedder APIs aren't modified: https://github.com/flutter/flutter/blob/master/engine/src/flutter/shell/platform/embedder/tests/embedder_frozen_unittests.cc |
29685f8 to
45f33e2
Compare
|
Updated this in The PR now documents only the structs already covered by the existing
I removed the broader Verified:
I also retried |
gaaclarke
left a comment
There was a problem hiding this comment.
LGTM now that we have proof that the docstrings are accurate.
|
The public presubmits are green, but Google testing is failing at the internal |
|
Google testing wasn't holding you back, we need another reviewer. friendly ping @loic-sharma |
|
I checked the public |
|
autosubmit label was removed for flutter/flutter/186842, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
Rerunning the check that failed... |
…12420) Manual roll requested by [email protected] flutter/flutter@b766512...27b0988 2026-08-05 [email protected] reland(tool): remove redundant --enable-experiment=record-use flag (flutter/flutter#190591) 2026-08-05 [email protected] Windows: Propagate enabled accessibility state (flutter/flutter#190507) 2026-08-05 [email protected] Roll Fuchsia Test Scripts from ltbuIH9Z3T_yOuigu... to vcANVO8VIDQHasH1X... (flutter/flutter#190589) 2026-08-05 [email protected] Document frozen embedder API structs (flutter/flutter#186842) 2026-08-05 [email protected] Document super call order for State.didChangeDependencies (flutter/flutter#185945) 2026-08-05 [email protected] Move examples of `flutter/widgets` widgets out from `flutter/material` (flutter/flutter#189532) 2026-08-05 [email protected] [web] Use thread local strike caches in skwasm (flutter/flutter#190048) 2026-08-05 [email protected] doc: fix typo in see also section for PrimaryScrollController.maybeOf (flutter/flutter#190386) 2026-08-05 [email protected] Migrate the shell unit tests from legacy Dart native functions to FFI (flutter/flutter#190473) 2026-08-05 [email protected] render proxy box now defaults baseline calculation to null (flutter/flutter#190269) 2026-08-05 [email protected] Update Widgets Localizations from Translation Console (flutter/flutter#190503) 2026-08-04 [email protected] Revert: fix(tool): remove redundant --enable-experiment=record-use flag (flutter/flutter#190583) 2026-08-04 [email protected] Roll Fuchsia Test Scripts from 1frGe_KltAJKkeyPg... to ltbuIH9Z3T_yOuigu... (flutter/flutter#190561) 2026-08-04 [email protected] iOS,macOS: add tsan and ubsan support for Swift (flutter/flutter#190497) 2026-08-04 [email protected] fix: update on_message_ to nullptr after window destroy so that dart gets destroy message (flutter/flutter#185807) 2026-08-04 [email protected] [flutter_tools] Gracefully handle locked Windows files during clean (flutter/flutter#190095) 2026-08-04 [email protected] iOS,macOS: make Logger thread-safe, conform to Sendable (flutter/flutter#190488) 2026-08-04 [email protected] iOS: Eliminate use of IOSContextNoop in platform view tests (reland) (flutter/flutter#190509) 2026-08-04 [email protected] fix(tool): remove redundant --enable-experiment=record-use flag (flutter/flutter#190475) 2026-08-04 [email protected] android_hardware_smoke_test: Detect blank image failures or EGL initialization warnings and retry (flutter/flutter#190110) 2026-08-04 [email protected] Bumps text gamma on windows to match skia. (flutter/flutter#190477) 2026-08-04 [email protected] Roll Skia from 48b58ee222f1 to a8583a0a2c11 (2 revisions) (flutter/flutter#190537) 2026-08-04 [email protected] [tool][web] Intercept dart2wasm errors & append JS migration footers (flutter/flutter#190476) 2026-08-04 [email protected] [record_use] Migrate IconTreeShaker to `package:record_use` (flutter/flutter#190225) 2026-08-04 [email protected] Handle unexpected exceptions during Azure metadata detection (flutter/flutter#189457) 2026-08-04 [email protected] Fix merge conflict from flutter/flutter#190369 (flutter/flutter#190544) 2026-08-04 [email protected] Prepare device support symbols (flutter/flutter#190369) 2026-08-04 [email protected] Roll Packages from ac87e65 to 3498b9d (1 revision) (flutter/flutter#190532) 2026-08-04 [email protected] Roll Skia from a08d918ebd6a to 48b58ee222f1 (11 revisions) (flutter/flutter#190527) 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 Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: 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
Issue
Part of #38470. The issue asks for embedder API structs that must not be extended in place to be documented. Review feedback asked what basis was used to decide which structs were frozen.
Fix
Narrowed the PR to document only the structs that are already protected by the
EmbedderFrozengolden test inengine/src/flutter/shell/platform/embedder/tests/embedder_frozen_unittests.cc.This removes the earlier unsupported
ABI-sealedlabels from renderer, backing-store, task, Dart object, and AOT structs that are not covered by that test-backed source of truth.Tests
git diff --checkclang-format --dry-run --Werror engine/src/flutter/shell/platform/embedder/embedder.h, becauseclang-formatis not installed in this checkout.Risk
Docs-only change to
engine/src/flutter/shell/platform/embedder/embedder.h. No generated output. Other possible sealed embedder structs may still need a separate verified pass before being documented.