Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/pigeon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 26.0.3

* [kotlin] Removes all `containsKey` and replaces with `contains`.

## 26.0.2

* [kotlin] Fixes support for classes that override equals and hashCode for ProxyApis.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private object EventChannelMessagesPigeonUtils {
}
if (a is Map<*, *> && b is Map<*, *>) {
return a.size == b.size &&
a.all { (b as Map<Any?, Any?>).containsKey(it.key) && deepEquals(it.value, b[it.key]) }
a.all { (b as Map<Any?, Any?>).contains(it.key) && deepEquals(it.value, b[it.key]) }
}
return a == b
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private object MessagesPigeonUtils {
}
if (a is Map<*, *> && b is Map<*, *>) {
return a.size == b.size &&
a.all { (b as Map<Any?, Any?>).containsKey(it.key) && deepEquals(it.value, b[it.key]) }
a.all { (b as Map<Any?, Any?>).contains(it.key) && deepEquals(it.value, b[it.key]) }
}
return a == b
}
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/lib/src/generator_tools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import 'generator.dart';
/// The current version of pigeon.
///
/// This must match the version in pubspec.yaml.
const String pigeonVersion = '26.0.2';
const String pigeonVersion = '26.0.3';

/// Read all the content from [stdin] to a String.
String readStdin() {
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/lib/src/kotlin/kotlin_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1341,7 +1341,7 @@ fun deepEquals(a: Any?, b: Any?): Boolean {
}
if (a is Map<*, *> && b is Map<*, *>) {
return a.size == b.size && a.all {
(b as Map<Any?, Any?>).containsKey(it.key) &&
(b as Map<Any?, Any?>).contains(it.key) &&
deepEquals(it.value, b[it.key])
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private object CoreTestsPigeonUtils {
}
if (a is Map<*, *> && b is Map<*, *>) {
return a.size == b.size &&
a.all { (b as Map<Any?, Any?>).containsKey(it.key) && deepEquals(it.value, b[it.key]) }
a.all { (b as Map<Any?, Any?>).contains(it.key) && deepEquals(it.value, b[it.key]) }
}
return a == b
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private object EventChannelTestsPigeonUtils {
}
if (a is Map<*, *> && b is Map<*, *>) {
return a.size == b.size &&
a.all { (b as Map<Any?, Any?>).containsKey(it.key) && deepEquals(it.value, b[it.key]) }
a.all { (b as Map<Any?, Any?>).contains(it.key) && deepEquals(it.value, b[it.key]) }
}
return a == b
}
Expand Down
2 changes: 1 addition & 1 deletion packages/pigeon/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: pigeon
description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
repository: https://github.com/flutter/packages/tree/main/packages/pigeon
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+pigeon%22
version: 26.0.2 # This must match the version in lib/src/generator_tools.dart
version: 26.0.3 # This must match the version in lib/src/generator_tools.dart

environment:
sdk: ^3.7.0
Expand Down
1 change: 1 addition & 0 deletions packages/pigeon/test/kotlin_generator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ void main() {
expect(code, contains('val field1: Long? = null'));
expect(code, contains('fun fromList(pigeonVar_list: List<Any?>): Foobar'));
expect(code, contains('fun toList(): List<Any?>'));
expect(code, isNot(contains('containsKey')));
});

test('gen one enum', () {
Expand Down