Upgrading ffigen 1 to 2
Breaking1.2.0 → 2.4.2Breaking5Deprecated1New12Changed7Fixed10Other1
BreakingUpgrade verdict
4 breaking changes.
In plain terms
- Some internal objects now compare by value, which means they can no longer be used in compile-time constant maps or sets.
- The tool no longer uses the flag that turned off sound null safety.
- FFIgen no longer has a separate setup step. Instead, you can optionally point it at your LLVM library folder with a new setting.
- The package now uses Dart's null safety, but in unsound mode, so callers may need to update their Dart SDK and dependencies.
Must act Top 4 of 5 that need code or config changes
Dart SDK requirement changed in 2.1.0: >=2.7.0 <3.0.0 → >=2.12.0 <3.0.0.
What you must change
Breaking4
Overrides
== and hashCode in OS, Architecture, and Sanitizer, so these objects can no longer be keys of const maps and sets.OSArchitectureSanitizerOS.nameArchitecture.nameRemoves the usage of the
--no-sound-null-safety flag.--no-sound-null-safetyRemoves the FFIgen setup phase and adds an optional
llvm-lib config key to specify the path to the llvm/lib folder.llvm-libMigrates ffigen to unsound null safety.
Deprecations to plan for
Deprecated1
Deprecates the
llvm-lib config key.llvm-lib