-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Remove temporary desktop pluginClass: none workaround #57497
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: desktopRunning on desktopRunning on desktopc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.platform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-macosBuilding on or for macOS specificallyBuilding on or for macOS specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: desktopRunning on desktopRunning on desktopc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.platform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallyplatform-macosBuilding on or for macOS specificallyBuilding on or for macOS specificallyplatform-windowsBuilding on or for Windows specificallyBuilding on or for Windows specificallyteam-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.Issues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
On 1.18 (current master), desktop plugins can either specify a
pluginClassfor a standard plugin with native code, or adartPluginClassto allow that platform's implementation of a plugin to be Dart-only. However, the current stable build, 1.17, doesn't have this logic, and requires apluginClassfor all desktop platforms. When building for any platform, all platforms listed in the pubspec are validated, which means that publishing a plugin with:will break the iOS and Android builds of any project that ends up with a dependency on that plugin. That means that for example we can't publish a Dart-only Linux implementation of
path_providerand endorse it without breaking everyone on stable.To work around this, I propose temporarily adding special handling to the desktop platforms where having
pluginClass: noneis treated the same way as having nopluginClassfield. This will pass validation on 1.17, but be a no-op onmaster. The workaround would be removed once 1.18 is released to stable.Minor downsides: