From 55294efc3b95358a71314a3f1459dead5fb6c759 Mon Sep 17 00:00:00 2001 From: Tarrin Neal Date: Mon, 23 Jan 2023 15:19:16 -0800 Subject: [PATCH] [pigeon] Updates writeScoped and addScoped to disallow symbol-less use. (#3081) * remove left over symbol-less scoped method calls * assert to enforce no nesting with scoped * changelog * fix version num * nits --- packages/pigeon/CHANGELOG.md | 4 +++ packages/pigeon/lib/cpp_generator.dart | 10 +++---- packages/pigeon/lib/dart_generator.dart | 4 +-- packages/pigeon/lib/generator_tools.dart | 27 ++++++++++++------- packages/pigeon/lib/java_generator.dart | 10 +++---- packages/pigeon/lib/objc_generator.dart | 4 +-- .../mock_handler_tester/test/message.dart | 9 +------ .../pigeon/mock_handler_tester/test/test.dart | 7 +---- .../CoreTests.java | 8 +----- .../ios/Classes/CoreTests.gen.h | 2 +- .../ios/Classes/CoreTests.gen.m | 8 +----- .../lib/core_tests.gen.dart | 8 +----- .../lib/flutter_unittests.gen.dart | 6 +---- .../lib/multiple_arity.gen.dart | 2 +- .../lib/non_null_fields.gen.dart | 8 +----- .../lib/null_fields.gen.dart | 6 +---- .../lib/nullable_returns.gen.dart | 2 +- .../lib/primitive.gen.dart | 2 +- .../lib/src/generated/core_tests.gen.dart | 8 +----- .../com/example/test_plugin/CoreTests.gen.kt | 2 +- .../ios/Classes/CoreTests.gen.swift | 2 +- .../macos/Classes/CoreTests.gen.swift | 2 +- .../windows/pigeon/core_tests.gen.cpp | 8 +----- .../windows/pigeon/core_tests.gen.h | 2 +- packages/pigeon/pubspec.yaml | 2 +- 25 files changed, 55 insertions(+), 98 deletions(-) diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index cb71b39478..f0e4b5700e 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,3 +1,7 @@ +## 7.0.3 + +* Updates scoped methods to prevent symbol-less use. + ## 7.0.2 * [kotlin] Fixes a missed casting of not nullable Dart 'int' to Kotlin 64bit long. diff --git a/packages/pigeon/lib/cpp_generator.dart b/packages/pigeon/lib/cpp_generator.dart index 844e80e055..dbaac5fbad 100644 --- a/packages/pigeon/lib/cpp_generator.dart +++ b/packages/pigeon/lib/cpp_generator.dart @@ -849,17 +849,17 @@ flutter::EncodableValue ${api.name}::WrapError(const FlutterError& error) { indent.write('switch (type) '); indent.addScoped('{', '}', () { for (final EnumeratedClass customClass in getCodecClasses(api, root)) { - indent.write('case ${customClass.enumeration}:'); - indent.writeScoped('', '', () { + indent.writeln('case ${customClass.enumeration}:'); + indent.nest(1, () { indent.writeln( 'return flutter::CustomEncodableValue(${customClass.name}(std::get(ReadValue(stream))));'); }); } - indent.write('default:'); - indent.writeScoped('', '', () { + indent.writeln('default:'); + indent.nest(1, () { indent.writeln( 'return $_defaultCodecSerializer::ReadValueOfType(type, stream);'); - }, addTrailingNewline: false); + }); }); }); indent.newln(); diff --git a/packages/pigeon/lib/dart_generator.dart b/packages/pigeon/lib/dart_generator.dart index b45a9a9cc1..edd992f319 100644 --- a/packages/pigeon/lib/dart_generator.dart +++ b/packages/pigeon/lib/dart_generator.dart @@ -669,8 +669,8 @@ void _writeCodec(Indent indent, String codecName, Api api, Root root) { indent.write('switch (type) '); indent.addScoped('{', '}', () { for (final EnumeratedClass customClass in codecClasses) { - indent.write('case ${customClass.enumeration}: '); - indent.writeScoped('', '', () { + indent.writeln('case ${customClass.enumeration}: '); + indent.nest(1, () { indent.writeln( 'return ${customClass.name}.decode(readValue(buffer)!);'); }); diff --git a/packages/pigeon/lib/generator_tools.dart b/packages/pigeon/lib/generator_tools.dart index 89052b721b..a76d02ee01 100644 --- a/packages/pigeon/lib/generator_tools.dart +++ b/packages/pigeon/lib/generator_tools.dart @@ -8,8 +8,10 @@ import 'dart:mirrors'; import 'ast.dart'; -/// The current version of pigeon. This must match the version in pubspec.yaml. -const String pigeonVersion = '7.0.2'; +/// The current version of pigeon. +/// +/// This must match the version in pubspec.yaml. +const String pigeonVersion = '7.0.3'; /// Read all the content from [stdin] to a String. String readStdin() { @@ -81,8 +83,9 @@ class Indent { } } - /// Scoped increase of the ident level. For the execution of [func] the - /// indentation will be incremented. + /// Scoped increase of the indent level. + /// + /// For the execution of [func] the indentation will be incremented. void addScoped( String? begin, String? end, @@ -90,6 +93,8 @@ class Indent { bool addTrailingNewline = true, int nestCount = 1, }) { + assert(begin != '' || end != '', + 'Use nest for indentation without any decoration'); if (begin != null) { _sink.write(begin + newline); } @@ -109,12 +114,15 @@ class Indent { Function func, { bool addTrailingNewline = true, }) { + assert(begin != '' || end != '', + 'Use nest for indentation without any decoration'); addScoped(str() + (begin ?? ''), end, func, addTrailingNewline: addTrailingNewline); } - /// Scoped increase of the ident level. For the execution of [func] the - /// indentation will be incremented by the given amount. + /// Scoped increase of the indent level. + /// + /// For the execution of [func] the indentation will be incremented by the given amount. void nest(int count, Function func) { inc(count); func(); // ignore: avoid_dynamic_calls @@ -270,9 +278,10 @@ void addLines(Indent indent, Iterable lines, {String? linePrefix}) { } } -/// Recursively merges [modification] into [base]. In other words, whenever -/// there is a conflict over the value of a key path, [modification]'s value for -/// that key path is selected. +/// Recursively merges [modification] into [base]. +/// +/// In other words, whenever there is a conflict over the value of a key path, +/// [modification]'s value for that key path is selected. Map mergeMaps( Map base, Map modification, diff --git a/packages/pigeon/lib/java_generator.dart b/packages/pigeon/lib/java_generator.dart index ec5ead05b3..9facc2642d 100644 --- a/packages/pigeon/lib/java_generator.dart +++ b/packages/pigeon/lib/java_generator.dart @@ -717,16 +717,16 @@ Result<$returnType> $resultName = indent.write('switch (type) '); indent.addScoped('{', '}', () { for (final EnumeratedClass customClass in codecClasses) { - indent.write('case (byte) ${customClass.enumeration}: '); - indent.writeScoped('', '', () { + indent.writeln('case (byte) ${customClass.enumeration}:'); + indent.nest(1, () { indent.writeln( 'return ${customClass.name}.fromList((ArrayList) readValue(buffer));'); }); } - indent.write('default:'); - indent.addScoped('', '', () { + indent.writeln('default:'); + indent.nest(1, () { indent.writeln('return super.readValueOfType(type, buffer);'); - }, addTrailingNewline: false); + }); }); }); indent.newln(); diff --git a/packages/pigeon/lib/objc_generator.dart b/packages/pigeon/lib/objc_generator.dart index 17b3d9c4ce..97bdd28786 100644 --- a/packages/pigeon/lib/objc_generator.dart +++ b/packages/pigeon/lib/objc_generator.dart @@ -722,8 +722,8 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { indent.write('switch (type) '); indent.addScoped('{', '}', () { for (final EnumeratedClass customClass in codecClasses) { - indent.write('case ${customClass.enumeration}: '); - indent.writeScoped('', '', () { + indent.writeln('case ${customClass.enumeration}: '); + indent.nest(1, () { indent.writeln( 'return [${_className(options.prefix, customClass.name)} fromList:[self readValue]];'); }); diff --git a/packages/pigeon/mock_handler_tester/test/message.dart b/packages/pigeon/mock_handler_tester/test/message.dart index b1179e6fd2..7350cbb3ca 100644 --- a/packages/pigeon/mock_handler_tester/test/message.dart +++ b/packages/pigeon/mock_handler_tester/test/message.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -146,10 +146,8 @@ class _MessageApiCodec extends StandardMessageCodec { switch (type) { case 128: return MessageSearchReply.decode(readValue(buffer)!); - case 129: return MessageSearchRequest.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } @@ -245,13 +243,10 @@ class _MessageNestedApiCodec extends StandardMessageCodec { switch (type) { case 128: return MessageNested.decode(readValue(buffer)!); - case 129: return MessageSearchReply.decode(readValue(buffer)!); - case 130: return MessageSearchRequest.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } @@ -320,10 +315,8 @@ class _MessageFlutterSearchApiCodec extends StandardMessageCodec { switch (type) { case 128: return MessageSearchReply.decode(readValue(buffer)!); - case 129: return MessageSearchRequest.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } diff --git a/packages/pigeon/mock_handler_tester/test/test.dart b/packages/pigeon/mock_handler_tester/test/test.dart index 10ad4a25f8..6670931177 100644 --- a/packages/pigeon/mock_handler_tester/test/test.dart +++ b/packages/pigeon/mock_handler_tester/test/test.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import // ignore_for_file: avoid_relative_lib_imports @@ -34,10 +34,8 @@ class _TestHostApiCodec extends StandardMessageCodec { switch (type) { case 128: return MessageSearchReply.decode(readValue(buffer)!); - case 129: return MessageSearchRequest.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } @@ -119,13 +117,10 @@ class _TestNestedApiCodec extends StandardMessageCodec { switch (type) { case 128: return MessageNested.decode(readValue(buffer)!); - case 129: return MessageSearchReply.decode(readValue(buffer)!); - case 130: return MessageSearchRequest.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java index 01eb7c08f6..ff2e17859d 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon package com.example.alternate_language_test_plugin; @@ -724,13 +724,10 @@ public class CoreTests { switch (type) { case (byte) 128: return AllNullableTypes.fromList((ArrayList) readValue(buffer)); - case (byte) 129: return AllNullableTypesWrapper.fromList((ArrayList) readValue(buffer)); - case (byte) 130: return AllTypes.fromList((ArrayList) readValue(buffer)); - default: return super.readValueOfType(type, buffer); } @@ -2139,13 +2136,10 @@ public class CoreTests { switch (type) { case (byte) 128: return AllNullableTypes.fromList((ArrayList) readValue(buffer)); - case (byte) 129: return AllNullableTypesWrapper.fromList((ArrayList) readValue(buffer)); - case (byte) 130: return AllTypes.fromList((ArrayList) readValue(buffer)); - default: return super.readValueOfType(type, buffer); } diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h index a6e6ad4be5..87832ea0d4 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon #import diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m index 8641cf65d4..7bd69e0fd4 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "CoreTests.gen.h" @@ -221,13 +221,10 @@ static id GetNullableObjectAtIndex(NSArray *array, NSInteger key) { switch (type) { case 128: return [AllNullableTypes fromList:[self readValue]]; - case 129: return [AllNullableTypesWrapper fromList:[self readValue]]; - case 130: return [AllTypes fromList:[self readValue]]; - default: return [super readValueOfType:type]; } @@ -1136,13 +1133,10 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, switch (type) { case 128: return [AllNullableTypes fromList:[self readValue]]; - case 129: return [AllNullableTypesWrapper fromList:[self readValue]]; - case 130: return [AllTypes fromList:[self readValue]]; - default: return [super readValueOfType:type]; } diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart index 74db9f6fb1..d3638f4185 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -222,13 +222,10 @@ class _HostIntegrationCoreApiCodec extends StandardMessageCodec { switch (type) { case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: return AllTypes.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } @@ -1253,13 +1250,10 @@ class _FlutterIntegrationCoreApiCodec extends StandardMessageCodec { switch (type) { case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: return AllTypes.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart index ef9aac46a6..1ba2ba65cc 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -127,16 +127,12 @@ class _ApiCodec extends StandardMessageCodec { switch (type) { case 128: return FlutterSearchReplies.decode(readValue(buffer)!); - case 129: return FlutterSearchReply.decode(readValue(buffer)!); - case 130: return FlutterSearchRequest.decode(readValue(buffer)!); - case 131: return FlutterSearchRequests.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart index 802b7d963f..b2c5fa3ee9 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart index ccaabdad83..85433f0bc1 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -128,13 +128,10 @@ class _NonNullFieldHostApiCodec extends StandardMessageCodec { switch (type) { case 128: return ExtraData.decode(readValue(buffer)!); - case 129: return NonNullFieldSearchReply.decode(readValue(buffer)!); - case 130: return NonNullFieldSearchRequest.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } @@ -203,13 +200,10 @@ class _NonNullFieldFlutterApiCodec extends StandardMessageCodec { switch (type) { case 128: return ExtraData.decode(readValue(buffer)!); - case 129: return NonNullFieldSearchReply.decode(readValue(buffer)!); - case 130: return NonNullFieldSearchRequest.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart index 6a641425e5..8d62f3199d 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -108,10 +108,8 @@ class _NullFieldsHostApiCodec extends StandardMessageCodec { switch (type) { case 128: return NullFieldsSearchReply.decode(readValue(buffer)!); - case 129: return NullFieldsSearchRequest.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } @@ -177,10 +175,8 @@ class _NullFieldsFlutterApiCodec extends StandardMessageCodec { switch (type) { case 128: return NullFieldsSearchReply.decode(readValue(buffer)!); - case 129: return NullFieldsSearchRequest.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart index f66d1b4c25..1c6e264823 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart index ee45769b75..9e50dfd802 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart index 74db9f6fb1..d3638f4185 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -222,13 +222,10 @@ class _HostIntegrationCoreApiCodec extends StandardMessageCodec { switch (type) { case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: return AllTypes.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } @@ -1253,13 +1250,10 @@ class _FlutterIntegrationCoreApiCodec extends StandardMessageCodec { switch (type) { case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: return AllTypes.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); } diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt index 4c7613f894..b555d7b1bd 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt +++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon package com.example.test_plugin diff --git a/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift index e1e212adf8..870535cb80 100644 --- a/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift +++ b/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift index e1e212adf8..870535cb80 100644 --- a/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift +++ b/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp index 2f818a48d4..b543a0c3c2 100644 --- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp +++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon #undef _HAS_EXCEPTIONS @@ -488,15 +488,12 @@ flutter::EncodableValue HostIntegrationCoreApiCodecSerializer::ReadValueOfType( case 128: return flutter::CustomEncodableValue(AllNullableTypes( std::get(ReadValue(stream)))); - case 129: return flutter::CustomEncodableValue(AllNullableTypesWrapper( std::get(ReadValue(stream)))); - case 130: return flutter::CustomEncodableValue( AllTypes(std::get(ReadValue(stream)))); - default: return flutter::StandardCodecSerializer::ReadValueOfType(type, stream); } @@ -1960,15 +1957,12 @@ FlutterIntegrationCoreApiCodecSerializer::ReadValueOfType( case 128: return flutter::CustomEncodableValue(AllNullableTypes( std::get(ReadValue(stream)))); - case 129: return flutter::CustomEncodableValue(AllNullableTypesWrapper( std::get(ReadValue(stream)))); - case 130: return flutter::CustomEncodableValue( AllTypes(std::get(ReadValue(stream)))); - default: return flutter::StandardCodecSerializer::ReadValueOfType(type, stream); } diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h index 54633ca60b..3815239b6b 100644 --- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v7.0.2), do not edit directly. +// Autogenerated from Pigeon (v7.0.3), do not edit directly. // See also: https://pub.dev/packages/pigeon #ifndef PIGEON_CORE_TESTS_GEN_H_ diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml index e63378085b..9b17974253 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -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%3Apigeon -version: 7.0.2 # This must match the version in lib/generator_tools.dart +version: 7.0.3 # This must match the version in lib/generator_tools.dart environment: sdk: ">=2.12.0 <3.0.0"