[path_provider] Move Windows FFI behind a conditional import #3056
[path_provider] Move Windows FFI behind a conditional import #3056
Conversation
Moves the real implementation of path_provider_windows behind a conditional export, instead exporting a stub on platforms that don't support dart:ffi. This avoids build breakage in web projects that have transitive dependencies on path_provider (and thus path_provider_windows due to manual endorsement). This will no longer be necessary once flutter/flutter#52267 is fixed, since only Windows builds will ever need to have code-level dependency on path_provider_windows.
The manual registration workaround for flutter/flutter#52267 is truly the gift that keeps on giving (pain). Two notes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gspencergoog or anyone els that knows... How i can see if this has hit the flutter master channel ? |
Plugins aren't part of the Flutter framework. |
@joe-getcouragenow Just to add a little here, I can see the potential for confusion, since GitHub reports this as "merged commit 2595703 into If you look at the commit, you can see that it's 0.0.4, and the version of path_provider_windows published is 0.0.4+1, so it looks like you can be confident that you have the right build if you run |
…#3056) Moves the real implementation of path_provider_windows behind a conditional export, instead exporting a stub on platforms that don't support dart:ffi. This avoids build breakage in web projects that have transitive dependencies on path_provider (and thus path_provider_windows due to manual endorsement). This will no longer be necessary once flutter/flutter#52267 is fixed, since only Windows builds will ever need to have code-level dependency on path_provider_windows.
…#3056) Moves the real implementation of path_provider_windows behind a conditional export, instead exporting a stub on platforms that don't support dart:ffi. This avoids build breakage in web projects that have transitive dependencies on path_provider (and thus path_provider_windows due to manual endorsement). This will no longer be necessary once flutter/flutter#52267 is fixed, since only Windows builds will ever need to have code-level dependency on path_provider_windows.
…#3056) Moves the real implementation of path_provider_windows behind a conditional export, instead exporting a stub on platforms that don't support dart:ffi. This avoids build breakage in web projects that have transitive dependencies on path_provider (and thus path_provider_windows due to manual endorsement). This will no longer be necessary once flutter/flutter#52267 is fixed, since only Windows builds will ever need to have code-level dependency on path_provider_windows.
Description
Moves the real implementation of path_provider_windows behind a
conditional export, instead exporting a stub on platforms that don't
support dart:ffi. This avoids build breakage in web projects that have
transitive dependencies on path_provider (and thus path_provider_windows
due to manual endorsement).
This will no longer be necessary once
flutter/flutter#52267 is fixed, since only
Windows builds will ever need to have code-level dependency on
path_provider_windows.
Related Issues
Fixes flutter/flutter#66143
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?