-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
I tried converting path_provider_foundation (the simplest of our plugins) to FFI, and immediately hit:
[SEVERE] : The integer type used for enums is implementation-defined. FFIgen tries to mimic the integer sizes chosen by the most common compilers for the various OS and architecture combinations. To prevent any crashes, remove the enums from your API surface. To rely on the (unsafe!) mimicking, you can silence this warning by adding silence-enum-warning: true to the FFIgen config. Affected enums:
NSDirectoryEnumerationOptions
NSFileManagerItemReplacementOptions
NSFileManagerUnmountOptions
NSSearchPathDirectory
NSSearchPathDomainMask
NSURLRelationship
NSVolumeEnumerationOptions
I need both NSSearchPathDirectory and NSSearchPathDomainMask, I don't control the APIs in question, and I don't want to ship something that is "unsafe!" to clients, so this would be a hard blocker on a pure-Dart implementation. However, the message doesn't seem to match the definitions:
typedef NS_ENUM(NSUInteger, NSSearchPathDirectory) {
...
};
typedef NS_OPTIONS(NSUInteger, NSSearchPathDomainMask) {
...
};Isn't that a clearly defined integer type?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
In progress