Skip to content

iOS: Remove engine includes from the platform views controller headers - #197429

Merged
cbracken merged 1 commit into
flutter:masterfrom
cbracken:pv-refactor-15
Nov 26, 2026
Merged

cbracken merged 1 commit into
flutter:masterfrom
cbracken:pv-refactor-15

Conversation

@cbracken

Copy link
Copy Markdown
Member

FlutterPlatformViewsController.h and FlutterPlatformViews_Internal.h no longer use any engine types directly, so no longer need C++ engine headers.

Issue: #112232

Pre-launch Checklist

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

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

`FlutterPlatformViewsController.h` and `FlutterPlatformViews_Internal.h`
no longer use any engine types directly, so no longer need C++ engine
headers.

Issue: flutter#112232
@cbracken
cbracken requested a review from a team as a code owner November 26, 2026 01:51
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Nov 26, 2026
@github-actions github-actions Bot added platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. team-ios Owned by iOS platform team labels Nov 26, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request removes C++ header imports from FlutterPlatformViewsController.h and FlutterPlatformViews_Internal.h, replacing them with UIKit imports to ensure they can be compiled in pure Objective-C. A new test file, FlutterPlatformViewsControllerObjCTest.m, is introduced to verify this compatibility. Feedback suggests referencing the class object instead of instantiating the controller directly with init, which could lead to undefined behavior, and points out a style guide violation regarding pointer declaration spacing.

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 26, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Nov 26, 2026
@auto-submit

auto-submit Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/197429, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@cbracken
cbracken added this pull request to the merge queue Nov 26, 2026
Merged via the queue into flutter:master with commit f0998f9 Nov 26, 2026
22 of 23 checks passed
@cbracken
cbracken deleted the pv-refactor-15 branch November 26, 2026 21:57
chingjun added a commit to chingjun/flutter that referenced this pull request Nov 27, 2026
The branch was rebased onto master (ba17b71, 90 commits after the
last base, ac8f87e), with which the pull request no longer merged:
nine files conflicted, the first of them since 689d7b9 ("Upgrade CI
to Xcode 27.2", flutter#196807). The replay gave each conflict
to the replayed commit, so in those files the commits below this one
hold the branch's old text, and they keep the lock file and the
generated files of the old base. Of the 656 commits replayed (the 634
of the last push and 22 new ones) 646 keep their patch ids, nine
changed (they touch files master changed too), and one is gone:
"[flutter_tools] A test added upstream passes featureFlags", whose one
line is upstream's own since flutter#197269.

This commit's tree is the tree of a merge of the same master into the
branch (those 656 commits), with the nine conflicts resolved by hand
and six files more that master's 90 commits need: fifteen files differ
from the merge as git writes it, and no other.

The nine conflicts:

- ci/builders/mac_clang_tidy.json: the branch's three builds, with
  upstream's Xcode (sdk_version 27b52, flutter#196807).
- lib/web_ui/dev/chrome.dart: the branch's --remote-debugging-port=0
  and upstream's --js-flags=--expose-gc (flutter#197245).
- Seven test files of flutter_tools. Upstream removed
  testWithoutContext in favour of test (flutter#197259) and moved tests off
  testUsingContext (flutter#197246, flutter#197254, flutter#197257).
  build_system/targets/android_test.dart and ios_test.dart are
  master's with the branch's one line (the include is
  HostArtifact.shaderLib). localizations_test.dart is master's: the
  branch's one-line fix of it is upstream's flutter#197269 now.
  runner/local_engine_test.dart, android/
  android_gradle_builder_test.dart, ios/xcodeproj_test.dart and
  tester/flutter_tester_test.dart are master's with the branch's
  tests as plain test() calls.

Not conflicts in the text, and needed all the same (the six files):

- artifacts_test.dart merged cleanly and called the removed
  testWithoutContext seven times: test() now.
- The Scenario app's simulator runtime is iOS 27.2, as upstream's
  run_ios_tests.dart and goldens have it since flutter#196807: the
  converter's manifest.dart and the generated
  testing/ios_scenario_app/BUILD.bazel.
- deps.lock.bzl for master's DEPS: the rolls of Skia, Dart and Dart's
  BoringSSL, the Fuchsia SDK and Fuchsia's test scripts.
  pub.lock.bzl does not change (upstream changed no pubspec).
- The converter's output for two BUILD.gn files upstream changed:
  shell/platform/darwin/ios/BUILD.bazel (the new test source
  FlutterPlatformViewsControllerObjCTest.m, flutter#197429) and
  shell/platform/embedder/BUILD.bazel (the dependency on
  //flutter/impeller/renderer/backend/vulkan and two fixtures,
  flutter#193004).
- dart format on two of the merged tests (artifacts_test.dart,
  xcodeproj_test.dart): test( is shorter than the name it replaces.

Checked on this tree, all of it on Linux, with the Dart SDK DEPS pins
(3.15.0-185.0.dev, the engine's prebuilt one):

- gen_deps.dart and gen_pub_lock.dart, and both with --check; the
  converter regenerated and with --check (112 generated files
  current): the three files named above changed and no other.
- dart format over the 98 Dart files that differ from master.
- The analyzer over flutter_tools, dev/bots, flutter_goldens, the
  converter, bazel_tools and lib/web_ui/dev: no issues.
- Tests: the ten tool test files the branch touches,
  localizations_test.dart and the test command's (399 tests); the
  converter's suite (319); dev/bots' bazel_test.dart,
  run_command_test.dart and test_test.dart (59). One of the 59 fails
  where no SHARD is set: upstream's "--dry-run prints every test that
  would run" inherits the environment, and without a shard a dry run
  on Linux ends at the first one, which throws off a Mac (master's
  code reads the same; not run there). With SHARD=framework_tests and
  SUBSHARD=misc, as its bot has them, it passes.
- check_build_configs.sh, check_generated_bazel_files.sh,
  bazel_ci_test.py (36), engine_build_configs (84), bazel_tools (62),
  GN's own check (tools/gn) for a host debug build, tools/gn_test.py
  (7), ci/pylint.sh, ci/format.sh (its Python step through yapf
  directly, 14 files).
- buildifier over the 364 Starlark files that differ from master. One
  warning, and an old one: build/bazel/toolchains/emscripten/spike/
  BUILD.bazel calls sh_test without loading it from rules_shell. The
  file is the last push's; earlier runs gave buildifier only the
  files a change touched. Left as it is here.
- Bazel analysis: ci_host_debug, host_release_test, //:tool_tests
  //:dart_tests, and every Linux build of builds.json with its
  install and its suite under its own configuration (47 of 47, 4 of
  them without RBE). The first analysis with the rolled Skia and
  Dart, whose BUILD files are generated when their repositories are
  set up.

Not run: nothing was built, linked or run under Bazel on this tree,
on Linux or on a Mac, and no Dart tool ran on a Mac. The merge's Mac
and iOS side (the clang-tidy builds' Xcode, the Scenario app's
runtime, the new iOS test source) and the new embedder dependency
have their first build on the bots.
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Nov 27, 2026
flutter/flutter@82ec424...43150a8

2026-11-27 [email protected] Windows: fix for popup descendent of popup closing the whole tree when the 2nd popup gains focus (flutter/flutter#196911)
2026-11-27 [email protected] Roll Skia from d693d85a4b77 to fe34f20b9689 (1 revision) (flutter/flutter#197491)
2026-11-27 [email protected] Roll Dart SDK from 691817e0ec3b to 5c3e102fc422 (1 revision) (flutter/flutter#197489)
2026-11-27 [email protected] Roll Fuchsia Linux SDK from 0bgCrr76CM4IqPO0v... to cBAjguERWwvY6tFtz... (flutter/flutter#197488)
2026-11-27 [email protected] [flutter_tools] Delete AppContext and legacy test context shims (flutter/flutter#197412)
2026-11-26 [email protected] Revert: [tool][engine] Enable experimental VM service by default (flutter/flutter#197481)
2026-11-26 [email protected] iOS: Remove engine includes from the platform views controller headers (flutter/flutter#197429)
2026-11-26 [email protected] [tool][engine] Enable experimental VM service by default (flutter/flutter#190100)
2026-11-26 [email protected] Add trust gate flags for "flutter analyze" (flutter/flutter#196415)
2026-11-26 [email protected] Roll Dart SDK from 7fcaf46b0308 to 691817e0ec3b (1 revision) (flutter/flutter#197475)
2026-11-26 [email protected] [Windows] Fix MASM flags in Windows GN `tool("asm")` (flutter/flutter#197464)
2026-11-26 [email protected] Roll Skia from cef5963c1bb2 to d693d85a4b77 (2 revisions) (flutter/flutter#197469)
2026-11-26 [email protected] Roll Packages from 105a874 to da586f5 (3 revisions) (flutter/flutter#197471)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants