Skip to content

Commit

Permalink
Merge branch 'main' into swift2objc-type-constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
nikeokoronkwo authored Dec 18, 2024
2 parents effe575 + 8c16b6c commit b826076
Show file tree
Hide file tree
Showing 352 changed files with 30,870 additions and 14,114 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ffi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
sdk: [dev]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: ${{ matrix.sdk }}
- id: install
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
sdk: [beta, dev]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: ${{ matrix.sdk }}
- id: install
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ffigen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
- id: install
Expand All @@ -54,7 +54,7 @@ jobs:
working-directory: pkgs/ffigen/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
- name: Install dependencies
Expand All @@ -75,7 +75,7 @@ jobs:
working-directory: pkgs/ffigen/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
- name: Install dependencies
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
working-directory: pkgs/ffigen/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
- name: Install dependencies
Expand All @@ -124,7 +124,7 @@ jobs:
working-directory: pkgs/ffigen/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
- name: Install dependencies
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
working-directory: pkgs/ffigen/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: "master"
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ffigen_weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
working-directory: pkgs/ffigen/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
- name: Install dependencies
Expand Down
30 changes: 16 additions & 14 deletions .github/workflows/jnigen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ jobs:
sdk: [stable]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: ${{ matrix.sdk }}
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- uses: axel-op/googlejavaformat-action@fe78db8a90171b6a836449f8d0e982d5d71e5c5a
- uses: axel-op/googlejavaformat-action@0dc4ef525e7ed73d8dff50b1b062a4d441d014b5
name: 'Check Java formatting with google-java-format'
with:
version: 'v1.24.0'
args: '--set-exit-if-changed'
- id: install
name: Install dependencies
Expand Down Expand Up @@ -76,7 +77,7 @@ jobs:
sdk: [stable, beta]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: ${{ matrix.sdk }}
cache: true
Expand Down Expand Up @@ -127,7 +128,7 @@ jobs:
working-directory: ./pkgs/jni
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand All @@ -136,9 +137,10 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
- uses: axel-op/googlejavaformat-action@fe78db8a90171b6a836449f8d0e982d5d71e5c5a
- uses: axel-op/googlejavaformat-action@0dc4ef525e7ed73d8dff50b1b062a4d441d014b5
name: 'Check Java formatting with google-java-format'
with:
version: 'v1.24.0'
args: '--set-exit-if-changed'
- name: install clang tools & CMake
run: |
Expand All @@ -165,7 +167,7 @@ jobs:
working-directory: ./pkgs/jni
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand Down Expand Up @@ -214,7 +216,7 @@ jobs:
working-directory: ./pkgs/jni
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand All @@ -241,7 +243,7 @@ jobs:
with:
version: latest
platform: x64
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand All @@ -267,7 +269,7 @@ jobs:
working-directory: ./pkgs/jni
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand All @@ -292,7 +294,7 @@ jobs:
uses: ConorMacBride/install-package@3e7ad059e07782ee54fa35f827df52aae0626f30
with:
brew: clang-format
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand All @@ -315,7 +317,7 @@ jobs:
working-directory: ./pkgs/jni/example
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand All @@ -339,7 +341,7 @@ jobs:
working-directory: ./pkgs/jni/example
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand All @@ -363,7 +365,7 @@ jobs:
with:
distribution: 'zulu'
java-version: '17'
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand All @@ -378,7 +380,7 @@ jobs:
working-directory: ./pkgs/jnigen/example/pdfbox_plugin
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
cache: true
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions: read-all

on:
pull_request:
branches: [main]
# No `branches:` to enable stacked PRs on GitHub.
paths:
- ".github/workflows/native.yaml"
- "pkgs/native_assets_builder/**"
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: ${{ matrix.sdk }}

Expand Down Expand Up @@ -120,6 +120,15 @@ jobs:
- run: dart pub get -C example/link/app_with_asset_treeshaking/
if: ${{ matrix.package == 'native_assets_cli' }}

- run: dart pub get -C test_data/fail_build/
if: ${{ matrix.package == 'native_assets_builder' }}

- run: dart pub get -C test_data/depend_on_fail_build/
if: ${{ matrix.package == 'native_assets_builder' }}

- run: dart pub get -C test_data/depend_on_fail_build_app/
if: ${{ matrix.package == 'native_assets_builder' }}

- run: dart analyze --fatal-infos
# Run on dev to ensure we're not depending on deprecated SDK things.

Expand All @@ -133,6 +142,9 @@ jobs:

- run: dart --enable-experiment=native-assets test
working-directory: pkgs/${{ matrix.package }}/example/build/native_dynamic_linking/
# TODO(https://github.com/dart-lang/native/issues/190): Enable on windows once
# https://github.com/dart-lang/sdk/commit/903eea6bfb8ee405587f0866a1d1e92eea45d29e
# has landed in dev channel.
if: ${{ matrix.package == 'native_assets_cli' && matrix.sdk == 'dev' && !matrix.breaking-change && matrix.os != 'windows' }}

- run: dart --enable-experiment=native-assets test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/native_toolchain_c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: ${{ matrix.sdk }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/objective_c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
- id: install
Expand All @@ -52,7 +52,7 @@ jobs:
working-directory: pkgs/objective_c/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
- name: Install dependencies
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
working-directory: pkgs/objective_c/example/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1
- uses: subosito/flutter-action@74af56c5ed2697ba4621264652728e8d217e53d3
with:
channel: 'stable'
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/swift2objc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: stable
- id: install
Expand All @@ -50,7 +50,7 @@ jobs:
working-directory: pkgs/swift2objc/
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: stable
- name: Install dependencies
Expand Down
6 changes: 6 additions & 0 deletions pkgs/ffigen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 16.0.1-wip

- 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.

## 16.0.0

- Ensure all protocols referenced in bindings are available at runtime.
Expand Down
2 changes: 1 addition & 1 deletion pkgs/ffigen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ objc-protocols:
include:
# Generates bindings for a specific protocol.
- MyProtocol
objc-category:
objc-categories:
include:
# Generates bindings for a specific category.
- MyCategory
Expand Down
7 changes: 7 additions & 0 deletions pkgs/ffigen/example/shared_bindings/headers/a.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ enum A_Enum{
void a_func1();

void a_func2(struct BaseStruct2 s, union BaseUnion2 u, BaseTypedef2 t);

void a_func3(BaseNativeTypedef1 i);

void a_func4(BaseNativeTypedef2 i);

void a_func5(BaseNativeTypedef3 i);

4 changes: 4 additions & 0 deletions pkgs/ffigen/example/shared_bindings/headers/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ union BaseUnion2{

typedef struct BaseStruct1 BaseTypedef1;
typedef struct BaseStruct2 BaseTypedef2;
typedef int BaseNativeTypedef1;
typedef BaseNativeTypedef1 BaseNativeTypedef2;
typedef BaseNativeTypedef2 BaseNativeTypedef3;

enum BaseEnum{
BASE_ENUM_1,
Expand All @@ -29,3 +32,4 @@ enum BaseEnum{
#define BASE_MACRO_1 1;

void base_func1(BaseTypedef1 t1, BaseTypedef2 t2);

Loading

0 comments on commit b826076

Please sign in to comment.