Skip to content

WindowsPlugin should not crash when ffiPlugin enabled#184695

Merged
jmagman merged 2 commits into
flutter:masterfrom
Renzo-Olivares:fix-tree-path-provider-android
Apr 7, 2026
Merged

WindowsPlugin should not crash when ffiPlugin enabled#184695
jmagman merged 2 commits into
flutter:masterfrom
Renzo-Olivares:fix-tree-path-provider-android

Conversation

@Renzo-Olivares

@Renzo-Olivares Renzo-Olivares commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

This change updates an assert in the WindowsPlugin constructor that previously crashed because it did not consider ffiPlugin unlike LinuxPlugin which does.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@flutter-dashboard

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 6, 2026
@Renzo-Olivares Renzo-Olivares changed the title Fix tree WindowsPlugin should not crash when provided an ffi plugin Apr 6, 2026
@Renzo-Olivares Renzo-Olivares changed the title WindowsPlugin should not crash when provided an ffi plugin WindowsPlugin should not crash when provided an ffi plugin Apr 6, 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 updates the WindowsPlugin constructor assertion to include ffiPlugin as a valid configuration option. Feedback suggests adding a descriptive error message to this assertion to improve clarity and adhere to the Flutter style guide.

Comment thread packages/flutter_tools/lib/src/platform_plugins.dart
@Renzo-Olivares Renzo-Olivares changed the title WindowsPlugin should not crash when provided an ffi plugin WindowsPlugin should not crash when ffi enabled Apr 6, 2026
@Renzo-Olivares Renzo-Olivares changed the title WindowsPlugin should not crash when ffi enabled WindowsPlugin should not crash when ffiPlugin enabled Apr 6, 2026
@Renzo-Olivares Renzo-Olivares added the CICD Run CI/CD label Apr 6, 2026
@Renzo-Olivares Renzo-Olivares added CICD Run CI/CD and removed CICD Run CI/CD labels Apr 6, 2026
@fluttergithubbot

Copy link
Copy Markdown
Contributor

An existing Git SHA, acfaa6672d8eade90791829a9d9bffa1c630ba6e, was detected, and no actions were taken.

To re-trigger presubmits after closing or re-opeing a PR, or pushing a HEAD commit (i.e. with --force) that already was pushed before, push a blank commit (git commit --allow-empty -m "Trigger Build") or rebase to continue.

@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 6, 2026
@Renzo-Olivares Renzo-Olivares added the CICD Run CI/CD label Apr 6, 2026
@jmagman jmagman added the emergency Jump the queue; land PR in front of all others; only use for emergencies label Apr 7, 2026
@flutter-dashboard

Copy link
Copy Markdown

Detected the emergency label.

If you add the autosubmit label, the bot will wait until all presubmits pass but ignore the tree status, allowing fixes for tree breakages while still validating that they don't break any existing presubmits.

The "Merge" button is also unlocked. To bypass presubmits as well as the tree status, press the GitHub "Add to Merge Queue".

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 7, 2026
@jmagman jmagman added this pull request to the merge queue Apr 7, 2026
Merged via the queue into flutter:master with commit d79a56b Apr 7, 2026
143 of 145 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 7, 2026
@vashworth vashworth mentioned this pull request Apr 7, 2026
10 tasks
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 7, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 7, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 7, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 7, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 7, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 7, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 7, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 7, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Apr 7, 2026
flutter/flutter@9cd60b5...a0924c7

2026-04-07 [email protected] Reland "[data_assets] Cleanup tests" (flutter/flutter#184714)
2026-04-07 [email protected] Use the WindowRegistry in the multiple_windows example app (flutter/flutter#184579)
2026-04-07 [email protected] Introduce command to build a swift package for SwiftPM add to app integration (flutter/flutter#184660)
2026-04-07 [email protected] Have `flutter create` create a pubspec.lock to ensure pinned versions are being used. (flutter/flutter#175352)
2026-04-07 [email protected] [widgets/raw_menu_anchor.dart] Always call onClose and onCloseRequested on descendants before parent. (flutter/flutter#182357)
2026-04-07 [email protected] `WindowsPlugin` should not crash when ffiPlugin enabled (flutter/flutter#184695)
2026-04-06 [email protected] Use full goto.google.com hostname for go/ links (flutter/flutter#184679)
2026-04-06 [email protected] Apply rect clipping to surface views (flutter/flutter#184471)
2026-04-06 [email protected] [A11y] Allow percentage strings like "50%" as `SemanticsValue` for `ProgressIndicator` (flutter/flutter#183670)
2026-04-06 [email protected] Fix invisible accessibility element before scroll view (flutter/flutter#184155)
2026-04-06 [email protected] Roll Skia from 163dfdf500c7 to e264d870a380 (2 revisions) (flutter/flutter#184674)
2026-04-06 [email protected] Keep last character obscured when toggling obscureText (flutter/flutter#183488)
2026-04-06 [email protected] Parse scheme file with XML parser for SwiftPM migrator (flutter/flutter#184525)

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
@vashworth vashworth added the cp: stable cherry pick this pull request to stable release candidate branch label Apr 13, 2026
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Apr 13, 2026
This change updates an assert in the `WindowsPlugin` constructor that
previously crashed because it did not consider `ffiPlugin` unlike
`LinuxPlugin` which does.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

---------

Co-authored-by: Renzo Olivares <[email protected]>
mbcorona pushed a commit to mbcorona/flutter that referenced this pull request Apr 15, 2026
This change updates an assert in the `WindowsPlugin` constructor that
previously crashed because it did not consider `ffiPlugin` unlike
`LinuxPlugin` which does.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

---------

Co-authored-by: Renzo Olivares <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD cp: stable cherry pick this pull request to stable release candidate branch emergency Jump the queue; land PR in front of all others; only use for emergencies tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants