-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Currently in many (maybe all) of our file_selector implementations, we are identifying a wildcard type group by whether any of the fields that a platform supports are non-empty. This will silently cause likely-unexpected behavior on some platforms. E.g., if an XTypeGroup specifying only a text/plain MIME type is run on macOS or Windows, it will be treated as a wildcard, because neither platform currently supports MIME type filtering.
We should make a set of breaking changes (one to each implementation, then one to the app-facing package to pick them all up) that instead throws an ArgumentError if a platform receives an XTypeGroup that isn't a wildcard, but doesn't set any filters supported by the platform. Then it'll be a clear error, instead of silently doing something that's almost certainly not what was intended.
(If there are cases where someone really wanted the old behavior for some reason, they can do Platform-conditional construction of XTypeGroups instead.)