- [swift, kotlin] Adds event channel support.
- [swift, kotlin] Adds
sealed
class inheritance support. - [swift] Updates codec class names to be upper camel case.
- [swift] Fixes the channel names of the named constructors of ProxyApis.
- Replaces deprecated collection method usage.
- Removes the
@protected
annotation from the InstanceManager field of thePigeonInternalProxyApiBaseClass
.
- [gobject] Moves class declarations to the header to work around a bug in some versions of glib.
- [swift] Adds
includeErrorClass
toSwiftOptions
.
- [swift] Adds implementation for
@ProxyApi
.
- Updates
README.md
to replace the deprecatedflutter pub run pigeon
command withdart run pigeon
.
- [dart] Fixes bug where special handling of ints is ignored if no custom types are used.
- Adds support for non-nullable types in collections.
- Adds support for enums and classes in collections.
- [kotlin] Adds implementation for
@ProxyApi
.
- Allows generation of classes that aren't referenced in an API.
- [dart] Changes codec to send int64 instead of int32.
- Breaking Change [swift] Changes generic
map
to nullable keys ofAnyHashable
to conform to other platforms. - Adds tests to validate collections of ints.
- Removes restriction on number of custom types.
- [java] Fixes bug with multiple enums.
- [java] Removes
Object
from generics. - [objc] Fixes bug with multiple enums per data class.
- Updates
varPrefix
andclassMemberNamePrefix
. - Updates minimum supported SDK version to Flutter 3.19/Dart 3.3.
- Adds GObject (Linux) support.
- Breaking Change [cpp] Fixes style of enum names. References to enum values
will need to be updated to
EnumType.kValue
style, instead of the previousEnumType.value
.
- [java] Adds
equals
andhashCode
support for data classes. - [swift] Fully-qualifies types in Equatable extension test.
- [cpp] Fixes handling of null class arguments.
- Moves all codec logic to single custom codec per file.
- Breaking Change Limits the number of total custom types to 126.
- If more than 126 custom types are needed, consider breaking up your definition files.
- Fixes bug that prevented collection subtypes from being added properly.
- [swift] Adds
@unchecked Sendable
to codec method. - [objc] [cpp] Fixes bug that prevented setting custom header import path.
- [kotlin] Adds the
@JvmOverloads
to theHostApi
setUp method. This prevents the calling Java code from having to provide an emptyString
as Kotlin provides it by default
- [dart] Updates
PigeonInstanceMangerApi
to use the shared api channel code.
- Breaking Change [swift] Removes
FlutterError
in favor ofPigeonError
. - Updates minimum supported SDK version to Flutter 3.16/Dart 3.2.
- Fixes unnecessary calls of
toList
andfromList
when encoding/decoding data classes. - [kotlin] Changes to some code to make it more idiomatic.
- Removes collisions with the word
list
.
- Adds message channel suffix option to all APIs.
- Breaking Change [dart] Changes
FlutterApi
setup
tosetUp
.
- [swift] Adds
@SwiftClass
annotation to allow choice betweenstruct
andclass
for data classes. - [cpp] Adds support for recursive data class definitions.
- [dart] Adds implementation for
@ProxyApi
.
- [objc] Fixes double prefixes added to enum names.
- [swift] Separates message call code generation into separate methods.
- Removes heap allocation in generated C++ code.
- [kotlin] Adds
includeErrorClass
toKotlinOptions
. - Updates minimum supported SDK version to Flutter 3.13/Dart 3.1.
- Breaking Change [kotlin] Converts Kotlin enum case generation to SCREAMING_SNAKE_CASE.
- Updates
writeEnum
function to adhere to Kotlin naming conventions. - Improves handling of complex names with enhanced regex patterns.
- Expands unit tests for comprehensive name conversion validation.
- Migration Note: This change modifies the naming convention of Kotlin enum cases generated from the Pigeon package. It is recommended to review the impact on your existing codebase and update any dependent code accordingly.
- Updates
- Adds ProxyApi to AST generation.
- [swift] Improve style of Swift output.
- [kotlin] Separates message call code generation into separate methods.
- [dart] Separates message call code generation into separate methods.
- [dart] Fixes test generation for missing wrapResponse method if only host Api.
- [java] Adds
VoidResult
type forVoid
returns. - Breaking Change [java] Updates all
Void
return types to use newVoidResult
.
- Fixes new lint warnings.
- Prevents optional and non-positional parameters in Flutter APIs.
- [dart] Fixes named parameters in test output of host API methods.
- [java] Adds @CanIgnoreReturnValue annotation to class builder.
- Breaking Change [kotlin] Updates Flutter API to use new errorClassName.
- Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.
- Updates issue_tracker link.
- Breaking change [dart] Renames locally defined host API variables.
- [dart] Host api static field
codec
changed topigeonChannelCodec
.
- [dart] Host api static field
- [dart] Adds named parameters to host API methods.
- [dart] Adds optional parameters to host API methods.
- [dart] Adds default values for class constructors and host API methods.
- Adds
isEnum
andisClass
toTypeDeclaration
s. - [cpp] Fixes
FlutterError
generation being tied to ErrorOr.
- Adds compatibility with
analyzer
6.x.
- [kotlin] Removes unnecessary
;
s in generated code.
- [swift] Fixes Flutter Api void return error handling.
- This shouldn't be breaking for anyone, but if you were incorrectly getting success responses, you may now be failing (correctly).
- Adds method channel name to error response when channel fails to connect.
- Reduces code generation duplication.
- Changes some methods to only be generated if needed.
- Breaking Change [objc] Eliminates boxing of non-nullable primitive types
(bool, int, double). Changes required:
- Implementations of host API methods that take non-nullable primitives will need to be updated to match the new signatures.
- Calls to Flutter API methods that take non-nullable primitives will need to be updated to pass unboxed values.
- Calls to non-nullable primitive property methods on generated data classes will need to be updated.
- WARNING: Current versions of
Xcode
do not appear to warn about implicitNSNumber *
toBOOL
conversions, so code that is no longer correct after this breaking change may compile without warning. For example,myGeneratedClass.aBoolProperty = @NO
can silently setaBoolProperty
toYES
. Any data class or Flutter API interactions involvingbool
s should be carefully audited by hand when updating.
- [swift] Adds protocol for Flutter APIs.
- Adds error handling on Flutter API methods.
- Breaking Change [kotlin] Flutter API methods now return
Result<return-type>
. - Breaking Change [swift] Flutter API methods now return
Result<return-type, FlutterError>
. - Breaking Change [java] Removes
Reply
class from all method returns and replaces it withResult
.- Changes required: Replace all
Reply
callbacks withResult
classes that contain bothsuccess
andfailure
methods.
- Changes required: Replace all
- Breaking Change [java] Adds
NullableResult
class for all nullable method returns.- Changes required: Any method that returns a nullable type will need to be updated to return
NullableResult
rather thanResult
.
- Changes required: Any method that returns a nullable type will need to be updated to return
- Breaking Change [java] Renames Host API
setup
method tosetUp
. - Breaking Change [objc] Boxes all enum returns to allow for
nil
response on error. - Breaking Change [objc] Renames
<api>Setup
toSetUp<api>
.
- Adds pub topics to package metadata.
- Adds primitive enum support.
- [objc] Fixes nullable enums.
- Breaking Change [objc] Changes all nullable enums to be boxed in custom classes.
- Breaking Change [objc] Changes all enums names to have class prefix.
- Updates minimum supported SDK version to Flutter 3.7/Dart 2.19.
- Fixes generation failures when an output file is in a directory that doesn't already exist.
- [dart] Fixes import in generated test output when overriding package name.
- Adds package name to method channel strings to avoid potential collisions between plugins.
- Adds dartPackageName option to
pigeonOptions
.
- Adds generic
Object
field support to data classes.
- [swift] Fixes a crash when passing
null
for nested nullable classes.
- Updates README to better reflect modern usage.
- [objc] Adds macOS support to facilitate code sharing with existing iOS plugins.
- Requires
analyzer 5.13.0
and replaces use of deprecated APIs.
- [swift] Avoids using
Any
to representOptional
. - [swift] Breaking Change A raw
List
(without generic type argument) in Dart will be translated into[Any?]
(rather than[Any]
). - [swift] Breaking Change A raw
Map
(without generic type argument) in Dart will be translated into[AnyHashable:Any?]
(rather than[AnyHashable:Any]
). - Adds an example application that uses Pigeon directly, rather than in a plugin.
- Reports an error when trying to use an enum directly in a
List
orMap
argument.
- [objc] Fixes a warning due to a C++-style function signature in the codec getter's definition.
- [java] Fixes
UnknownNullability
andSyntheticAccessor
warnings.
- [cpp] Minor changes to output style.
- [swift] Fixes NSNull casting crash.
- [cpp] Removes experimental tags.
- Migrates off deprecated
BinaryMessenger
API.
- [cpp] Requires passing any non-nullable fields of generated data classes as constructor arguments, similar to what is done in other languages. This may require updates to existing code that creates data class instances on the native side.
- [cpp] Adds a convenience constructor to generated data classes to set all fields during construction.
- [cpp] Fixes class parameters to Flutter APIs.
- Updates minimum Flutter version to 3.3.
- [swift] Removes experimental tags.
- [kotlin] Removes experimental tags.
- [java] Adds a
GeneratedApi.FlutterError
exception for passing custom error details (code, message, details). - [kotlin] Adds a
FlutterError
exception for passing custom error details (code, message, details). - [kotlin] Adds an
errorClassName
option inKotlinOptions
for custom error class names. - [java] Removes legacy try catch from async APIs.
- [java] Removes legacy null check on non-nullable method arguments.
- [cpp] Fixes wrong order of items in
FlutterError
. - Adds
FlutterError
handling integration tests for all platforms.
- [swift] Changes all ints to int64. May require code updates to existing code.
- Adds integration tests for int64.
- [kotlin] Removes safe casting from decode process.
- [swift] Removes safe casting from decode process.
- Removes the unnecessary Flutter constraint.
- Removes an unnecessary null check.
- Aligns Dart and Flutter SDK constraints.
- Adds parameter to generate Kotlin code in example README.
- [kotlin] Fixes compiler warnings in generated output.
- [swift] Fixes compiler warnings in generated output.
- [swift] Removes safe casting from decode process.
- [kotlin] Removes safe casting from decode process.
- Updates links for the merge of flutter/plugins into flutter/packages.
- Breaking Change Updates
DartOptions
to be immutable and adds const to the constructor. - [java] Reverts
final
changes to Flutter Api classes.
- [objc] BREAKING CHANGE: FlutterApi calls now return a
FlutterError
, rather than anNSError
, on failure. - [objc] Fixes an unused function warning when only generating FlutterApi.
- [kotlin] Fixes Flutter API int errors with updated casting.
- [swift] Changes async method completion types. May require code updates to existing code.
- [swift] Adds error handling to async methods.
- [kotlin] Changes async method completion types. May require code updates to existing code.
- [kotlin] Adds error handling to async methods.
- Adds async error handling integration tests for all platforms.
- Updates code to fix strict-cast violations.
- [java] Fixes raw types lint issues.
- [objc] Removes unused function.
- [swift] Adds error handling to sync host API methods.
- [c++] Fixes handling of the
cpp*
options in@ConfigurePigeon
annotations.
- Adds
@SwiftFunction
annotation for specifying custom swift function signature.
- Requires analyzer 5.0.0 and replaces use of deprecated APIs.
- [c++] Fixes minor output formatting issues.
- Updates scoped methods to prevent symbol-less use.
- [kotlin] Fixes a missed casting of not nullable Dart 'int' to Kotlin 64bit long.
- [generator_tools] adds
newln
method for adding empty lines and ending lines. - Updates generators to more closely match Flutter formatter tool output.
- [java] BREAKING CHANGE: Makes data classes final. Updates generators for 1p linters.
- [docs] Updates README.md.
- [kotlin] Fixes a bug with a missed line break between generated statements in the
fromList
function of the companion object.
- [c++] Fixes most non-class arguments and return values in Flutter APIs. The types of arguments and return values have changed, so this may require updates to existing code.
- Creates StructuredGenerator class and implements it on all platforms.
- [c++] Fixes undefined behavior in
@async
methods.
- Creates new Generator classes for each language.
- [swift] Fixes warnings with
Object
parameters. - [dart] Fixes warnings with
Object
return values. - [c++] Generation of APIs that use
Object
no longer fails.
- Relocates generator classes. (Reverted)
- [c++] Fixes reply sending non EncodableValue wrapped lists.
- Add documentation comment support for Enum members.
- Updates serialization to use lists instead of maps to improve performance.
- [swift] Fixes compressed list data types.
- [java] Changes generated enum field to be final.
- [kotlin] Fixes a bug with some methods that return
void
.
- Adds the ability to use
runWithOptions
entrypoint to allow external libraries to use the pigeon easier.
- [swift] Fixes a bug when calling methods that return
void
.
- Fixes bug with parsing documentation comments that start with '/'.
- [dart] Fixes enum parameter handling in Dart test API class.
- [kotlin] Fixes Kotlin generated sync host API error.
- [java] Adds assert
args != null
. - [java] Changes the args of a single element to
ArrayList
fromArrays.asList
toCollections.singletonList
. - [java] Removes cast for
Object
.
- Removes unneeded custom codecs for all languages.
- Adds documentation comment support for Kotlin.
- Adds experimental support for Kotlin generation.
- [java] Adds missing
@NonNull
annotations to some methods.
- Adds documentation comment support for all currently supported languages.
- [swift] Makes swift output work on macOS.
- Fixes lint warnings.
- Exposes
SwiftOptions
.
- [java] BREAKING CHANGE: Changes style for enum values from camelCase to snake_case. Generated java enum values will now always be in upper snake_case.
- Updates text theme parameters to avoid deprecation issues.
- [dart] Deduces the correct import statement for Dart test files made with
dartHostTestHandler
instead of relying on relative imports.
- Requires
analyzer 4.4.0
, and replaces use of deprecated APIs.
- [java] Fixes returning int values from FlutterApi methods that fit in 32 bits.
- [c++] Fixes style issues in
FlutterError
andErrorOr
. The names and visibility of some members have changed, so this may require updates to existing code.
- [c++] Fixes most non-class arguments and return values in host APIs. The types of arguments and return values have changed, so this may require updates to existing code.
- Adds
unnecessary_import
to linter ignore list in generated dart tests.
- Adds
unnecessary_import
to linter ignore list forpackage:flutter/foundation.dart
.
- Removes
@dart = 2.12
from generated Dart code.
- Adds experimental support for Swift generation.
- [java] Adds option to add javax.annotation.Generated annotation.
- Supports newer versions of
analyzer
.
- Fixes potential crash bug when using a nullable nested type that has nonnull fields in ObjC.
- [c++] Adds support for non-nullable fields, and fixes some issues with nullable fields. The types of some getters and setter have changed, so this may require updates to existing code.
- Adds support for enums in arguments to methods for HostApis.
- [c++] Fixes minor style issues in generated code. This includes the naming of generated methods and arguments, so will require updates to existing code.
- Updates for non-nullable bindings.
- [c++] Adds C++ code generator.
- [objc] Simplified some code output, including avoiding Xcode warnings about
using
NSNumber*
directly as boolean value. - [tests] Moved test script to enable CI.
- Adds ability for generators to do AST validation. This can help generators without complete implementations to report gaps in coverage.
- Fixes non-nullable classes and enums as fields.
- Fixes nullable collections as return types.
- Enables NNBD for the Pigeon tool itself.
- [tests] Updates legacy Dart commands.
- BREAKING CHANGE: Removes the
--dart_null_safety
flag. Generated Dart now always uses nullability annotations, and thus requires Dart 2.12 or later.
- Fixes bug where Dart
FlutterApi
s would assert that a nullable argument was nonnull.
- [java] Makes the generated Builder class final.
- [java] Fixes crash for nullable nested type.
- Adds support for TaskQueues for serial background execution.
- Implements nullable parameters.
- BREAKING CHANGE - Nonnull parameters to async methods on HostApis for ObjC now have the proper nullability hints.
- Implements nullable return types.
- [front-end] Fix error caused by parsing
copyrightHeaders
passed to options in@ConfigurePigeon
.
- [dart_test] Adds missing linter ignores.
- [objc] Factors out helper function for reading from NSDictionary's.
- [objc] Renames static variables to match Google style.
- Updates behavior of run_tests.dart with no arguments.
- [debugging] Adds
ast_out
to help with debugging the compiler front-end. - [front-end, dart] Adds support for non-null fields in data classes in the front-end parser and the Dart generator (unsupported languages ignore the designation currently).
- [front-end, dart, objc, java] Adds support for non-null fields in data classes.
- [java] Fix too little information when having an exception
- [tests] Port several generator tests to run in Dart over bash
- [style] Fixes new style rules for Dart analyzer.
- [java] Fixes enum support for null values.
- [ci] Starts transition to a Dart test runner, adds windows support.
- [front-end] Starts issuing an error if enums are used in type arguments.
- [front-end] Passes through all enums, referenced or not so they can be used as a work around for direct enum support.
- [front-end] Made sure that explicit use of Object actually creates the codec that can represent custom classes.
- [dart] Fixed cast exception that can happen with primitive data types with type arguments in FlutterApi's.
- [front-end] Started accepting explicit Object references in type arguments.
- [codecs] Fixed nuisance where duplicate entries could show up in custom codecs.
- [front-end] Fixed bug where nested classes' type arguments aren't included in the output (generated class and codec).
- Updated example README for set up steps.
- [java] Fixed bug when using Integer arguments to methods declared with 'int' arguments.
- [front-end] Fixed bug where codecs weren't generating support for types that only show up in type arguments.
- [objc] Updated assert message for incomplete implementations of protocols.
- [java] Made it so
@async
handlers in@HostApi()
can report errors explicitly.
- [front-end] Fixed bug where classes only referenced as type arguments for generics weren't being generated.
- Started allowing primitive data types as arguments and return types.
- Generics support.
- Support for functions with more than one argument.
- [command-line] Added
one_language
flag for allowing Pigeon to only generate code for one platform. - [command-line] Added the optional sdkPath parameter for specifying Dart SDK path.
- [dart] Fixed copyright headers for Dart test output.
- [front-end] Added more errors for incorrect usage of Pigeon (previously they were just ignored).
- [generators] Moved Pigeon to using a custom codec which allows collection types to contain custom classes.
- [java] Fixed NPE in Java generated code for nested types.
- [objc] BREAKING CHANGE: logic for generating selectors has changed.
void add(Input value)
will now translate to-(void)addValue:(Input*)value
, methods with no arguments will translate to...WithError:
or...WithCompletion:
. - [objc] Added
@ObjCSelector
for specifying custom objc selectors.
- Updated the front-end parser to use dart
analyzer
instead ofdart:mirrors
.dart:mirrors
doesn't support null-safe code so there were a class of features we couldn't implement without this migration. - BREAKING CHANGE - the
configurePigeon
function has been migrated to a@ConfigurePigeon
annotation. See./pigeons/message.dart
for an example. The annotation can be attached to anything in the file to take effect. - BREAKING CHANGE - Now Pigeon files must be in one file per invocation of Pigeon. For example, the classes your APIs use must be in the same file as your APIs. If your Pigeon file imports another source file, it won't actually import it.
- bugfix in front-end parser for recursively referenced datatypes.
- bugfix in iOS async handlers of functions with no arguments.
- Added support for enums.
- Java: Fixed issue where multiple async HostApis can generate multiple Result interfaces.
- Dart: Made it so you can specify the BinaryMessenger of the generated APIs.
- BREAKING CHANGE - Pigeon files must be null-safe now. That means the fields inside of the classes must be declared nullable ( non-null fields aren't yet supported). Migration example:
// Version 0.1.x
class Foo {
int bar;
String baz;
}
// Version 0.2.x
class Foo {
int? bar;
String? baz;
}
- BREAKING CHANGE - The default output from Pigeon is now null-safe. If you
want non-null-safe code you must provide the
--no-dart_null_safety
flag. - The Pigeon source code is now null-safe.
- Fixed niladic non-value returning async functions in the Java generator.
- Made
runCommandLine
return an the status code.
- Moved logic from bin/ to lib/ to help customers wrap up the behavior.
- Added some more linter ignores for Dart.
- More Java linter and linter fixes.
- Java code generator enhancements:
- Added linter tests to CI.
- Fixed some linter issues in the Java code.
- Fixed decode method on generated Flutter classes that use null-safety and have null values.
- Implemented
@async
HostApi's for iOS. - Fixed async FlutterApi methods with void return.
- Fixed a bug introduced in 0.1.17 where methods without arguments were no longer being called.
- Null safe requires Dart 2.12.
- Split out test code generation for Dart into a separate file via the --dart_test_out flag.
- Fixed running in certain environments where NNBD is enabled by default.
- Added support for running in versions of Dart that support NNBD.
- [Windows] Fixed executing from drives other than C:.
- Fixed execution on Windows with certain setups where Dart didn't allow
backslashes in
import
statements.
- Fixed assert failure with creating a PlatformException as a result of an exception in Java handlers.
- Added flag to generate null safety annotated Dart code
--dart_null_safety
. - Made it so Dart API setup methods can take null.
- Updated the examples page.
- Fixed bug that prevented running
pigeon
on Windows (introduced in0.1.8
).
- Fixed bug where executing pigeon without arguments would crash (introduced in 0.1.8).
- Started spawning pigeon_lib in an isolate instead of a subprocess. The subprocess could have lead to errors if the dart version on $PATH didn't match the one that comes with flutter.
- Fixed Dart compilation for later versions that support null safety, opting out of it for now.
- Fixed nested types in the Java runtime.
- Fixed unused variable linter warning in Dart code under certain conditions.
- Made array datatypes correctly get imported and exported avoiding the need to add extra imports to generated code.
- Fixed nullability for NSError's in generated objc code.
- Fixed nullability of nested objects in the Dart generator.
- Added test to make sure the pigeon version is correct in generated code headers.
- Added error message if supported datatypes are used as arguments or return types directly, without an enclosing class.
- Added support for List and Map datatypes in Java and Objective-C targets.
- Updated the Readme.md.
- Removed static analysis warnings from generated Java code.
- Fixed issue where nested types didn't work if they weren't present in the Api.
- Added pigeon.dart.
- Fixed some Obj-C linter problems.
- Added the ability to generate a mock handler in Dart.
- Fixed setting an API to null in Java.
- Added support for void argument functions.
- Added nullability annotations to generated objc code.
- Added e2e tests for iOS.
- Renamed
setupPigeon
toconfigurePigeon
.
- Suppressed or got rid of warnings in generated Dart code.
- Added support for void return types.
- Fixed runtime exception in Android with values of ints less than 2^32.
- Incremented codegen version warning.
- Fixed primitive types for Android Java.
- Added support for Android Java.
- Added Host->Flutter calls for Objective-C
- Fixed warning in the README.md
- Initial release.