Skip to content

Commit 0167d83

Browse files
[pigeon] Ignore deprecated name (flutter#3953)
Ignores a field deprecated in the latest `analyzer` update, causing out-of-band analyzer failures. This is ignored for now rather than replaced to avoid dropping currently-supported Flutter versions in Pigeon right now. Fixes flutter/flutter#126393
1 parent dfcb21c commit 0167d83

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/pigeon/lib/pigeon_lib.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,9 @@ class _RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
10041004
final dart_ast.NamedType? namedType =
10051005
getFirstChildOfType<dart_ast.NamedType>(parameter);
10061006
if (namedType != null) {
1007+
// TODO(stuartmorgan): Replace `name` when adopting the next version of
1008+
// analyzer.
1009+
// ignore: deprecated_member_use
10071010
final String argTypeBaseName = namedType.name.name;
10081011
final bool isNullable = namedType.question != null;
10091012
final List<TypeDeclaration> argTypeArguments =
@@ -1086,6 +1089,9 @@ class _RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
10861089
Method(
10871090
name: node.name.lexeme,
10881091
returnType: TypeDeclaration(
1092+
// TODO(stuartmorgan): Replace `name` when adopting the next
1093+
// version of analyzer.
1094+
// ignore: deprecated_member_use
10891095
baseName: returnType.name.name,
10901096
typeArguments:
10911097
typeAnnotationsToTypeArguments(returnType.typeArguments),
@@ -1135,6 +1141,9 @@ class _RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
11351141
for (final Object x in typeArguments.childEntities) {
11361142
if (x is dart_ast.NamedType) {
11371143
result.add(TypeDeclaration(
1144+
// TODO(stuartmorgan): Replace `name` when adopting the next
1145+
// version of analyzer.
1146+
// ignore: deprecated_member_use
11381147
baseName: x.name.name,
11391148
isNullable: x.question != null,
11401149
typeArguments: typeAnnotationsToTypeArguments(x.typeArguments)));
@@ -1165,6 +1174,9 @@ class _RootBuilder extends dart_ast_visitor.RecursiveAstVisitor<Object?> {
11651174
final dart_ast.TypeArgumentList? typeArguments = type.typeArguments;
11661175
_currentClass!.fields.add(NamedType(
11671176
type: TypeDeclaration(
1177+
// TODO(stuartmorgan): Replace `name` when adopting the next
1178+
// version of analyzer.
1179+
// ignore: deprecated_member_use
11681180
baseName: type.name.name,
11691181
isNullable: type.question != null,
11701182
typeArguments: typeAnnotationsToTypeArguments(typeArguments),

0 commit comments

Comments
 (0)