Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency ffigen to v16 #773

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 15, 2024

This PR contains the following updates:

Package Type Update Change
ffigen (source) dev_dependencies major ^8.0.0 -> ^16.0.0

Release Notes

dart-lang/native (ffigen)

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/11361136
  • 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 Dahttps://github.com/dart-lang/native/issues/1571ues/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/11801180
  • 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 handlhttps://github.com/dart-lang/native/issues/14461446
  • 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 bhttps://github.com/dart-lang/native/issues/835/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/10071007.
  • 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/1068ues/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. Fihttps://github.com/dart-lang/native/issues/204/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

  • Added a JSON schema for FFIgen config files.

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 is behind base branch, 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 was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Nov 15, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: crates/ui/pubspec.lock
Command failed: flutter pub upgrade ffigen
The current Dart SDK version is 3.3.0.

Because mizer depends on ffigen >=15.0.0 which requires SDK version >=3.4.0 <4.0.0, version solving failed.


You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on ffigen: flutter pub add dev:ffigen:^8.0.2

@renovate renovate bot force-pushed the renovate/ffigen-16.x branch 20 times, most recently from e4840da to 339508a Compare November 21, 2024 00:35
@renovate renovate bot force-pushed the renovate/ffigen-16.x branch 9 times, most recently from f33de9b to 87ae83d Compare November 28, 2024 08:09
@renovate renovate bot force-pushed the renovate/ffigen-16.x branch 14 times, most recently from 93ded6e to 430f882 Compare December 5, 2024 13:37
@renovate renovate bot force-pushed the renovate/ffigen-16.x branch 6 times, most recently from da439c1 to 0504c76 Compare December 12, 2024 20:58
@renovate renovate bot force-pushed the renovate/ffigen-16.x branch from 0504c76 to 79f46a8 Compare December 17, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants