Update dependency ffigen to v19 #55

Open
renovatebot wants to merge 1 commit from renovate/ffigen-19.x into master
Collaborator

This PR contains the following updates:

Package Type Update Change
ffigen (source) dev_dependencies major ^8.0.2 -> ^19.0.0

⚠️ Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

dart-lang/native (ffigen)

v19.0.0

Compare Source

  • Use package:objective_c 8.0.0.
  • Breaking change: Major change to the way ObjC methods are code-genned.
    Methods now use named parameters, making them more readable and closer to how
    they're written in ObjC. For example, the NSData method
    dataWithBytes:length: used to be generated as
    dataWithBytes_length_(Pointer<Void> bytes, int length), but is now generated
    as dataWithBytes(Pointer<Void> bytes, {required int length}). Protocol
    methods are not affected.
    • Migration tip: A quick way to find affected methods is to search for _(.
  • Make it easier for a downstream clone to change behavior of certain utils.
  • Fix a bug where types could
    occasionally show up as a generic ObjCObjectBase, when they were supposed to
    be codegenned as a more specific interface types.

v18.1.0

Compare Source

  • Fix a clang warning in ObjC protocol generated bindings.

v18.0.0

Compare Source

  • Use package:objective_c 7.0.0.
  • Add variable substitutions that can be used in the headers.entry-points to
    locate Apple APIs: $XCODE, $IOS_SDK, and $MACOS_SDK.
  • Add an empty constructor to all ObjC interfaces that have a new method,
    which just calls that method.
  • Breaking change: Change the usrTypeMappings field of Config's factory
    constructor from a List<ImportedType> to a Map<String, ImportedType>.
  • Add a keepIsolateAlive parameter to the block and protocol constructors that
    allows a block or protocol to keep its owner isolate alive.
  • Breaking change: keepIsolateAlive defaults to true, so all existing ObjC
    blocks and protocols now keep their isolates alive by default.
  • Change how protocols are implemented to fix
    a bug, by removing all uses
    of NSProxy.
  • Breaking change: Change how duplicate identifiers are renamed to match
    jnigen. The main change is that $ is used as a delimiter now, to avoid
    renamed identifiers from colliding with other identifiers. For example, foo
    is renamed to foo$1 if there's already a foo in the namespace.
  • Fix a bug where blocking
    blocks could deadlock if invoked from the Flutter UI thread. Note that this
    relies on changes in Flutter that are currently only available in the main
    channel. These changes will likely be released in Flutter 3.31.0.

v17.0.0

Compare Source

  • Use package:objective_c 6.0.0
  • Support transitive categories of built-in types:
    https://github.com/dart-lang/native/issues/1820
  • Breaking change: Maintain protocol conformance when translating from ObjC
    to Dart. For example, ObjC's id<FooProtocol> is now translated to Dart's
    FooProtocol. Generally this shouldn't be a breaking change for code that is
    using protocols correctly, with a few caveats:
    • For more advanced use cases that use ObjCProtocolBuilder directly, after
      calling build() you will need to cast the generated object to the target
      protocol: FooProtocol.castFrom(protocolBuilder.build()).
    • Due to limitations in the Dart type system, only the first protocol of an
      id is used: id<FooProtocol, BarProtocol> becomes FooProtocol. The
      FooProtocol.castFrom method can help work around issues this may cause.
  • Fix the handling of global arrays to remove the extra pointer reference.
  • Add a max field to the external-versions config, and use it to determine
    which APIs are generated.
  • Add a runtime OS version check to ObjC APIs, which throws an error if the
    current OS version is earlier than the version that the API was introduced.

v16.1.0

  • Ensure that required symbols are available to FFI even when the final binary
    is linked with -dead_strip.
  • Handle dart typedefs in import/export of symbol files.
  • Add support for blocking ObjC blocks that can be invoked from any thread.
  • Add support for blocking ObjC protocol methods.
  • Remove explicit objc_retain calls from the generated bindings.

v16.0.0

  • Ensure all protocols referenced in bindings are available at runtime.
  • Use package:dart_style directly to format generated Dart code, rather than
    subprocessing to dart format.
  • Use package:objective_c 4.0.0
  • Fix various small bugs todo with config filters:
  • Fix a bug where nullable
    typealiases were treated as non-null.
  • Allow static and instance methods to have the same name:
    https://github.com/dart-lang/native/issues/1136
  • Breaking change: Change the way ObjC categories are generated. Instead of
    inserting their methods into the interface, generate Dart extension methods.
    For instance methods this makes no difference to user code (as long as the
    extension methods are imported correctly). But for static methods it means
    MyInterface.staticMethod must change to MyCategory.staticMethod.
    Categories are included/excluded by the objc-categories config entry.
  • Add include-transitive-objc-interfaces, include-transitive-objc-protocols,
    and include-transitive-objc-categories config flags, which control whether
    transitively included ObjC interfaces, protocols, and categories are
    generated.
  • Breaking change: include-transitive-objc-interfaces defaults to false,
    which changes the default behavior from pulling in all transitive deps, to
    generating them as stubs. include-transitive-objc-protocols defaults to
    false, and include-transitive-objc-categories defaults to true, but these
    both replicate the existing behavior.
  • Fix bugs caused by
    mismatches between ObjC and Dart's inheritance rules.

v15.0.0

  • Bump minimum Dart version to 3.4.
  • Dedupe ObjCBlock trampolines to reduce generated ObjC code.
  • Update to latest package:objective_c.
  • ObjC objects now include the methods from the protocols they implement. Both
    required and optional methods are included. Optional methods will throw an
    exception if the method isn't implemented.
  • Breaking change: Only generate ObjC protocol implementation bindings for
    protocols that are included by the config filters. This is breaking because
    previously super protocols would automatically get implementation bindings,
    rather than just being incorporated into the child protocol. If you want those
    implementation bindings, you may need to add the super protocol to your
    objc-protocols filters.
  • Fix a bug where ObjC listener blocks could be deleted after being invoked by
    ObjC but before the invocation was received by Dart:
    https://github.com/dart-lang/native/issues/1571
  • sort: config option now affects ObjC interface/protocol methods.
  • Fix a bug where NSRange was not being imported from package:objective_c:
    https://github.com/dart-lang/native/issues/1180
  • Breaking change: Return structs from ObjC methods by value instead of
    taking a struct return pointer.

v14.0.1

v14.0.0

  • Create a public facing API for ffigen that can be invoked as a library:
    void generate(Config config). Make Config an implementatble interface,
    rather than needing to be parsed from yaml.
  • Add a external-versions config option. Setting the minimum target
    version will omit APIs from the generated bindings if they were deprecated
    before this version.
  • Global variables using ObjC types (interfaces or blocks) will now use the
    correct Dart wrapper types, instead of the raw C-style pointers.
  • Rename assetId under ffi-native to asset-id to follow dash-case.
  • Breaking change: ObjC blocks are now passed through all ObjC APIs as
    ObjCBlock<Ret Function(Args...)>, instead of the codegenned
    ObjCBlock_... wrapper. The wrapper is now a non-constructible set of util
    methods for constructing ObjCBlock.
  • Breaking change: Generated ObjC code has been migrated to ARC (Automatic
    Reference Counting), and must now be compiled with ARC enabled. For example,
    if you had a line like s.requires_arc = [] in your podspec, this should
    either be removed, or you should add the ffigen generated ObjC code to the
    list. If you're compiling directly with clang, add the -fobjc-arc flag.
  • Breaking change: Structs with enum members now generate their members
    as Dart enum values as well. For example, with an enum MyEnum and a struct
    with a member MyEnum enumMember, two members are generated: enumMemberAsInt
    which contains the original integer value, and enumMember, which is of type
    MyEnum. If you configure the enum to be generated as Dart integers, this
    new behavior will not apply, and the struct member will be an integer as well.
  • Breaking change: Enums generated as integers will now generate sealed
    classes as opposed to abstract classes.
  • Fix some bugs in the way ObjC method families and ownership annotations were
    being handled: https://github.com/dart-lang/native/issues/1446
  • Apply the existing member-rename option to ObjC interface and protocol
    methods and properties.
  • Add a member-filter option that filters ObjC interface and protocol methods
    and properties.

v13.0.0

  • Breaking change: Code-gen the ObjC id type to ObjCObjectBase rather
    than NSObject, since not all ObjC classes inherit from NSObject. Eg
    NSProxy.
  • Breaking change: Generate a native trampoline for each listener block, to
    fix a ref counting bug: https://github.com/dart-lang/native/issues/835.
    • If you have listener blocks affected by this ref count bug, a .m file will
      be generated containing the trampoline. You must compile this .m file into
      your package. If you already have a flutter plugin or build.dart, you can
      simply add this generated file to that build.
    • If you don't use listener blocks, you can ignore the .m file.
    • You can choose where the generated .m file is placed with the
      output.objc-bindings config option.
  • Breaking change: Native enums are now generated as real Dart enums, instead
    of abstract classes with integer constants. Native enum members with the same
    integer values are handled properly on the Dart side, and native functions
    that use enums in their signatures now accept the generated enums on the Dart
    side, instead of integer values. To opt out of this, use the enums->as-int
    option as specified in the README.
  • Breaking change: Enum integer types are implementation-defined and not
    part of the ABI. Therefore FFIgen does a best-effort approach trying to mimic
    the most common compilers for the various OS and architecture combinations.
    To silence the warning set config silence-enum-warning to true.
  • Rename ObjC interface methods that clash with type names. Fixes
    https://github.com/dart-lang/native/issues/1007.
  • Added support for implementing ObjC protocols from Dart. Use the
    objc-protocols config option to generate bindings for a protocol.
  • Fix some bugs where ObjC interface/protocol methods could collide with Dart
    built-in methods, or with types declared elsewhere in the generated bindings.
  • Add include-unused-typedefs to allow generating typedefs that are not
    referred to anywhere, the default option is false.
  • Use package:dart_flutter_team_lints.

v12.0.0

  • Global variables are now compatible with the ffi-native option.
  • Exposing symbol addresses of functions and globals is now compatible with the
    ffi-native option.
  • Add retainAndReturnPointer method to ObjC objects and blocks, and add
    castFromPointer method to blocks.
  • Add -Wno-nullability-completeness as default compiler option for MacOS.
  • Breaking change: Use package:objective_c in ObjC bindings.
    • ObjC packages will have a flutter dependency (until
      https://github.com/dart-lang/native/issues/1068 is fixed).
    • Core classes such as NSString have been moved into package:objective_c.
    • ObjC class methods don't need the ubiquitous lib argument anymore. In
      fact, ffigen won't even generate the native library class (unless it needs
      to bind top level functions without using @Native). It is still necessary
      to DynamicLibrary.open the dylib though, to load the classes and methods.
    • Adapting to this change:
      • Update ffigen and re-run the code generation. If the generated code no
        longer contains the native library class, it means it isn't needed
        anymore. So final lib = FooNativeLib(DynamicLibrary.open('foo.dylib'));
        must be changed to DynamicLibrary.open('foo.dylib');.
      • Regardless of whether the native library class still exists, delete the
        lib parameter from all ObjC object constructors and static method calls
        and block constructors.
      • If core ObjC classes such as NSString are being used,
        package:objective_c must be imported, as they won't be exported by the
        generated bindings.
  • Add --[no-]format option to ffigen command line, which controls whether the
    formatting step happens. Defaults to true.
  • Delete Dart functions associated with ObjC closure blocks when the block is
    destroyed. Fixes https://github.com/dart-lang/native/issues/204
  • Reduce cursor definition not found logs when structs/unions ->
    dependency-only is set to opaque.

v11.0.0

Compare Source

  • Any compiler errors/warnings in source header files will now result in
    bindings to not be generated by default, since it may result in invalid
    bindings if the compiler makes a wrong guess. A flag --ignore-source-errors (or yaml config ignore-source-errors: true)
    must be passed to change this behaviour.
  • Breaking change: Stop generating setters for global variables marked const in C.
  • Fix objc_msgSend being used on arm64 platforms where it's not available.
  • Fix missing comma with ffi-native functions marked leaf.
  • Add support for finding libclang in Conda environment.

v10.0.0

Compare Source

  • Stable release targeting Dart 3.2 using new dart:ffi features available
    in Dart 3.2 and later.
  • Add support for ObjC Blocks that can be invoked from any thread, using
    NativeCallable.listener.
  • Fix invalid exceptional return value ObjCBlocks that return floats.
  • Fix return_of_invalid_type analysis error for ObjCBlocks.
  • Fix crash in ObjC methods and blocks that return structs by value.
  • Fix ObjC methods returning instancetype having the wrong type in sublasses.
  • When generating typedefs for Pointer<NativeFunction<Function>>, also
    generate a typedef for the Function.
  • Use Dart wrapper types in args and returns of ObjCBlocks.
  • Use Dart wrapper types in args and returns of static functions.
  • Renamed asset to assetId for ffi-native.

v9.0.1

Compare Source

  • Fix doc comment missing on struct/union array fields.
  • Allow extern inline functions to be generated.

v9.0.0

Compare Source

  • Use package:objective_c 8.0.0.
  • Breaking change: Major change to the way ObjC methods are code-genned.
    Methods now use named parameters, making them more readable and closer to how
    they're written in ObjC. For example, the NSData method
    dataWithBytes:length: used to be generated as
    dataWithBytes_length_(Pointer<Void> bytes, int length), but is now generated
    as dataWithBytes(Pointer<Void> bytes, {required int length}). Protocol
    methods are not affected.
    • Migration tip: A quick way to find affected methods is to search for _(.
  • Make it easier for a downstream clone to change behavior of certain utils.
  • Fix a bug where types could
    occasionally show up as a generic ObjCObjectBase, when they were supposed to
    be codegenned as a more specific interface types.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [ffigen](https://github.com/dart-lang/native) ([source](https://github.com/dart-lang/native/tree/HEAD/pkgs/ffigen)) | dev_dependencies | major | `^8.0.2` -> `^19.0.0` | --- > ⚠️ **Warning** > > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>dart-lang/native (ffigen)</summary> ### [`v19.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1900) [Compare Source](https://github.com/dart-lang/native/compare/ffigen-v18.1.0...ffigen-v19.0.0) - Use package:objective_c 8.0.0. - **Breaking change**: Major change to the way ObjC methods are code-genned. Methods now use named parameters, making them more readable and closer to how they're written in ObjC. For example, the `NSData` method `dataWithBytes:length:` used to be generated as `dataWithBytes_length_(Pointer<Void> bytes, int length)`, but is now generated as `dataWithBytes(Pointer<Void> bytes, {required int length})`. Protocol methods are not affected. - Migration tip: A quick way to find affected methods is to search for `_(`. - Make it easier for a downstream clone to change behavior of certain utils. - Fix [a bug](https://github.com/dart-lang/native/issues/1268) where types could occasionally show up as a generic ObjCObjectBase, when they were supposed to be codegenned as a more specific interface types. ### [`v18.1.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1810) [Compare Source](https://github.com/dart-lang/native/compare/ffigen-v18.0.0...ffigen-v18.1.0) - Fix a clang warning in ObjC protocol generated bindings. ### [`v18.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1800) [Compare Source](https://github.com/dart-lang/native/compare/ffigen-v17.0.0...ffigen-v18.0.0) - Use package:objective_c 7.0.0. - Add variable substitutions that can be used in the `headers.entry-points` to locate Apple APIs: `$XCODE`, `$IOS_SDK`, and `$MACOS_SDK`. - Add an empty constructor to all ObjC interfaces that have a `new` method, which just calls that method. - **Breaking change**: Change the `usrTypeMappings` field of `Config`'s factory constructor from a `List<ImportedType>` to a `Map<String, ImportedType>`. - Add a `keepIsolateAlive` parameter to the block and protocol constructors that allows a block or protocol to keep its owner isolate alive. - **Breaking change**: `keepIsolateAlive` defaults to true, so all existing ObjC blocks and protocols now keep their isolates alive by default. - Change how protocols are implemented to fix [a bug](https://github.com/dart-lang/http/issues/1702), by removing all uses of `NSProxy`. - **Breaking change**: Change how duplicate identifiers are renamed to match jnigen. The main change is that `$` is used as a delimiter now, to avoid renamed identifiers from colliding with other identifiers. For example, `foo` is renamed to `foo$1` if there's already a `foo` in the namespace. - Fix [a bug](https://github.com/dart-lang/native/issues/1967) where blocking blocks could deadlock if invoked from the Flutter UI thread. Note that this relies on changes in Flutter that are currently only available in the main channel. These changes will likely be released in Flutter 3.31.0. ### [`v17.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1700) [Compare Source](https://github.com/dart-lang/native/compare/ffigen-v16.1.0...ffigen-v17.0.0) - Use package:objective_c 6.0.0 - Support transitive categories of built-in types: https://github.com/dart-lang/native/issues/1820 - **Breaking change**: Maintain protocol conformance when translating from ObjC to Dart. For example, ObjC's `id<FooProtocol>` is now translated to Dart's `FooProtocol`. Generally this shouldn't be a breaking change for code that is using protocols correctly, with a few caveats: - For more advanced use cases that use `ObjCProtocolBuilder` directly, after calling `build()` you will need to cast the generated object to the target protocol: `FooProtocol.castFrom(protocolBuilder.build())`. - Due to limitations in the Dart type system, only the first protocol of an `id` is used: `id<FooProtocol, BarProtocol>` becomes `FooProtocol`. The `FooProtocol.castFrom` method can help work around issues this may cause. - Fix the handling of global arrays to remove the extra pointer reference. - Add a `max` field to the `external-versions` config, and use it to determine which APIs are generated. - Add a runtime OS version check to ObjC APIs, which throws an error if the current OS version is earlier than the version that the API was introduced. ### [`v16.1.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1610) - Ensure that required symbols are available to FFI even when the final binary is linked with `-dead_strip`. - Handle dart typedefs in import/export of symbol files. - Add support for blocking ObjC blocks that can be invoked from any thread. - Add support for blocking ObjC protocol methods. - Remove explicit `objc_retain` calls from the generated bindings. ### [`v16.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1600) - Ensure all protocols referenced in bindings are available at runtime. - Use `package:dart_style` directly to format generated Dart code, rather than subprocessing to `dart format`. - Use package:objective_c 4.0.0 - Fix various small bugs todo with config filters: - https://github.com/dart-lang/native/issues/1582 - https://github.com/dart-lang/native/issues/1594 - https://github.com/dart-lang/native/issues/1595 - Fix [a bug](https://github.com/dart-lang/native/issues/1701) where nullable typealiases were treated as non-null. - Allow static and instance methods to have the same name: https://github.com/dart-lang/native/issues/1136 - **Breaking change**: Change the way ObjC categories are generated. Instead of inserting their methods into the interface, generate Dart extension methods. For instance methods this makes no difference to user code (as long as the extension methods are imported correctly). But for static methods it means `MyInterface.staticMethod` must change to `MyCategory.staticMethod`. Categories are included/excluded by the `objc-categories` config entry. - Add `include-transitive-objc-interfaces`, `include-transitive-objc-protocols`, and `include-transitive-objc-categories` config flags, which control whether transitively included ObjC interfaces, protocols, and categories are generated. - **Breaking change**: `include-transitive-objc-interfaces` defaults to false, which changes the default behavior from pulling in all transitive deps, to generating them as stubs. `include-transitive-objc-protocols` defaults to false, and `include-transitive-objc-categories` defaults to true, but these both replicate the existing behavior. - Fix [bugs](https://github.com/dart-lang/native/issues/1220) caused by mismatches between ObjC and Dart's inheritance rules. ### [`v15.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1500) - Bump minimum Dart version to 3.4. - Dedupe `ObjCBlock` trampolines to reduce generated ObjC code. - Update to latest `package:objective_c`. - ObjC objects now include the methods from the protocols they implement. Both required and optional methods are included. Optional methods will throw an exception if the method isn't implemented. - **Breaking change**: Only generate ObjC protocol implementation bindings for protocols that are included by the config filters. This is breaking because previously super protocols would automatically get implementation bindings, rather than just being incorporated into the child protocol. If you want those implementation bindings, you may need to add the super protocol to your `objc-protocols` filters. - Fix a bug where ObjC listener blocks could be deleted after being invoked by ObjC but before the invocation was received by Dart: https://github.com/dart-lang/native/issues/1571 - `sort:` config option now affects ObjC interface/protocol methods. - Fix a bug where `NSRange` was not being imported from package:objective_c: https://github.com/dart-lang/native/issues/1180 - **Breaking change**: Return structs from ObjC methods by value instead of taking a struct return pointer. ### [`v14.0.1`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1401) - Fix bug with nullable types in `ObjCBlock`'s type arguments: https://github.com/dart-lang/native/issues/1537 - Fix a path normalization bug: https://github.com/dart-lang/native/issues/1543 ### [`v14.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1400) - Create a public facing API for ffigen that can be invoked as a library: `void generate(Config config)`. Make `Config` an implementatble interface, rather than needing to be parsed from yaml. - Add a `external-versions` config option. Setting the minimum target version will omit APIs from the generated bindings if they were deprecated before this version. - Global variables using ObjC types (interfaces or blocks) will now use the correct Dart wrapper types, instead of the raw C-style pointers. - Rename `assetId` under *ffi-native* to `asset-id` to follow dash-case. - **Breaking change**: ObjC blocks are now passed through all ObjC APIs as `ObjCBlock<Ret Function(Args...)>`, instead of the codegenned `ObjCBlock_...` wrapper. The wrapper is now a non-constructible set of util methods for constructing `ObjCBlock`. - **Breaking change**: Generated ObjC code has been migrated to ARC (Automatic Reference Counting), and must now be compiled with ARC enabled. For example, if you had a line like `s.requires_arc = []` in your podspec, this should either be removed, or you should add the ffigen generated ObjC code to the list. If you're compiling directly with clang, add the `-fobjc-arc` flag. - **Breaking change**: Structs with enum members now generate their members as Dart enum values as well. For example, with an enum `MyEnum` and a struct with a member `MyEnum enumMember`, two members are generated: `enumMemberAsInt` which contains the original integer value, and `enumMember`, which is of type `MyEnum`. If you configure the enum to be generated as Dart integers, this new behavior will not apply, and the struct member will be an integer as well. - **Breaking change**: Enums generated as integers will now generate `sealed` classes as opposed to `abstract` classes. - Fix some bugs in the way ObjC method families and ownership annotations were being handled: https://github.com/dart-lang/native/issues/1446 - Apply the existing `member-rename` option to ObjC interface and protocol methods and properties. - Add a `member-filter` option that filters ObjC interface and protocol methods and properties. ### [`v13.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1300) - **Breaking change**: Code-gen the ObjC `id` type to `ObjCObjectBase` rather than `NSObject`, since not all ObjC classes inherit from `NSObject`. Eg `NSProxy`. - **Breaking change**: Generate a native trampoline for each listener block, to fix a ref counting bug: https://github.com/dart-lang/native/issues/835. - If you have listener blocks affected by this ref count bug, a .m file will be generated containing the trampoline. You must compile this .m file into your package. If you already have a flutter plugin or build.dart, you can simply add this generated file to that build. - If you don't use listener blocks, you can ignore the .m file. - You can choose where the generated .m file is placed with the `output.objc-bindings` config option. - **Breaking change**: Native enums are now generated as real Dart enums, instead of abstract classes with integer constants. Native enum members with the same integer values are handled properly on the Dart side, and native functions that use enums in their signatures now accept the generated enums on the Dart side, instead of integer values. To opt out of this, use the `enums->as-int` option as specified in the README. - **Breaking change**: Enum integer types are implementation-defined and not part of the ABI. Therefore FFIgen does a best-effort approach trying to mimic the most common compilers for the various OS and architecture combinations. To silence the warning set config `silence-enum-warning` to `true`. - Rename ObjC interface methods that clash with type names. Fixes https://github.com/dart-lang/native/issues/1007. - Added support for implementing ObjC protocols from Dart. Use the `objc-protocols` config option to generate bindings for a protocol. - Fix some bugs where ObjC interface/protocol methods could collide with Dart built-in methods, or with types declared elsewhere in the generated bindings. - Add `include-unused-typedefs` to allow generating typedefs that are not referred to anywhere, the default option is `false`. - Use `package:dart_flutter_team_lints`. ### [`v12.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1200) - Global variables are now compatible with the `ffi-native` option. - Exposing symbol addresses of functions and globals is now compatible with the `ffi-native` option. - Add `retainAndReturnPointer` method to ObjC objects and blocks, and add `castFromPointer` method to blocks. - Add `-Wno-nullability-completeness` as default compiler option for MacOS. - **Breaking change**: Use `package:objective_c` in ObjC bindings. - ObjC packages will have a flutter dependency (until https://github.com/dart-lang/native/issues/1068 is fixed). - Core classes such as `NSString` have been moved into `package:objective_c`. - ObjC class methods don't need the ubiquitous `lib` argument anymore. In fact, ffigen won't even generate the native library class (unless it needs to bind top level functions without using `@Native`). It is still necessary to `DynamicLibrary.open` the dylib though, to load the classes and methods. - Adapting to this change: - Update ffigen and re-run the code generation. If the generated code no longer contains the native library class, it means it isn't needed anymore. So `final lib = FooNativeLib(DynamicLibrary.open('foo.dylib'));` must be changed to `DynamicLibrary.open('foo.dylib');`. - Regardless of whether the native library class still exists, delete the `lib` parameter from all ObjC object constructors and static method calls and block constructors. - If core ObjC classes such as `NSString` are being used, `package:objective_c` must be imported, as they won't be exported by the generated bindings. - Add --\[no-]format option to ffigen command line, which controls whether the formatting step happens. Defaults to true. - Delete Dart functions associated with ObjC closure blocks when the block is destroyed. Fixes https://github.com/dart-lang/native/issues/204 - Reduce cursor definition not found logs when `structs/unions` -> `dependency-only` is set to `opaque`. ### [`v11.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1100) [Compare Source](https://github.com/dart-lang/native/compare/ffigen-v10.0.0...ffigen-v11.0.0) - Any compiler errors/warnings in source header files will now result in bindings to **not** be generated by default, since it may result in invalid bindings if the compiler makes a wrong guess. A flag `--ignore-source-errors` (or yaml config `ignore-source-errors: true`) must be passed to change this behaviour. - **Breaking change**: Stop generating setters for global variables marked `const` in C. - Fix objc_msgSend being used on arm64 platforms where it's not available. - Fix missing comma with `ffi-native` functions marked `leaf`. - Add support for finding libclang in Conda environment. ### [`v10.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1000) [Compare Source](https://github.com/dart-lang/native/compare/ffigen-v9.0.1...ffigen-v10.0.0) - Stable release targeting Dart 3.2 using new `dart:ffi` features available in Dart 3.2 and later. - Add support for ObjC Blocks that can be invoked from any thread, using NativeCallable.listener. - Fix invalid exceptional return value ObjCBlocks that return floats. - Fix return_of_invalid_type analysis error for ObjCBlocks. - Fix crash in ObjC methods and blocks that return structs by value. - Fix ObjC methods returning instancetype having the wrong type in sublasses. - When generating typedefs for `Pointer<NativeFunction<Function>>`, also generate a typedef for the `Function`. - Use Dart wrapper types in args and returns of ObjCBlocks. - Use Dart wrapper types in args and returns of static functions. - Renamed `asset` to `assetId` for `ffi-native`. ### [`v9.0.1`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#901) [Compare Source](https://github.com/dart-lang/native/compare/ffigen-v9.0.0...ffigen-v9.0.1) - Fix doc comment missing on struct/union array fields. - Allow extern inline functions to be generated. ### [`v9.0.0`](https://github.com/dart-lang/native/blob/HEAD/pkgs/ffigen/CHANGELOG.md#1900) [Compare Source](https://github.com/dart-lang/native/compare/ffigen-v8.0.2...ffigen-v9.0.0) - Use package:objective_c 8.0.0. - **Breaking change**: Major change to the way ObjC methods are code-genned. Methods now use named parameters, making them more readable and closer to how they're written in ObjC. For example, the `NSData` method `dataWithBytes:length:` used to be generated as `dataWithBytes_length_(Pointer<Void> bytes, int length)`, but is now generated as `dataWithBytes(Pointer<Void> bytes, {required int length})`. Protocol methods are not affected. - Migration tip: A quick way to find affected methods is to search for `_(`. - Make it easier for a downstream clone to change behavior of certain utils. - Fix [a bug](https://github.com/dart-lang/native/issues/1268) where types could occasionally show up as a generic ObjCObjectBase, when they were supposed to be codegenned as a more specific interface types. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC40Mi4zIiwidXBkYXRlZEluVmVyIjoiNDAuNDIuMyIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->
renovatebot force-pushed renovate/ffigen-19.x from 90b82daf94 to bb80eb5631 2025-06-06 00:25:42 +00:00 Compare
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
test-actions/rustdesk!55
No description provided.