Skip to content

Commit 2dc597c

Browse files
authored
[pigeon] bumps analyzer support to between 10 and 12 (#11358)
Don't land this until [previous bump ](#11346 fixes flutter/flutter#184119 fixes flutter/flutter#182064 fixes flutter/flutter#184269
1 parent e8df95d commit 2dc597c

6 files changed

Lines changed: 23 additions & 15 deletions

File tree

packages/go_router_builder/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.2.1
2+
3+
* Adds support for analyzer 11 and 12.
4+
15
## 4.2.0
26

37
- Adds supports for `TypedQueryParameter` annotation.

packages/go_router_builder/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: go_router_builder
22
description: >-
33
A builder that supports generated strongly-typed route helpers for
44
package:go_router
5-
version: 4.2.0
5+
version: 4.2.1
66
repository: https://github.com/flutter/packages/tree/main/packages/go_router_builder
77
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+go_router_builder%22
88

@@ -11,7 +11,7 @@ environment:
1111
flutter: ">=3.35.0"
1212

1313
dependencies:
14-
analyzer: ">=8.2.0 <10.0.0"
14+
analyzer: ">=8.2.0 <13.0.0"
1515
async: ^2.8.0
1616
# TODO(piinks): Pin version once new stable rolls.
1717
build: ">=3.0.0 <5.0.0"

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.3
2+
3+
* Updates `analyzer` dependency to support versions 10 through 12.
4+
15
## 26.3.2
26

37
* Updates `analyzer` dependency to support version 10.

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.2';
18+
const String pigeonVersion = '26.3.3';
1919

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

packages/pigeon/lib/src/pigeon_lib_internal.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
15791579
_errors.add(
15801580
Error(
15811581
message:
1582-
'API "${node.name.lexeme}" can only have one API annotation but contains: ${node.metadata}',
1582+
'API "${node.namePart.typeName.lexeme}" can only have one API annotation but contains: ${node.metadata}',
15831583
lineNumber: calculateLineNumber(source, node.offset),
15841584
),
15851585
);
@@ -1606,7 +1606,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
16061606
}
16071607

16081608
_currentApi = AstHostApi(
1609-
name: node.name.lexeme,
1609+
name: node.namePart.typeName.lexeme,
16101610
methods: <Method>[],
16111611
dartHostTestHandler: dartHostTestHandler,
16121612
documentationComments: _documentationCommentsParser(
@@ -1615,7 +1615,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
16151615
);
16161616
} else if (_hasMetadata(node.metadata, 'FlutterApi')) {
16171617
_currentApi = AstFlutterApi(
1618-
name: node.name.lexeme,
1618+
name: node.namePart.typeName.lexeme,
16191619
methods: <Method>[],
16201620
documentationComments: _documentationCommentsParser(
16211621
node.documentationComment?.tokens,
@@ -1642,7 +1642,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
16421642
_errors.add(
16431643
Error(
16441644
message:
1645-
'ProxyApis should either set the super class in the annotation OR use extends: ("${node.name.lexeme}").',
1645+
'ProxyApis should either set the super class in the annotation OR use extends: ("${node.namePart.typeName.lexeme}").',
16461646
lineNumber: calculateLineNumber(source, node.offset),
16471647
),
16481648
);
@@ -1713,7 +1713,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
17131713
}
17141714

17151715
_currentApi = AstProxyApi(
1716-
name: node.name.lexeme,
1716+
name: node.namePart.typeName.lexeme,
17171717
methods: <Method>[],
17181718
constructors: <Constructor>[],
17191719
fields: <ApiField>[],
@@ -1760,7 +1760,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
17601760
);
17611761
}
17621762
_currentApi = AstEventChannelApi(
1763-
name: node.name.lexeme,
1763+
name: node.namePart.typeName.lexeme,
17641764
methods: <Method>[],
17651765
swiftOptions: swiftOptions,
17661766
kotlinOptions: kotlinOptions,
@@ -1771,7 +1771,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
17711771
}
17721772
} else {
17731773
_currentClass = Class(
1774-
name: node.name.lexeme,
1774+
name: node.namePart.typeName.lexeme,
17751775
fields: <NamedType>[],
17761776
superClassName:
17771777
node.implementsClause?.interfaces.first.name.toString() ??
@@ -1929,7 +1929,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
19291929
}
19301930
if (enclosingDeclaration is dart_ast.ClassDeclaration) {
19311931
erroneousDeclaration =
1932-
'${enclosingDeclaration.name.lexeme}.$erroneousDeclaration';
1932+
'${enclosingDeclaration.namePart.typeName}.$erroneousDeclaration';
19331933
}
19341934
_errors.add(
19351935
Error(
@@ -1986,8 +1986,8 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
19861986
Object? visitEnumDeclaration(dart_ast.EnumDeclaration node) {
19871987
_enums.add(
19881988
Enum(
1989-
name: node.name.lexeme,
1990-
members: node.constants
1989+
name: node.namePart.typeName.lexeme,
1990+
members: node.body.constants
19911991
.map(
19921992
(dart_ast.EnumConstantDeclaration e) => EnumMember(
19931993
name: e.name.lexeme,

packages/pigeon/pubspec.yaml

Lines changed: 2 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.2 # This must match the version in lib/src/generator_tools.dart
5+
version: 26.3.3 # 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 <11.0.0"
11+
analyzer: ">=10.0.0 <13.0.0"
1212
args: ^2.5.0
1313
code_builder: ^4.10.0
1414
collection: ^1.15.0

0 commit comments

Comments
 (0)