Skip to content

Conversation

@matanlurey
Copy link
Contributor

Closes #57497.

Starting as a draft to get feedback - I am open to other options:

  • Adding a feature flag
  • Making none a toolExit(...)
  • Both of the above

@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 9, 2025
@stuartmorgan-g
Copy link
Contributor

Oops 😬 Looks like I forgot to set a reminder for step 2.

My 2-step plan didn't anticipate that a fair number of people would duplicate that entry into their plugins during the time we used it. Given that, I don't think we should just suddenly break it without warning.

As an updated plan I recommend we:

  • Add a warning now; something like:

    The plugin 'foo' uses the deprecated 'pluginClass: none' it its pubspec.yaml, which will be a build error in future versions of Flutter and should be removed. Please contact the plugin's developers.

  • Set a reminder to remove all of this code one stable release later.

I'll also go file issues against all of the plugins in that query that don't appear to be abandoned.

I definitely don't think we should add a feature flag for this.

@stuartmorgan-g stuartmorgan-g changed the title Cleanup 5 year old handling of dartPluginClass: none Cleanup 5 year old handling of pluginClass: none Jul 10, 2025
@stuartmorgan-g
Copy link
Contributor

(Adjusted title; the thing we primarily supported and actually used was pluginClass: none to allow for plugins that only had a dartPluginClass. There was never a reason for someone to use dartPluginClass: none that I can think of.)

@stuartmorgan-g
Copy link
Contributor

stuartmorgan-g commented Jul 10, 2025

a fair number of people

Well, maybe not so many. Once I removed things that haven't been updated in a more than a year, projects that were apps that mysteriously added plugin entries with this key to the app pubspec (LLM hallucination?), third-party-embedding plugins, and local-to-project forks of old versions of plugins, I only have 5 repos left.

That said, I haven't done a full sweep of everything that's not on GitHub using https://github.com/loic-sharma/pub_insights/ yet, so there could be more. I still think one release of a warning is the safer option.

Copy link
Contributor

@bkonyi bkonyi left a comment

Choose a reason for hiding this comment

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

The conservative move would be to add a warning for at least one more release, but if we're fairly certain that this will impact a very small number of projects and pluginClass: none basically did nothing for years, I think the impact of just removing this now would be minimal. Could we just submit PRs to those few projects still setting this field and remove it?

languageVersions: <String, String>{'path_provider_example': '2.12'},
);

projectDir.childFile('pubspec.yaml').writeAsStringSync(_kSamplePubspecFile);
Copy link
Contributor

Choose a reason for hiding this comment

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

Ubernit: I'd probably just cascade these childFile and childDirectory calls off of projectDir.

@stuartmorgan-g
Copy link
Contributor

and pluginClass: none basically did nothing for years

The issue isn't that it did nothing, it's that removing the special casing for it will change the behavior from "do nothing" to "fail at build time with a hard-to-understand error".

Could we just submit PRs to those few projects still setting this field and remove it?

I filed issues with the ones I found with GitHub. We could do a second pass with the insights tool to find anything published on pub.dev that doesn't use GitHub that has this issue.

But an unknowable (probably small, but we by definition can't know) number of projects use non-published plugins that have this issue. And an unknown number of projects still use old versions of plugins (including ours, potentially) that still have the entry even if was removed.

@bkonyi
Copy link
Contributor

bkonyi commented Jul 10, 2025

Fair enough. Let's just provide a warning for a single stable release and then remove this workaround for the next stable.

@matanlurey
Copy link
Contributor Author

Replaced by #172315.

@matanlurey matanlurey closed this Jul 17, 2025
github-merge-queue bot pushed a commit that referenced this pull request Jul 21, 2025
Towards #57497.

Supersedes #171922 based on
@stuartmorgan-g's advice for a warning release.

I'll CP this into `3.35` (beta) so that we can clean it up on `master`
anytime.
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Jul 21, 2025
Towards flutter#57497.

Supersedes flutter#171922 based on
@stuartmorgan-g's advice for a warning release.

I'll CP this into `3.35` (beta) so that we can clean it up on `master`
anytime.
azatech pushed a commit to azatech/flutter that referenced this pull request Jul 28, 2025
Towards flutter#57497.

Supersedes flutter#171922 based on
@stuartmorgan-g's advice for a warning release.

I'll CP this into `3.35` (beta) so that we can clean it up on `master`
anytime.
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
Towards flutter#57497.

Supersedes flutter#171922 based on
@stuartmorgan-g's advice for a warning release.

I'll CP this into `3.35` (beta) so that we can clean it up on `master`
anytime.
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
Towards flutter#57497.

Supersedes flutter#171922 based on
@stuartmorgan-g's advice for a warning release.

I'll CP this into `3.35` (beta) so that we can clean it up on `master`
anytime.
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
Towards flutter#57497.

Supersedes flutter#171922 based on
@stuartmorgan-g's advice for a warning release.

I'll CP this into `3.35` (beta) so that we can clean it up on `master`
anytime.
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
Towards flutter#57497.

Supersedes flutter#171922 based on
@stuartmorgan-g's advice for a warning release.

I'll CP this into `3.35` (beta) so that we can clean it up on `master`
anytime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove temporary desktop pluginClass: none workaround

3 participants