Skip to content

Commit e627503

Browse files
authored
[pigeon] Adds support for analyzer 10 (#11346)
minimal required changes fixes flutter/flutter#183568
1 parent d8737b4 commit e627503

4 files changed

Lines changed: 14 additions & 5 deletions

File tree

packages/pigeon/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 26.3.2
2+
3+
* Updates `analyzer` dependency to support version 10.
4+
15
## 26.3.1
26

37
* Fixes dartdoc comments that accidentally used HTML.

packages/pigeon/lib/src/generator_tools.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import 'generator.dart';
1515
/// The current version of pigeon.
1616
///
1717
/// This must match the version in pubspec.yaml.
18-
const String pigeonVersion = '26.3.1';
18+
const String pigeonVersion = '26.3.2';
1919

2020
/// Default plugin package name.
2121
const String defaultPluginPackageName = 'dev.flutter.pigeon';

packages/pigeon/lib/src/pigeon_lib_internal.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,10 +1922,14 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
19221922
// resolved return type, via
19231923
// `node.declaredFragment!.element.returnType`.
19241924
String erroneousDeclaration = node.name.lexeme;
1925-
final dart_ast.AstNode? enclosingDeclaration = node.parent;
1925+
dart_ast.AstNode? enclosingDeclaration = node.parent;
1926+
while (enclosingDeclaration != null &&
1927+
enclosingDeclaration is! dart_ast.ClassDeclaration) {
1928+
enclosingDeclaration = enclosingDeclaration.parent;
1929+
}
19261930
if (enclosingDeclaration is dart_ast.ClassDeclaration) {
19271931
erroneousDeclaration =
1928-
'${enclosingDeclaration.name}.$erroneousDeclaration';
1932+
'${enclosingDeclaration.name.lexeme}.$erroneousDeclaration';
19291933
}
19301934
_errors.add(
19311935
Error(

packages/pigeon/pubspec.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ 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%3A%22p%3A+pigeon%22
5-
version: 26.3.1 # This must match the version in lib/src/generator_tools.dart
5+
version: 26.3.2 # This must match the version in lib/src/generator_tools.dart
66

77
environment:
88
sdk: ^3.9.0
99

1010
dependencies:
11-
analyzer: ">=8.0.0 <10.0.0"
11+
analyzer: ">=8.0.0 <11.0.0"
1212
args: ^2.5.0
1313
code_builder: ^4.10.0
1414
collection: ^1.15.0
@@ -27,3 +27,4 @@ topics:
2727
- interop
2828
- platform-channels
2929
- plugin-development
30+

0 commit comments

Comments
 (0)