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.
ffigen 22.1.0(published 2026-10-01) removeddefaultCompilerOptsfrom the public API (CHANGELOG: "RemoveddefaultCompilerOptsfrom the public API, since it is now redundant and was always a hack."). The latestswiftgen(0.2.0) still calls it and allowsffigen: ^22.0.0, so any fresh resolve ofswiftgennow fails to compile:This broke flutter/packages CI, since pigeon uses
swiftgenfor its FFI/Swift interop generation (e.g. this build). We're pinningffigen <22.1.0in pigeon's dev_dependencies as a workaround; the PR will link back here.Repro: any package that depends on
swiftgen: ^0.2.0; rundart pub upgrade(resolvesffigen 22.1.0), then compile anything that importspackage:swiftgen/swiftgen.dart. Pinningffigen: ">=22.0.0 <22.1.0"makes it compile again.Possible fixes:
swiftgenrelease that no longer usesdefaultCompilerOpts(e.g. usesInput.appendCompilerOptions) and requiresffigen ^22.1.0, and/orffigen 22.1.1that restoresdefaultCompilerOpts(deprecated), or retractffigen 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.