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

Conversation

@loic-sharma
Copy link
Member

@loic-sharma loic-sharma commented Feb 28, 2023

The embedder API defines an ABI that must maintain both forward and backward compatibility. Some parts of the embedder API - like FlutterSemanticsNode or FlutterSemanticsCustomAction - must not change to guarantee forward ABI compatibility (see flutter/flutter#121176 and flutter/flutter#121347). This subset of the embedder API is "frozen".

This introduces tests that detect changes to the "frozen" subset of the embedder API. These are similar to golden tests:

  1. embedder_frozen.h contains a snapshot of the expected "frozen" API
  2. embedder_frozen_unittests.cc verifies the actual embedder API matches the expected "frozen" API.

Part of flutter/flutter#121176
See go/flutter-semantics-abi.

Pre-launch Checklist

  • 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. See testing the engine for instructions on writing and running engine tests.
  • 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.

@flutter-dashboard flutter-dashboard bot added the embedder Related to the embedder API label Feb 28, 2023
# both forward and backward compatibility. Changes should be heavily
# scrutinized as mistakes are irreversible.
/shell/platform/embedder/embedder.h @cbracken @chinmaygarde
/shell/platform/embedder/tests/embedder_frozen.h @cbracken @chinmaygarde @loic-sharma
Copy link
Member Author

Choose a reason for hiding this comment

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

I added myself to CODEOWNERS for the frozen file. Let me know if I should remove myself

@loic-sharma loic-sharma marked this pull request as ready for review March 1, 2023 00:31
Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

Overall this seems like a reasonable way of testing that no modifications have been made. I'd love to hear from @chinmaygarde on whether there's a simple way to make this more concise.

Copy link
Member

@cbracken cbracken left a comment

Choose a reason for hiding this comment

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

LGTM stamp from a Japanese personal seal

@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 3, 2023
@auto-submit auto-submit bot merged commit 9a426d2 into flutter:main Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
chinmaygarde pushed a commit to chinmaygarde/flutter_engine that referenced this pull request Mar 3, 2023
[Embedder API] Freeze parts of API for ABI stability
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App embedder Related to the embedder API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants