You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ffigen] 22.1.0 removed defaultCompilerOpts in a minor release, breaking swiftgen 0.2.0 #3723
ffigen 22.1.0 (published 2026-10-01) removed defaultCompilerOpts from the public API (CHANGELOG: "Removed defaultCompilerOpts from the public API, since it is now redundant and was always a hack."). The latest swiftgen (0.2.0) still calls it and allows ffigen: ^22.0.0, so any fresh resolve of swiftgen now fails to compile:
swiftgen-0.2.0/lib/src/generator.dart:101:17: Error: Method not found: 'defaultCompilerOpts'.
...fg.defaultCompilerOpts(logger),
^^^^^^^^^^^^^^^^^^^
This broke flutter/packages CI, since pigeon uses swiftgen for its FFI/Swift interop generation (e.g. this build). We're pinning ffigen <22.1.0 in pigeon's dev_dependencies as a workaround; the PR will link back here.
Repro: any package that depends on swiftgen: ^0.2.0; run dart pub upgrade (resolves ffigen 22.1.0), then compile anything that imports package:swiftgen/swiftgen.dart. Pinning ffigen: ">=22.0.0 <22.1.0" makes it compile again.
Possible fixes:
Publish a swiftgen release that no longer uses defaultCompilerOpts (e.g. uses Input.appendCompilerOptions) and requires ffigen ^22.1.0, and/or
Publish ffigen 22.1.1 that restores defaultCompilerOpts (deprecated), or retract ffigen 22.1.0.
Since removing a public API is a breaking change, it would be good for future removals like this to go out in a major version.
Activity
dcharkes commentedon Oct 1, 2026
Retracted to turn CIs green again.
@liamappelbe could you look at republishing?
[pigeon] pin native interop related dev deps and update some docs (#1…
liamappelbe commentedon Oct 1, 2026
Oops. I'll republish as a major version
dcharkes commentedon Oct 6, 2026
Published: https://pub.dev/packages/ffigen/versions/23.0.0