Skip to content

Commit f324abb

Browse files
[pigeon] Fix C++ config handling (#3094)
* Fix config names * Version bump
1 parent da74943 commit f324abb

File tree

13 files changed

+51
-48
lines changed

13 files changed

+51
-48
lines changed

packages/pigeon/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 7.1.1
2+
3+
* [c++] Fixes handling of the `cpp*` options in `@ConfigurePigeon` annotations.
4+
15
## 7.1.0
26

37
* Adds `@SwiftFunction` annotation for specifying custom swift function signature.

packages/pigeon/lib/generator_tools.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'ast.dart';
1111
/// The current version of pigeon.
1212
///
1313
/// This must match the version in pubspec.yaml.
14-
const String pigeonVersion = '7.1.0';
14+
const String pigeonVersion = '7.1.1';
1515

1616
/// Read all the content from [stdin] to a String.
1717
String readStdin() {

packages/pigeon/lib/pigeon_lib.dart

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,10 @@ class PigeonOptions {
274274
kotlinOptions: map.containsKey('kotlinOptions')
275275
? KotlinOptions.fromMap(map['kotlinOptions']! as Map<String, Object>)
276276
: null,
277-
cppHeaderOut: map['experimental_cppHeaderOut'] as String?,
278-
cppSourceOut: map['experimental_cppSourceOut'] as String?,
279-
cppOptions: map.containsKey('experimental_cppOptions')
280-
? CppOptions.fromMap(
281-
map['experimental_cppOptions']! as Map<String, Object>)
277+
cppHeaderOut: map['cppHeaderOut'] as String?,
278+
cppSourceOut: map['cppSourceOut'] as String?,
279+
cppOptions: map.containsKey('cppOptions')
280+
? CppOptions.fromMap(map['cppOptions']! as Map<String, Object>)
282281
: null,
283282
dartOptions: map.containsKey('dartOptions')
284283
? DartOptions.fromMap(map['dartOptions']! as Map<String, Object>)
@@ -306,9 +305,9 @@ class PigeonOptions {
306305
if (swiftOptions != null) 'swiftOptions': swiftOptions!.toMap(),
307306
if (kotlinOut != null) 'kotlinOut': kotlinOut!,
308307
if (kotlinOptions != null) 'kotlinOptions': kotlinOptions!.toMap(),
309-
if (cppHeaderOut != null) 'experimental_cppHeaderOut': cppHeaderOut!,
310-
if (cppSourceOut != null) 'experimental_cppSourceOut': cppSourceOut!,
311-
if (cppOptions != null) 'experimental_cppOptions': cppOptions!.toMap(),
308+
if (cppHeaderOut != null) 'cppHeaderOut': cppHeaderOut!,
309+
if (cppSourceOut != null) 'cppSourceOut': cppSourceOut!,
310+
if (cppOptions != null) 'cppOptions': cppOptions!.toMap(),
312311
if (dartOptions != null) 'dartOptions': dartOptions!.toMap(),
313312
if (copyrightHeader != null) 'copyrightHeader': copyrightHeader!,
314313
if (astOut != null) 'astOut': astOut!,

packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44
//
5-
// Autogenerated from Pigeon (v7.1.0), do not edit directly.
5+
// Autogenerated from Pigeon (v7.1.1), do not edit directly.
66
// See also: https://pub.dev/packages/pigeon
77

88
package com.example.alternate_language_test_plugin;

packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44
//
5-
// Autogenerated from Pigeon (v7.1.0), do not edit directly.
5+
// Autogenerated from Pigeon (v7.1.1), do not edit directly.
66
// See also: https://pub.dev/packages/pigeon
77

88
#import <Foundation/Foundation.h>

packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44
//
5-
// Autogenerated from Pigeon (v7.1.0), do not edit directly.
5+
// Autogenerated from Pigeon (v7.1.1), do not edit directly.
66
// See also: https://pub.dev/packages/pigeon
77

88
#import "CoreTests.gen.h"

packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/core_tests.gen.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44
//
5-
// Autogenerated from Pigeon (v7.1.0), do not edit directly.
5+
// Autogenerated from Pigeon (v7.1.1), do not edit directly.
66
// See also: https://pub.dev/packages/pigeon
77
// 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
88

packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
//
5-
// Autogenerated from Pigeon (v7.1.0), do not edit directly.
4+
//
5+
// Autogenerated from Pigeon (v7.1.1), do not edit directly.
66
// See also: https://pub.dev/packages/pigeon
77

88
package com.example.test_plugin

packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
//
5-
// Autogenerated from Pigeon (v7.1.0), do not edit directly.
4+
//
5+
// Autogenerated from Pigeon (v7.1.1), do not edit directly.
66
// See also: https://pub.dev/packages/pigeon
77

88
import Foundation
@@ -110,23 +110,23 @@ struct AllNullableTypes {
110110
var aNullableString: String? = nil
111111

112112
static func fromList(_ list: [Any?]) -> AllNullableTypes? {
113-
let aNullableBool = list[0] as? Bool
114-
let aNullableInt = list[1] as? Int32
115-
let aNullableDouble = list[2] as? Double
116-
let aNullableByteArray = list[3] as? FlutterStandardTypedData
117-
let aNullable4ByteArray = list[4] as? FlutterStandardTypedData
118-
let aNullable8ByteArray = list[5] as? FlutterStandardTypedData
119-
let aNullableFloatArray = list[6] as? FlutterStandardTypedData
120-
let aNullableList = list[7] as? [Any?]
121-
let aNullableMap = list[8] as? [AnyHashable: Any?]
122-
let nullableNestedList = list[9] as? [[Bool?]?]
123-
let nullableMapWithAnnotations = list[10] as? [String?: String?]
124-
let nullableMapWithObject = list[11] as? [String?: Any?]
113+
let aNullableBool = list[0] as? Bool
114+
let aNullableInt = list[1] as? Int32
115+
let aNullableDouble = list[2] as? Double
116+
let aNullableByteArray = list[3] as? FlutterStandardTypedData
117+
let aNullable4ByteArray = list[4] as? FlutterStandardTypedData
118+
let aNullable8ByteArray = list[5] as? FlutterStandardTypedData
119+
let aNullableFloatArray = list[6] as? FlutterStandardTypedData
120+
let aNullableList = list[7] as? [Any?]
121+
let aNullableMap = list[8] as? [AnyHashable: Any?]
122+
let nullableNestedList = list[9] as? [[Bool?]?]
123+
let nullableMapWithAnnotations = list[10] as? [String?: String?]
124+
let nullableMapWithObject = list[11] as? [String?: Any?]
125125
var aNullableEnum: AnEnum? = nil
126126
if let aNullableEnumRawValue = list[12] as? Int {
127127
aNullableEnum = AnEnum(rawValue: aNullableEnumRawValue)
128128
}
129-
let aNullableString = list[13] as? String
129+
let aNullableString = list[13] as? String
130130

131131
return AllNullableTypes(
132132
aNullableBool: aNullableBool,

packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Copyright 2013 The Flutter Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
//
5-
// Autogenerated from Pigeon (v7.1.0), do not edit directly.
4+
//
5+
// Autogenerated from Pigeon (v7.1.1), do not edit directly.
66
// See also: https://pub.dev/packages/pigeon
77

88
import Foundation
@@ -110,23 +110,23 @@ struct AllNullableTypes {
110110
var aNullableString: String? = nil
111111

112112
static func fromList(_ list: [Any?]) -> AllNullableTypes? {
113-
let aNullableBool = list[0] as? Bool
114-
let aNullableInt = list[1] as? Int32
115-
let aNullableDouble = list[2] as? Double
116-
let aNullableByteArray = list[3] as? FlutterStandardTypedData
117-
let aNullable4ByteArray = list[4] as? FlutterStandardTypedData
118-
let aNullable8ByteArray = list[5] as? FlutterStandardTypedData
119-
let aNullableFloatArray = list[6] as? FlutterStandardTypedData
120-
let aNullableList = list[7] as? [Any?]
121-
let aNullableMap = list[8] as? [AnyHashable: Any?]
122-
let nullableNestedList = list[9] as? [[Bool?]?]
123-
let nullableMapWithAnnotations = list[10] as? [String?: String?]
124-
let nullableMapWithObject = list[11] as? [String?: Any?]
113+
let aNullableBool = list[0] as? Bool
114+
let aNullableInt = list[1] as? Int32
115+
let aNullableDouble = list[2] as? Double
116+
let aNullableByteArray = list[3] as? FlutterStandardTypedData
117+
let aNullable4ByteArray = list[4] as? FlutterStandardTypedData
118+
let aNullable8ByteArray = list[5] as? FlutterStandardTypedData
119+
let aNullableFloatArray = list[6] as? FlutterStandardTypedData
120+
let aNullableList = list[7] as? [Any?]
121+
let aNullableMap = list[8] as? [AnyHashable: Any?]
122+
let nullableNestedList = list[9] as? [[Bool?]?]
123+
let nullableMapWithAnnotations = list[10] as? [String?: String?]
124+
let nullableMapWithObject = list[11] as? [String?: Any?]
125125
var aNullableEnum: AnEnum? = nil
126126
if let aNullableEnumRawValue = list[12] as? Int {
127127
aNullableEnum = AnEnum(rawValue: aNullableEnumRawValue)
128128
}
129-
let aNullableString = list[13] as? String
129+
let aNullableString = list[13] as? String
130130

131131
return AllNullableTypes(
132132
aNullableBool: aNullableBool,

packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44
//
5-
// Autogenerated from Pigeon (v7.1.0), do not edit directly.
5+
// Autogenerated from Pigeon (v7.1.1), do not edit directly.
66
// See also: https://pub.dev/packages/pigeon
77

88
#undef _HAS_EXCEPTIONS

packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44
//
5-
// Autogenerated from Pigeon (v7.1.0), do not edit directly.
5+
// Autogenerated from Pigeon (v7.1.1), do not edit directly.
66
// See also: https://pub.dev/packages/pigeon
77

88
#ifndef PIGEON_CORE_TESTS_GEN_H_

packages/pigeon/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: pigeon
22
description: Code generator tool to make communication between Flutter and the host platform type-safe and easier.
33
repository: https://github.com/flutter/packages/tree/main/packages/pigeon
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Apigeon
5-
version: 7.1.0 # This must match the version in lib/generator_tools.dart
5+
version: 7.1.1 # This must match the version in lib/generator_tools.dart
66

77
environment:
88
sdk: ">=2.12.0 <3.0.0"

0 commit comments

Comments
 (0)