Skip to content

[CP-stable]WindowsPlugin should not crash when ffiPlugin enabled#184989

Merged
auto-submit[bot] merged 2 commits into
flutter:flutter-3.41-candidate.0from
flutteractionsbot:cp-stable-d79a56b63bc56b898799529ff3322fb0ae3d91e1
Apr 15, 2026
Merged

[CP-stable]WindowsPlugin should not crash when ffiPlugin enabled#184989
auto-submit[bot] merged 2 commits into
flutter:flutter-3.41-candidate.0from
flutteractionsbot:cp-stable-d79a56b63bc56b898799529ff3322fb0ae3d91e1

Conversation

@flutteractionsbot

@flutteractionsbot flutteractionsbot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

This pull request is created by automatic cherry pick workflow
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

Issue Link:

What is the link to the issue this cherry-pick is addressing?

#184689

Impact Description:

What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)?
Does it impact development (ex. flutter doctor crashes when Android Studio is installed),
or the shipping of production apps (the app crashes on launch).
This information is for domain experts and release engineers to understand the consequences of saying yes or no to the cherry pick.

A new version of the dependency path_provider_android causes Flutter tests (e.g. packages/flutter_tools/test/commands.shard/permeable/packages_test.dart) to fail unexpectedly.

Changelog Description:

Explain this cherry pick:

  • In one line that is accessible to most Flutter developers.
  • That describes the state prior to the fix.
  • That includes which platforms are impacted.
    See best practices for examples.

< Replace with changelog description here >
[flutter/184689] When using an ffi Windows package, don't require a plugin class.

Workaround:

Is there a workaround for this issue?

No

Risk:

What is the risk level of this cherry-pick?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

Validation Steps:

What are the steps to validate that this fix works?

The tree will fail without this

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 <roliv@google.com>
@flutteractionsbot flutteractionsbot added the cp: review Cherry-picks in the review queue label Apr 13, 2026
@flutteractionsbot

Copy link
Copy Markdown
Contributor Author

@vashworth please fill out the PR description above, afterwards the release team will review this request.

@flutter-dashboard

Copy link
Copy Markdown

This pull request was opened from and to a release candidate branch. This should only be done as part of the official Flutter release process. If you are attempting to make a regular contribution to the Flutter project, please close this PR and follow the instructions at Tree Hygiene for detailed instructions on contributing to Flutter.

Reviewers: Use caution before merging pull requests to release branches. Ensure the proper procedure has been followed.

@github-actions github-actions Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Apr 13, 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 in packages/flutter_tools/lib/src/platform_plugins.dart to include ffiPlugin in its validation logic. The assertion now allows for cases where ffiPlugin is set to true, even if pluginClass, dartPluginClass, and defaultPackage are all null. I have no further feedback to provide.

@vashworth vashworth added the CICD Run CI/CD label Apr 13, 2026
@eyebrowsoffire eyebrowsoffire added CICD Run CI/CD and removed CICD Run CI/CD labels Apr 15, 2026
@fluttergithubbot

Copy link
Copy Markdown
Contributor

An existing Git SHA, 49f3be34eeaa8e40689da7e66d8d5f98b1b57f77, 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.

@eyebrowsoffire eyebrowsoffire added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 15, 2026
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 15, 2026
@eyebrowsoffire eyebrowsoffire added the CICD Run CI/CD label Apr 15, 2026
@auto-submit auto-submit Bot merged commit f10b3d7 into flutter:flutter-3.41-candidate.0 Apr 15, 2026
131 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 16, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 17, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 17, 2026
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 CICD Run CI/CD cp: review Cherry-picks in the review queue 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