Skip to content

[pigeon] Pin ffigen and jnigen to fix the tree - #13093

Closed
QuncCccccc wants to merge 1 commit into
flutter:mainfrom
QuncCccccc:pigeon-pin-ffigen-jnigen
Closed

QuncCccccc wants to merge 1 commit into
flutter:mainfrom
QuncCccccc:pigeon-pin-ffigen-jnigen

Conversation

@QuncCccccc

@QuncCccccc QuncCccccc commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the red tree on main (Mac_arm64 custom_package_tests master/stable, Linux_android custom_package_tests master), which is also blocking the flutter→packages roll (#13091).

No change in this repo caused it: d5ec6dbaf1 was green and the next commit (249ddc0d0b, docs-only) was red. The breakage started with the first CI run after dart-lang/native published new versions of pigeon's dev_dependencies (~02:51 UTC 2026-10-01, via dart-lang/native#3716):

  • ffigen 22.1.0 removed defaultCompilerOpts from its public API, but the latest swiftgen (0.2.0) still calls it, so FFIgen generation fails on macOS:
    swiftgen-0.2.0/lib/src/generator.dart:101:17: Error: Method not found: 'defaultCompilerOpts'.
    (build)
  • jnigen 1.0.1 changes the generated header and JniVersionCheck(1, 0) → (1, 1), so the checked-in native_interop_tests.gen.jni.dart no longer matches generator output on Linux.
    (build)

This pins both (ffigen ">=22.0.0 <22.1.0", jnigen ">=1.0.0 <1.0.1") in the four pigeon pubspecs that depend on them, with TODOs to remove the pins once upstream is fixed. These are all dev_dependencies, so there is no impact on pigeon clients; the top-level pubspec.yaml change isn't auto-exempted by the repo tool, so this needs override: no versioning needed and override: no changelog needed.

Verified locally:

  • With the pin, swiftgen + the test plugin's ffigen config compile; with ffigen 22.1.0 the same compile fails with the CI error above.
  • The checked-in JNI bindings were generated by jnigen 1.0.0, which is what the pin resolves to (same as the last green run).

Upstream issue: dart-lang/native#3723

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2

ffigen 22.1.0 removed defaultCompilerOpts, which swiftgen 0.2.0 still uses, and jnigen 1.0.1 changes generated output so the checked-in JNI bindings no longer validate. Pin both dev_dependencies until upstream catches up.
@QuncCccccc
QuncCccccc requested a review from tarrinneal October 1, 2026 16:57
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Oct 1, 2026
@QuncCccccc QuncCccccc added override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes labels Oct 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds upper bound constraints to the ffigen and jnigen dev_dependencies across multiple pubspec.yaml files in the pigeon package, its examples, and platform tests. Specifically, ffigen is restricted to '>=22.0.0 <22.1.0' and jnigen is restricted to '>=1.0.0 <1.0.1' to address compatibility issues with swiftgen. There are no review comments, and I have no feedback to provide.

@QuncCccccc QuncCccccc added override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes CICD Run CI/CD and removed override: no versioning needed Override the check requiring version bumps for most changes override: no changelog needed Override the check requiring CHANGELOG updates for most changes CICD Run CI/CD labels Oct 1, 2026
@QuncCccccc

QuncCccccc commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Talked with @tarrinneal offline and a fix with some other changes will be ready is in #13103. So I'm closing this one:)!

@QuncCccccc QuncCccccc closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD override: no changelog needed Override the check requiring CHANGELOG updates for most changes override: no versioning needed Override the check requiring version bumps for most changes p: pigeon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant