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

package:objective_c #1061

Merged
merged 24 commits into from
Apr 11, 2024
Merged

package:objective_c #1061

merged 24 commits into from
Apr 11, 2024

Conversation

liamappelbe
Copy link
Contributor

@liamappelbe liamappelbe commented Mar 28, 2024

This first release of package:objective_c just adds a couple of base classes to act as the root of all ObjC objects and blocks, which is the first step in allowing objects to be passed between different ffigen ObjC libraries. It also moves all of the ObjC runtime functions into this library.

Ffigen has been updated to use package:objective_c in its ObjC bindings. All the important ffigen changes are in objc_block.dart, objc_built_in_functions.dart, and objc_interface.dart.

  • All the classes and functions that package:objective_c defines used to be defined in the user's generated code. Now they're imported from package:objective_c. That let me delete a lot of code from objc_built_in_functions.dart.
  • All the generated block classes now inherit from the ObjCBlockBase class defined in package:objective_c.
  • Similarly, the root of the inheritance tree of all the generated ObjC interfaces is now the ObjCObjectBase class defined in package:objective_c.
  • The biggest change is that since all the core functions have been moved to package:objective_c, there's no need for objects or blocks to hold a reference to the native library. So the lib argument has been removed from a ton of ObjC APIs.
    • The sel and class objects that used to live in the native library are now just globals.
    • We still have library specific objc_msgSends (and variants), but the function pointer lives in package:objective_c, and we convert it to all the different function signatures using asFunction. The resulting function is also stored as a global.
    • Users still need to DynamicLibrary.open their dylib, but they don't have to wrap it in a generated native library (unless they're using top-level functions and aren't using @Native). See the changes in the tests for examples.

For testing, I want to avoid having the package:objective_c tests use ffigen. So there's not much I can test at the moment, since the only things in the package are internal details of ffigen. Those are all covered by the ffigen tests anyway. There will be more to test in this package once I add some of the higher level classes, like NSString.

#430

Copy link

github-actions bot commented Mar 28, 2024

PR Health

Changelog Entry ✔️

Details
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ⚠️

Details
File Coverage
pkgs/ffigen/example/objective_c/avf_audio_bindings.dart 💔 Not covered
pkgs/ffigen/example/objective_c/play_audio.dart 💔 Not covered
pkgs/ffigen/example/swift/example.dart 💔 Not covered
pkgs/ffigen/example/swift/swift_api_bindings.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/enum_class.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/func.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/imports.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/library.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/native_type.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_block.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_interface.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_nullable.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/pointer.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/type.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/typealias.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/utils.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/writer.dart 💔 Not covered
pkgs/ffigen/lib/src/header_parser/sub_parsers/objc_block_parser.dart 💔 Not covered
pkgs/objective_c/lib/objective_c.dart 💔 Not covered
pkgs/objective_c/lib/src/core.dart 💔 Not covered
pkgs/objective_c/lib/src/objective_c_bindings_generated.dart 💔 Not covered

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check

License Headers ✔️

Details
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/ffi/example/main.dart
pkgs/ffigen/example/libclang-example/generated_bindings.dart
pkgs/ffigen/example/shared_bindings/generate.dart
pkgs/ffigen/example/shared_bindings/lib/generated/a_gen.dart
pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart
pkgs/ffigen/example/shared_bindings/lib/generated/base_gen.dart
pkgs/ffigen/example/simple/generated_bindings.dart
pkgs/ffigen/lib/src/config_provider/config_spec.dart
pkgs/ffigen/lib/src/header_parser/clang_bindings/clang_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_decl_decl_collision_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_decl_symbol_address_collision_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_decl_type_name_collision_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_reserved_keyword_collision_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_comment_markup_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_dart_handle_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_forward_decl_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_functions_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_imported_types_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_native_func_typedef_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_packed_structs_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_regress_384_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_unions_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_varargs_bindings.dart
pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart
pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart
pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart
pkgs/ffigen/test/native_test/_expected_native_test_bindings.dart
pkgs/jni/lib/src/lang/jcharacter.dart
pkgs/jni/lib/src/third_party/generated_bindings.dart
pkgs/jni/lib/src/third_party/global_env_extensions.dart
pkgs/jni/lib/src/third_party/jni_bindings_generated.dart
pkgs/jnigen/android_test_runner/lib/main.dart
pkgs/jnigen/example/in_app_java/lib/android_utils.dart
pkgs/jnigen/example/kotlin_plugin/example/lib/main.dart
pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart
pkgs/jnigen/example/kotlin_plugin/lib/kotlin_plugin.dart
pkgs/jnigen/example/pdfbox_plugin/lib/pdfbox_plugin.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/_init.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/_package.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/_package.dart
pkgs/jnigen/lib/src/bindings/descriptor.dart
pkgs/jnigen/lib/src/elements/elements.g.dart
pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/_package.dart
pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/_package.dart
pkgs/jnigen/tool/command_runner.dart

Package publish validation ✔️

Details
Package Version Status
package:ffi 2.1.2 already published at pub.dev
package:ffigen 12.0.0-wip WIP (no publish necessary)
package:jni 0.8.0 already published at pub.dev
package:jnigen 0.8.1-wip WIP (no publish necessary)
package:native_assets_builder 0.6.1 already published at pub.dev
package:native_assets_cli 0.5.4 already published at pub.dev
package:native_toolchain_c 0.4.1 already published at pub.dev
package:objective_c 0.0.1-wip WIP (no publish necessary)

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

Copy link

PR Health

Changelog Entry ❗

Details
Package Changed Files
package:ffigen pkgs/ffigen/example/objective_c/pubspec.yaml
pkgs/ffigen/lib/src/code_generator/imports.dart
pkgs/ffigen/lib/src/code_generator/library.dart
pkgs/ffigen/lib/src/code_generator/objc_block.dart
pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart
pkgs/ffigen/lib/src/code_generator/objc_interface.dart
pkgs/ffigen/lib/src/code_generator/writer.dart
pkgs/ffigen/pubspec.yaml

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check

Coverage ⚠️

Details
File Coverage
pkgs/ffigen/example/objective_c/avf_audio_bindings.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/imports.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/library.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_block.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_interface.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/writer.dart 💔 Not covered
pkgs/objective_c/lib/objective_c.dart 💔 Not covered
pkgs/objective_c/lib/src/core.dart 💔 Not covered
pkgs/objective_c/lib/src/objective_c_bindings_generated.dart 💔 Not covered

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check

License Headers ⚠️

Details
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
pkgs/ffigen/example/objective_c/avf_audio_bindings.dart
pkgs/objective_c/lib/src/objective_c_bindings_generated.dart

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/ffi/example/main.dart
pkgs/ffigen/example/libclang-example/generated_bindings.dart
pkgs/ffigen/example/shared_bindings/generate.dart
pkgs/ffigen/example/shared_bindings/lib/generated/a_gen.dart
pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart
pkgs/ffigen/example/shared_bindings/lib/generated/base_gen.dart
pkgs/ffigen/example/simple/generated_bindings.dart
pkgs/ffigen/example/swift/swift_api_bindings.dart
pkgs/ffigen/lib/src/config_provider/config_spec.dart
pkgs/ffigen/lib/src/header_parser/clang_bindings/clang_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_decl_decl_collision_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_decl_symbol_address_collision_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_decl_type_name_collision_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_reserved_keyword_collision_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_comment_markup_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_dart_handle_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_forward_decl_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_functions_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_imported_types_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_native_func_typedef_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_packed_structs_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_regress_384_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_unions_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_varargs_bindings.dart
pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart
pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart
pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart
pkgs/ffigen/test/native_test/_expected_native_test_bindings.dart
pkgs/jni/lib/src/lang/jcharacter.dart
pkgs/jni/lib/src/third_party/generated_bindings.dart
pkgs/jni/lib/src/third_party/global_env_extensions.dart
pkgs/jni/lib/src/third_party/jni_bindings_generated.dart
pkgs/jnigen/android_test_runner/lib/main.dart
pkgs/jnigen/example/in_app_java/lib/android_utils.dart
pkgs/jnigen/example/kotlin_plugin/example/lib/main.dart
pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart
pkgs/jnigen/example/kotlin_plugin/lib/kotlin_plugin.dart
pkgs/jnigen/example/pdfbox_plugin/lib/pdfbox_plugin.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/_init.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/_package.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/_package.dart
pkgs/jnigen/lib/src/bindings/descriptor.dart
pkgs/jnigen/lib/src/elements/elements.g.dart
pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/_package.dart
pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/_package.dart
pkgs/jnigen/tool/command_runner.dart

This check can be disabled by tagging the PR with skip-license-check

Package publish validation ❗

Details
Package Version Status
package:ffi 2.1.2 already published at pub.dev
package:ffigen 12.0.0-wip WIP (no publish necessary)
package:jni 0.8.0-wip WIP (no publish necessary)
package:jnigen 0.8.0-wip WIP (no publish necessary)
package:native_assets_builder 0.6.1 already published at pub.dev
package:native_assets_cli 0.5.4 already published at pub.dev
package:native_toolchain_c 0.4.1 already published at pub.dev
package:objective_c 0.0.1-wip (error) pubspec version (0.0.1-wip) and changelog (0.0.1) don't agree

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

This check can be disabled by tagging the PR with skip-version-check

1 similar comment
Copy link

PR Health

Changelog Entry ❗

Details
Package Changed Files
package:ffigen pkgs/ffigen/example/objective_c/pubspec.yaml
pkgs/ffigen/lib/src/code_generator/imports.dart
pkgs/ffigen/lib/src/code_generator/library.dart
pkgs/ffigen/lib/src/code_generator/objc_block.dart
pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart
pkgs/ffigen/lib/src/code_generator/objc_interface.dart
pkgs/ffigen/lib/src/code_generator/writer.dart
pkgs/ffigen/pubspec.yaml

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check

Coverage ⚠️

Details
File Coverage
pkgs/ffigen/example/objective_c/avf_audio_bindings.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/imports.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/library.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_block.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/objc_interface.dart 💔 Not covered
pkgs/ffigen/lib/src/code_generator/writer.dart 💔 Not covered
pkgs/objective_c/lib/objective_c.dart 💔 Not covered
pkgs/objective_c/lib/src/core.dart 💔 Not covered
pkgs/objective_c/lib/src/objective_c_bindings_generated.dart 💔 Not covered

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check

License Headers ⚠️

Details
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
pkgs/ffigen/example/objective_c/avf_audio_bindings.dart
pkgs/objective_c/lib/src/objective_c_bindings_generated.dart

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/ffi/example/main.dart
pkgs/ffigen/example/libclang-example/generated_bindings.dart
pkgs/ffigen/example/shared_bindings/generate.dart
pkgs/ffigen/example/shared_bindings/lib/generated/a_gen.dart
pkgs/ffigen/example/shared_bindings/lib/generated/a_shared_b_gen.dart
pkgs/ffigen/example/shared_bindings/lib/generated/base_gen.dart
pkgs/ffigen/example/simple/generated_bindings.dart
pkgs/ffigen/example/swift/swift_api_bindings.dart
pkgs/ffigen/lib/src/config_provider/config_spec.dart
pkgs/ffigen/lib/src/header_parser/clang_bindings/clang_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_decl_decl_collision_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_decl_symbol_address_collision_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_decl_type_name_collision_bindings.dart
pkgs/ffigen/test/collision_tests/expected_bindings/_expected_reserved_keyword_collision_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_comment_markup_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_dart_handle_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_forward_decl_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_functions_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_imported_types_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_native_func_typedef_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_opaque_dependencies_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_packed_structs_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_regress_384_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_typedef_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_unions_bindings.dart
pkgs/ffigen/test/header_parser_tests/expected_bindings/_expected_varargs_bindings.dart
pkgs/ffigen/test/large_integration_tests/_expected_cjson_bindings.dart
pkgs/ffigen/test/large_integration_tests/_expected_libclang_bindings.dart
pkgs/ffigen/test/large_integration_tests/_expected_sqlite_bindings.dart
pkgs/ffigen/test/native_test/_expected_native_test_bindings.dart
pkgs/jni/lib/src/lang/jcharacter.dart
pkgs/jni/lib/src/third_party/generated_bindings.dart
pkgs/jni/lib/src/third_party/global_env_extensions.dart
pkgs/jni/lib/src/third_party/jni_bindings_generated.dart
pkgs/jnigen/android_test_runner/lib/main.dart
pkgs/jnigen/example/in_app_java/lib/android_utils.dart
pkgs/jnigen/example/kotlin_plugin/example/lib/main.dart
pkgs/jnigen/example/kotlin_plugin/lib/kotlin_bindings.dart
pkgs/jnigen/example/kotlin_plugin/lib/kotlin_plugin.dart
pkgs/jnigen/example/pdfbox_plugin/lib/pdfbox_plugin.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/_init.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocument.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/PDDocumentInformation.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/pdmodel/_package.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/PDFTextStripper.dart
pkgs/jnigen/example/pdfbox_plugin/lib/src/third_party/org/apache/pdfbox/text/_package.dart
pkgs/jnigen/lib/src/bindings/descriptor.dart
pkgs/jnigen/lib/src/elements/elements.g.dart
pkgs/jnigen/test/jackson_core_test/third_party/c_based/dart_bindings/com/fasterxml/jackson/core/_package.dart
pkgs/jnigen/test/jackson_core_test/third_party/dart_only/dart_bindings/com/fasterxml/jackson/core/_package.dart
pkgs/jnigen/tool/command_runner.dart

This check can be disabled by tagging the PR with skip-license-check

Package publish validation ❗

Details
Package Version Status
package:ffi 2.1.2 already published at pub.dev
package:ffigen 12.0.0-wip WIP (no publish necessary)
package:jni 0.8.0-wip WIP (no publish necessary)
package:jnigen 0.8.0-wip WIP (no publish necessary)
package:native_assets_builder 0.6.1 already published at pub.dev
package:native_assets_cli 0.5.4 already published at pub.dev
package:native_toolchain_c 0.4.1 already published at pub.dev
package:objective_c 0.0.1-wip (error) pubspec version (0.0.1-wip) and changelog (0.0.1) don't agree

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

This check can be disabled by tagging the PR with skip-version-check

README.md Outdated
@@ -11,6 +11,7 @@ building and bundling.
| --- | --- | --- |
| [ffi](pkgs/ffi/) | Utilities for working with Foreign Function Interface (FFI) code. | [![pub package](https://img.shields.io/pub/v/ffi.svg)](https://pub.dev/packages/ffi) |
| [ffigen](pkgs/ffigen/) | Generator for FFI bindings, using LibClang to parse C, Objective-C, and Swift files. | [![pub package](https://img.shields.io/pub/v/ffigen.svg)](https://pub.dev/packages/ffigen) |
| [objective_c](pkgs/objective_c/) | A library to access Objective C from Dart and Flutter that acts as a support library for package:ffigen. | [![pub package](https://img.shields.io/pub/v/objective_c.svg)](https://pub.dev/packages/objective_c) |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe for now "from Flutter" as this doesn't work from Dart standalone as long as it's a plugin.

Also please file an issue to move over to native-assets once the experimental flag for that is removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# objective_c

A library to access Objective C from Dart and Flutter that acts as a support
library for package:ffigen.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need an issue template for this? If no, please update the existing issue template for package FFIgen to also point tot his new package.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to give it its own issue template

package_config: ^2.1.0
path: ^1.8.0
objective_c: ^0.0.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be a dependency at all of ffigen, but only a dependency of the test projects?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@github-actions github-actions bot added the type-infra A repository infrastructure change or enhancement label Apr 2, 2024
@@ -82,8 +86,12 @@ jobs:
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this now, since it's going to be included in the flutter-action.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -61,8 +61,12 @@ jobs:
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -115,8 +123,12 @@ jobs:
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@liamappelbe liamappelbe marked this pull request as ready for review April 8, 2024 08:24
@liamappelbe liamappelbe changed the title [WIP] package:objective_c package:objective_c Apr 8, 2024
Copy link
Collaborator

@dcharkes dcharkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This first release of package:objective_c just adds a couple of base classes to act as the root of all ObjC objects and blocks, which is the first step in allowing objects to be passed between different ffigen ObjC libraries. It also moves most of the ObjC runtime functions into this library.

It's a bit hard to review a 60k diff in a generated file. Could you please add a characterization of the changes to the PR description?

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3
with:
sdk: ${{ matrix.sdk }}
sdk: 3.3.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this has the deeply immutable.
So when starting to use that, this should probably be flipped to dev again.

@@ -0,0 +1,44 @@
name: objective_c
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is better to fold this into ffigen.yml as a matrix. That way we don't have to duplicate things.

For testing, I want to avoid having the package:objective_c tests use ffigen. So there's not much I can test at the moment, since the only things in the package are internal details of ffigen. Those are all covered by the ffigen tests anyway. There will be more to test in this package once I add some of the higher level classes, like NSString.

Either we should figure out how to do coverage from the package:ffigen run, or we should have tests in this package. (@HosseinYousefi what's the situation for packag:jni in this regard?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JNI has more classes (like JString, JList, ...). And we also test Jni.env stuff. It makes sense to have a separate workflow for those. However, the coverage doesn't get added. I have an open issue for that: #1010.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll be adding classes like NSObject and NSString soon, so there will be more to test in this package.

The coverage issue should be pretty easy to fix. The coverage tool explicitly filters out coverage info from all packages other than the one directly being tested. All we have to do is change the flags to make sure all the packages in this repo are allowed through that filter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that worked. I'm gathering package:objective_c coverage during package:ffigen's tests. You can see that the pkgs/objective_c directory is present in the coverage data, where it was missing from earlier runs: https://coveralls.io/builds/66793256

# Goldens cannot be generated outside MacOS causing analysis errors.
- test/native_objc_test/**
# - test/native_objc_test/** # Moved to test_flutter for now.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@coveralls
Copy link

coveralls commented Apr 9, 2024

Coverage Status

coverage: 91.864% (-0.2%) from 92.067%
when pulling ff7c4b8 on pkgobjc
into 695c065 on main.

@@ -112,3 +116,20 @@ String makeArrayAnnotation(Writer w, ConstantArray arrayType) {

return '@${w.ffiLibraryPrefix}.Array.multi([${dimensions.join(', ')}])';
}

String findDart() {
// Returns the path to the Dart executable, which will usually just be
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to be a doc-comment.

/// The path to the Dart executable.
///
/// ...
String findDart() {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator

@dcharkes dcharkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a full pass over the PR now. I think we're almost there.

I think my main remaining question is whether we can get rid of the extra lib argument. Would it be possible to make an abstract getter that returns an ObjCLibrary? And then every NSObject returns a concrete subtype of ObjCLibrary. Would such an abstract ObjCLibrary be able to surface the required information?

objective_c: ^0.0.1
test: ^1.16.2

dependency_overrides:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes us to be only able to run pkgs/ffigen/test/setup.dart with the Dart from the Flutter SDK. Please add some documentation. (Here and in the setup file.)

And probably leave a reference to the issue that wants to move this to native assets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -29,7 +30,7 @@ void main() {
});

test('castFrom', () {
final fromCast = Castaway.castFrom(testInstance!.meAsNSObject());
final fromCast = Castaway.castFrom(lib, testInstance!.meAsNSObject());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get rid of the extra lib argument?

For example with:

class NSObject extends objc.ObjCObjectBase {
  @override
  ObjCLibrary get library => _lib;
}

abstract class NSObject extends objc.ObjCObjectBase {
  ObjCLibrary get library;
}

class CastTestObjCLibrary implements objc.ObjCLibrary {

expect(UnrelatedClass.isInstance(unrelated), isTrue);
final base = NSObject.castFrom(lib, BaseClass.new1(lib));
final unrelated = NSObject.castFrom(lib, UnrelatedClass.new1(lib));
expect(BaseClass.isInstance(lib, base), isTrue);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto, can we get rid of the extra lib argument by making ObjCObjectBase abstract, and NSObject having a getter for library?

@liamappelbe
Copy link
Contributor Author

I think my main remaining question is whether we can get rid of the extra lib argument. Would it be possible to make an abstract getter that returns an ObjCLibrary? And then every NSObject returns a concrete subtype of ObjCLibrary. Would such an abstract ObjCLibrary be able to surface the required information?

Unfortunately no. The main reason the wrapper objects need a reference to the library is objc_msgSend (all the other core ObjC functions are now in package:objective_c). objc_msgSend can't live in package:objective_c because we load a copy of it for each method signature, which is specific to the user's code gen. We wouldn't be able to expose these on a base ObjCLibrary.

The upside of taking this lib argument is that it enables compatibility between different ffigen'd ObjC libraries. If two different ObjC libraries both know about some class Foo, the user can create a Foo using one library's bindings (let's call that library's Foo wrapper object FooA), then use castFrom to convert it to the other library's FooB. If FooB.castFrom grabbed the ObjCLibrary instance from FooA, and tried to use it in the FooB wrapper, it would cause problems. Even if it worked for the FooB class (since the method signatures would be the same), it would probably fail when that lib object is used to construct other classes that the first library doesn't know about.

If we could move objc_msgSend to package:objective_c, then we might be able to remove the need for the wrapper objects to hold a reference to lib. That's a larger breaking change though, because we'd be removing it from all the signatures.

@dcharkes
Copy link
Collaborator

We wouldn't be able to expose these on a base ObjCLibrary.

Wouldn't we be able to expose objc_msgSend in an abstract way? E.g. with a Pointer that just points to the right memory address?

I'm fine with landing as is, but we should aim to give our users the best API we can.

If we could move objc_msgSend to package:objective_c, then we might be able to remove the need for the wrapper objects to hold a reference to lib. That's a larger breaking change though, because we'd be removing it from all the signatures.

Can you file an issue with the different options?

@liamappelbe
Copy link
Contributor Author

@dcharkes I managed to move objc_msgSend to package:objective_c. This has a pretty big effect on the generated bindings. ObjC objects and blocks no longer need a reference to the lib, and in most cases ffigen won't even generate the native library class. Users still need to DynamicLibrary.open the dylib though. Check out the tests to see the user facing changes. It's a big breaking change, but I think it makes the API much cleaner.

Copy link
Collaborator

@dcharkes dcharkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great with lib removed!

Ship it! 🚢

- name: Install dependencies
run: dart pub get
run: flutter pub get
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the majority of steps not be able to run in Dart standalone?

In other words, developers working on FFIgen on Linux/Windows should be able to run things on Dart standalone right? Only the ObjectiveC tests, which only run on MacOS, require Flutter?

Can we keep the Windows and Linux configs on Dart standalone?

(The JNIgen yaml file only has pub for the examples, not for analyzing package:jnigen, etc.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Linux/Windows tests can run without flutter, but pub get fails because of the package:objective_c dev dependency. I don't know of a way of declaring that dependency only for mac/ios.

https://github.com/dart-lang/native/actions/runs/8593210918/job/23544623224

@@ -6,6 +6,20 @@
- 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 #1068 is fixed).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit #1068 prefer using a full URL, then things keep working if we ever migrate repos again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

binding top level functions and not using `@Native`). It is still necessary
to `DynamicLibrary.open` the dylib though.
- Adapting to this change:
- If your generated code no longer contains the native library class, it
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write without 'you':

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@liamappelbe liamappelbe merged commit ffc493d into main Apr 11, 2024
17 checks passed
@liamappelbe liamappelbe deleted the pkgobjc branch April 11, 2024 22:09
mosuem added a commit that referenced this pull request May 2, 2024
commit 95d226d
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu May 2 08:38:22 2024 +0000

    Bump actions/checkout from 4.1.2 to 4.1.4 (#1113)

    Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.4.
    <details>
    <summary>Release notes</summary>
    <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p>
    <blockquote>
    <h2>v4.1.4</h2>
    <h2>What's Changed</h2>
    <ul>
    <li>Disable <code>extensions.worktreeConfig</code> when disabling <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@�jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1692">actions/checkout#1692</a></li>
    <li>Add dependabot config by <a href="https://github.com/cory-miller"><code>@�cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1688">actions/checkout#1688</a></li>
    <li>Bump word-wrap from 1.2.3 to 1.2.5 by <a href="https://github.com/dependabot"><code>@�dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1643">actions/checkout#1643</a></li>
    <li>Bump the minor-actions-dependencies group with 2 updates by <a href="https://github.com/dependabot"><code>@�dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1693">actions/checkout#1693</a></li>
    </ul>
    <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.1.3...v4.1.4">https://github.com/actions/checkout/compare/v4.1.3...v4.1.4</a></p>
    <h2>v4.1.3</h2>
    <h2>What's Changed</h2>
    <ul>
    <li>Update <code>actions/checkout</code> version in <code>update-main-version.yml</code> by <a href="https://github.com/jww3"><code>@�jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1650">actions/checkout#1650</a></li>
    <li>Check git version before attempting to disable <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@�jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1656">actions/checkout#1656</a></li>
    <li>Add SSH user parameter by <a href="https://github.com/cory-miller"><code>@�cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1685">actions/checkout#1685</a></li>
    </ul>
    <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.1.2...v4.1.3">https://github.com/actions/checkout/compare/v4.1.2...v4.1.3</a></p>
    </blockquote>
    </details>
    <details>
    <summary>Changelog</summary>
    <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p>
    <blockquote>
    <h1>Changelog</h1>
    <h2>v4.1.4</h2>
    <ul>
    <li>Disable <code>extensions.worktreeConfig</code> when disabling <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@�jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1692">actions/checkout#1692</a></li>
    <li>Add dependabot config by <a href="https://github.com/cory-miller"><code>@�cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1688">actions/checkout#1688</a></li>
    <li>Bump the minor-actions-dependencies group with 2 updates by <a href="https://github.com/dependabot"><code>@�dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1693">actions/checkout#1693</a></li>
    <li>Bump word-wrap from 1.2.3 to 1.2.5 by <a href="https://github.com/dependabot"><code>@�dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1643">actions/checkout#1643</a></li>
    </ul>
    <h2>v4.1.3</h2>
    <ul>
    <li>Check git version before attempting to disable <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@�jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1656">actions/checkout#1656</a></li>
    <li>Add SSH user parameter by <a href="https://github.com/cory-miller"><code>@�cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1685">actions/checkout#1685</a></li>
    <li>Update <code>actions/checkout</code> version in <code>update-main-version.yml</code> by <a href="https://github.com/jww3"><code>@�jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1650">actions/checkout#1650</a></li>
    </ul>
    <h2>v4.1.2</h2>
    <ul>
    <li>Fix: Disable sparse checkout whenever <code>sparse-checkout</code> option is not present <a href="https://github.com/dscho"><code>@�dscho</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1598">actions/checkout#1598</a></li>
    </ul>
    <h2>v4.1.1</h2>
    <ul>
    <li>Correct link to GitHub Docs by <a href="https://github.com/peterbe"><code>@�peterbe</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1511">actions/checkout#1511</a></li>
    <li>Link to release page from what's new section by <a href="https://github.com/cory-miller"><code>@�cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1514">actions/checkout#1514</a></li>
    </ul>
    <h2>v4.1.0</h2>
    <ul>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1396">Add support for partial checkout filters</a></li>
    </ul>
    <h2>v4.0.0</h2>
    <ul>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1067">Support fetching without the --progress option</a></li>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1436">Update to node20</a></li>
    </ul>
    <h2>v3.6.0</h2>
    <ul>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1377">Fix: Mark test scripts with Bash'isms to be run via Bash</a></li>
    <li><a href="https://redirect.github.com/actions/checkout/pull/579">Add option to fetch tags even if fetch-depth &gt; 0</a></li>
    </ul>
    <h2>v3.5.3</h2>
    <ul>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1196">Fix: Checkout fail in self-hosted runners when faulty submodule are checked-in</a></li>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1287">Fix typos found by codespell</a></li>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1369">Add support for sparse checkouts</a></li>
    </ul>
    <h2>v3.5.2</h2>
    <ul>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1289">Fix api endpoint for GHES</a></li>
    </ul>
    <h2>v3.5.1</h2>
    <ul>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1246">Fix slow checkout on Windows</a></li>
    </ul>
    <h2>v3.5.0</h2>
    <ul>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1237">Add new public key for known_hosts</a></li>
    </ul>
    <h2>v3.4.0</h2>
    <ul>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1209">Upgrade codeql actions to v2</a></li>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1210">Upgrade dependencies</a></li>
    <li><a href="https://redirect.github.com/actions/checkout/pull/1225">Upgrade <code>@�actions/io</code></a></li>
    </ul>
    </blockquote>
    <p>... (truncated)</p>
    </details>
    <details>
    <summary>Commits</summary>
    <ul>
    <li><a href="https://github.com/actions/checkout/commit/0ad4b8fadaa221de15dcec353f45205ec38ea70b"><code>0ad4b8f</code></a> Prep Release v4.1.4 (<a href="https://redirect.github.com/actions/checkout/issues/1704">#1704</a>)</li>
    <li><a href="https://github.com/actions/checkout/commit/43045ae669be728bd34ed56fcd1a230c0dc4d8e2"><code>43045ae</code></a> Disable <code>extensions.worktreeConfig</code> when disabling <code>sparse-checkout</code> (<a href="https://redirect.github.com/actions/checkout/issues/1692">#1692</a>)</li>
    <li><a href="https://github.com/actions/checkout/commit/37b082107ba410260a3aaddf93122e04801ce631"><code>37b0821</code></a> Bump the minor-actions-dependencies group with 2 updates (<a href="https://redirect.github.com/actions/checkout/issues/1693">#1693</a>)</li>
    <li><a href="https://github.com/actions/checkout/commit/9839dc14a02ddc6b6995e69eb3ecb98132fc8b6b"><code>9839dc1</code></a> Add dependabot config (<a href="https://redirect.github.com/actions/checkout/issues/1688">#1688</a>)</li>
    <li><a href="https://github.com/actions/checkout/commit/9b4c13b0bfa31b4514c14f74b5a166c2708f43c6"><code>9b4c13b</code></a> Bump word-wrap from 1.2.3 to 1.2.5 (<a href="https://redirect.github.com/actions/checkout/issues/1643">#1643</a>)</li>
    <li><a href="https://github.com/actions/checkout/commit/1d96c772d19495a3b5c517cd2bc0cb401ea0529f"><code>1d96c77</code></a> Add SSH user parameter (<a href="https://redirect.github.com/actions/checkout/issues/1685">#1685</a>)</li>
    <li><a href="https://github.com/actions/checkout/commit/cd7d8d697e10461458bc61a30d094dc601a8b017"><code>cd7d8d6</code></a> Check git version before attempting to disable <code>sparse-checkout</code> (<a href="https://redirect.github.com/actions/checkout/issues/1656">#1656</a>)</li>
    <li><a href="https://github.com/actions/checkout/commit/8410ad0602e1e429cee44a835ae9f77f654a6694"><code>8410ad0</code></a> Update <code>actions/checkout</code> version in <code>update-main-version.yml</code> (<a href="https://redirect.github.com/actions/checkout/issues/1650">#1650</a>)</li>
    <li>See full diff in <a href="https://github.com/actions/checkout/compare/9bb56186c3b09b4f86b1c65136769dd318469633...0ad4b8fadaa221de15dcec353f45205ec38ea70b">compare view</a></li>
    </ul>
    </details>
    <br />

    [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.2&new-version=4.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

    ---

    <details>
    <summary>Dependabot commands and options</summary>
    <br />

    You can trigger Dependabot actions by commenting on this PR:
    - `@dependabot rebase` will rebase this PR
    - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
    - `@dependabot merge` will merge this PR after your CI passes on it
    - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
    - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
    - `@dependabot reopen` will reopen this PR if it is closed
    - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
    - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

    </details>

commit 326f9b4
Author: Hossein Yousefi <[email protected]>
Date:   Thu May 2 10:26:20 2024 +0200

    [jnigen] [jni] 0.9.0 (#1110)

    * Refactor JArray<jbool>
    * Merge internal.c to dartjni.c

commit 3519c6f
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Thu May 2 08:18:16 2024 +0000

    Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (#1112)

    Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.2 to 1.6.4.
    <details>
    <summary>Release notes</summary>
    <p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/releases">dart-lang/setup-dart's releases</a>.</em></p>
    <blockquote>
    <h2>v1.6.4</h2>
    <ul>
    <li>Rebuild JS code to include changes from v1.6.3</li>
    </ul>
    <h2>v1.6.3</h2>
    <ul>
    <li>Roll <code>undici</code> dependency to address <a href="https://github.com/nodejs/undici/security/advisories/GHSA-m4v8-wqvr-p9f7">CVE-2024-30260</a> and <a href="https://github.com/nodejs/undici/security/advisories/GHSA-9qxr-qj54-h672">CVE-2024-30261</a>.</li>
    </ul>
    </blockquote>
    </details>
    <details>
    <summary>Changelog</summary>
    <p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md">dart-lang/setup-dart's changelog</a>.</em></p>
    <blockquote>
    <h2>v1.6.4</h2>
    <ul>
    <li>Rebuild JS code.</li>
    </ul>
    <h2>v1.6.3</h2>
    <ul>
    <li>Roll <code>undici</code> dependency to address <a href="https://github.com/nodejs/undici/security/advisories/GHSA-m4v8-wqvr-p9f7">CVE-2024-30260</a> and <a href="https://github.com/nodejs/undici/security/advisories/GHSA-9qxr-qj54-h672">CVE-2024-30261</a>.</li>
    </ul>
    <h2>v1.6.2</h2>
    <ul>
    <li>Switch to running the workflow on <code>node20`` from </code>node16`. See also
    <a href="https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/">Transitioning from Node 16 to Node 20</a>.</li>
    </ul>
    <h2>v1.6.1</h2>
    <ul>
    <li>Updated the google storage url for <code>main</code> channel releases.</li>
    </ul>
    <h2>v1.6.0</h2>
    <ul>
    <li>Enable provisioning of the latest Dart SDK patch release by specifying just
    the major and minor version (e.g. <code>3.2</code>).</li>
    </ul>
    <h2>v1.5.1</h2>
    <ul>
    <li>No longer test the <code>setup-dart</code> action on pre-2.12 SDKs.</li>
    <li>Upgrade JS interop code to use extension types
    (the new name for inline classes).</li>
    <li>The upcoming rename of the <code>be</code> channel to <code>main</code> is now supported with
    forward compatibility that switches when the rename happens.</li>
    </ul>
    <h2>v1.5.0</h2>
    <ul>
    <li>Re-wrote the implementation of the action into Dart.</li>
    <li>Auto-detect the platform architecture (<code>x64</code>, <code>ia32</code>, <code>arm</code>, <code>arm64</code>).</li>
    <li>Improved the caching and download resilience of the sdk.</li>
    <li>Added a new action output: <code>dart-version</code> - the installed version of the sdk.</li>
    </ul>
    <h2>v1.4.0</h2>
    <ul>
    <li>Automatically create OIDC token for pub.dev.</li>
    <li>Add a reusable workflow for publishing.</li>
    </ul>
    <h2>v1.3.0</h2>
    <ul>
    <li>The install location of the Dart SDK is now available</li>
    </ul>
    </blockquote>
    <p>... (truncated)</p>
    </details>
    <details>
    <summary>Commits</summary>
    <ul>
    <li><a href="https://github.com/dart-lang/setup-dart/commit/f0ead981b4d9a35b37f30d36160575d60931ec30"><code>f0ead98</code></a> Rebuild JS code (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/129">#129</a>)</li>
    <li><a href="https://github.com/dart-lang/setup-dart/commit/65c82982aa686933bf10d50aced7a27b2b63f2a6"><code>65c8298</code></a> Update CHANGELOG.md (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/128">#128</a>)</li>
    <li><a href="https://github.com/dart-lang/setup-dart/commit/57338d64c065775c2cf86eaf665316ea44e0249d"><code>57338d6</code></a> Bump undici from 5.28.3 to 5.28.4 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/127">#127</a>)</li>
    <li><a href="https://github.com/dart-lang/setup-dart/commit/05d3f5ec28dca4e3ae8991f2be7828a62942f8a8"><code>05d3f5e</code></a> Bump <code>@�actions/http-client</code> from 2.2.0 to 2.2.1 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/126">#126</a>)</li>
    <li><a href="https://github.com/dart-lang/setup-dart/commit/b8c0b77d1f6fb52c5ddff2fc3da6cfa3f9585860"><code>b8c0b77</code></a> no longer specify the inline-class experiment flag (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/125">#125</a>)</li>
    <li><a href="https://github.com/dart-lang/setup-dart/commit/b9952d818df9b43bab696de0e1b7bbf09464a829"><code>b9952d8</code></a> Bump undici from 5.27.0 to 5.28.3 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/124">#124</a>)</li>
    <li><a href="https://github.com/dart-lang/setup-dart/commit/9a6ee8904aa6a1fa76b02bb3e7b0ec30cddcaaac"><code>9a6ee89</code></a> Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/123">#123</a>)</li>
    <li>See full diff in <a href="https://github.com/dart-lang/setup-dart/compare/fedb1266e91cf51be2fdb382869461a434b920a3...f0ead981b4d9a35b37f30d36160575d60931ec30">compare view</a></li>
    </ul>
    </details>
    <br />

    [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.2&new-version=1.6.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

    ---

    <details>
    <summary>Dependabot commands and options</summary>
    <br />

    You can trigger Dependabot actions by commenting on this PR:
    - `@dependabot rebase` will rebase this PR
    - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
    - `@dependabot merge` will merge this PR after your CI passes on it
    - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
    - `@dependabot cancel merge` will cancel a previously requested merge and block automerging
    - `@dependabot reopen` will reopen this PR if it is closed
    - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
    - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

    </details>

commit bf9dce2
Author: Daco Harkes <[email protected]>
Date:   Thu May 2 10:00:26 2024 +0200

    [infra] Fix CI (#1114)

commit 2eef97f
Author: Daco Harkes <[email protected]>
Date:   Thu May 2 08:25:27 2024 +0200

    [infra] Swap weekly bot to x64 (#1116)

commit 6a9282c
Author: Liam Appelbe <[email protected]>
Date:   Sun Apr 28 17:53:34 2024 -0700

    Delete the Dart functions associated with closure blocks (#1100)

    * ObjC example, and infra for shipping native code with plugin

    * Fix the block leak

    * Mostly working

    * Fix analysis

    * Fix analysis

    * Fix example linker error

    * fmt

    * Daco's comments

    * Fix NSData

commit 042af36
Author: Brian Quinlan <[email protected]>
Date:   Thu Apr 25 16:31:03 2024 -0700

    Add helper methods for NSData (#1104)

commit 3bc1eb8
Author: Hossein Yousefi <[email protected]>
Date:   Thu Apr 25 12:15:56 2024 +0200

    [jnigen] Fix summarizer and improve errors (#1103)

    Close #877

commit 880ca30
Author: Hossein Yousefi <[email protected]>
Date:   Wed Apr 24 12:04:36 2024 +0200

    [jnigen] Add `getRange` method to `JArray<JPrimitive>` and change the dart equivalent type for `JArray<jchar>` to `int` (#1095)

    * Close #990
    * Convert the return type of `operator []` of `JArray<jchar>` to `int`, to be more consistent with the `getRange` return type. Similarly `operator []=` gets an `int` now
    * Remove some unused functions in `dartjni.c`
    * Use `.asTypedList(len).setRange` in `setRange` to be more efficient
    * Close #1097 – Improve the performance of`JArray`'s `operator []=`

commit d7d9229
Author: Hossein Yousefi <[email protected]>
Date:   Tue Apr 23 17:50:31 2024 +0200

    [ffi] Fix `MallocAllocator` doc (#1096)

commit 2393cca
Author: Hossein Yousefi <[email protected]>
Date:   Thu Apr 18 11:33:06 2024 +0200

    [jnigen] Remove C-based bindings (#1091)

commit 0f41ebb
Author: Liam Appelbe <[email protected]>
Date:   Wed Apr 17 16:26:46 2024 -0700

    [ffigen] Move core ObjC classes to package:objective_c (#1088)

    * Move core ObjC classes to package:objective_c

    * Fix formatting and analysis

    * Fix analysis

    * Fix analysis

    * Fix analysis and add tests

    * Fix pub get failure

    * More tests and coverage

    * Fix path

    * Fix permissions

    * Fix coverage

    * Debugging coverage

    * Fix analysis

    * Still debugging coverage

    * Fix analysis

    * Debug coverage

    * Remove coverage debugging

    * Daco's comments

commit e88a6a8
Author: Hossein Yousefi <[email protected]>
Date:   Wed Apr 17 11:53:36 2024 +0200

    Use varargs for dartonly method calls (#1090)

commit ffc493d
Author: Liam Appelbe <[email protected]>
Date:   Fri Apr 12 10:09:55 2024 +1200

    package:objective_c (#1061)

    * Initial commit of package:objective_c

    * Fix some of the PR health warnings

    * Remove the objective_c dep from ffigen. Need to separate those tests

    * Disable analysis and move tests

    * Fix tests

    * Workflows

    * Fix analysis

    * Fix analysis

    * Fix analysis

    * Fix analysis

    * Fix analysis

    * Fix analysis

    * Fix tests

    * Fix tests and address comments

    * Improve ffigen's CHANGELOG entry

    * Gather objective_c coverage during ffigen tests

    * Daco's comments

    * Move objc_msgSend into package:objective_c

    * Changelog

    * Fix analysis

    * Update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ffigen package:objective_c type-infra A repository infrastructure change or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants