Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal error (Dart Fix) #59997

Open
JCKodel opened this issue Jan 27, 2025 · 1 comment
Open

Internal error (Dart Fix) #59997

JCKodel opened this issue Jan 27, 2025 · 1 comment
Labels
analyzer-constants analyzer-dartfix Issues with the dartfix package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@JCKodel
Copy link

JCKodel commented Jan 27, 2025

Generated some files using package dart_animated_emoji.

It gives me 1K+ warnings about missing consts, > 80 line length, etc.

When running dart fix --dry-run:

An unexpected error was encountered by the Analysis Server.
Please file an issue at https://github.com/dart-lang/sdk/issues/new/choose with the following details:

Internal error: Exception while using a AvoidRedundantArgumentValues to visit a FunctionExpressionInvocationImpl in NamedExpressionImpl in ArgumentListImpl in InstanceCreationExpressionImpl in NamedExpressionImpl in ArgumentListImpl in InstanceCreationExpressionImpl in NamedExpressionImpl in ArgumentListImpl in InstanceCreationExpressionImpl in NamedExpressionImpl in ArgumentListImpl in InstanceCreationExpressionImpl in NamedExpressionImpl in ArgumentListImpl in InstanceCreationExpressionImpl in ListLiteralImpl in NamedExpressionImpl in ArgumentListImpl in InstanceCreationExpressionImpl in NamedExpressionImpl in ArgumentListImpl in InstanceCreationExpressionImpl in ReturnStatementImpl in BlockImpl in BlockFunctionBodyImpl in FunctionExpressionImpl in NamedExpressionImpl in ArgumentListImpl in InstanceCreationExpressionImpl in ReturnStatementImpl in BlockImpl in BlockFunctionBodyImpl in MethodDeclarationImpl in ClassDeclarationImpl in CompilationUnitImpl
Bad state: [library: null][this: (DefaultParameterElementImpl) {double? fontSize}][enclosingElement: null][reference: null]
#0      ConstVariableElement.computeConstantValue (package:analyzer/src/dart/element/element.dart:1667:9)
#1      _Visitor.checkArgument (package:linter/src/rules/avoid_redundant_argument_values.dart:71:23)
#2      _Visitor.check (package:linter/src/rules/avoid_redundant_argument_values.dart:54:7)
#3      _Visitor.visitFunctionExpressionInvocation (package:linter/src/rules/avoid_redundant_argument_values.dart:92:5)
#4      FunctionExpressionInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:8705:15)
#5      LinterVisitor._runSubscriptions (package:analyzer/src/lint/linter_visitor.dart:1090:14)
#6      LinterVisitor.visitFunctionExpressionInvocation (package:analyzer/src/lint/linter_visitor.dart:440:5)
#7      FunctionExpressionInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:8705:15)
#8      NamedExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12593:17)
#9      LinterVisitor.visitNamedExpression (package:analyzer/src/lint/linter_visitor.dart:651:10)
#10     NamedExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:12583:50)
#11     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#12     ArgumentListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:476:16)
#13     LinterVisitor.visitArgumentList (package:analyzer/src/lint/linter_visitor.dart:45:10)
#14     ArgumentListImpl.accept (package:analyzer/src/dart/ast/ast.dart:472:50)
#15     InstanceCreationExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10518:19)
#16     LinterVisitor.visitInstanceCreationExpression (package:analyzer/src/lint/linter_visitor.dart:531:10)
#17     InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:10507:15)
#18     NamedExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12593:17)
#19     LinterVisitor.visitNamedExpression (package:analyzer/src/lint/linter_visitor.dart:651:10)
#20     NamedExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:12583:50)
#21     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#22     ArgumentListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:476:16)
#23     LinterVisitor.visitArgumentList (package:analyzer/src/lint/linter_visitor.dart:45:10)
#24     ArgumentListImpl.accept (package:analyzer/src/dart/ast/ast.dart:472:50)
#25     InstanceCreationExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10518:19)
#26     LinterVisitor.visitInstanceCreationExpression (package:analyzer/src/lint/linter_visitor.dart:531:10)
#27     InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:10507:15)
#28     NamedExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12593:17)
#29     LinterVisitor.visitNamedExpression (package:analyzer/src/lint/linter_visitor.dart:651:10)
#30     NamedExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:12583:50)
#31     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#32     ArgumentListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:476:16)
#33     LinterVisitor.visitArgumentList (package:analyzer/src/lint/linter_visitor.dart:45:10)
#34     ArgumentListImpl.accept (package:analyzer/src/dart/ast/ast.dart:472:50)
#35     InstanceCreationExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10518:19)
#36     LinterVisitor.visitInstanceCreationExpression (package:analyzer/src/lint/linter_visitor.dart:531:10)
#37     InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:10507:15)
#38     NamedExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12593:17)
#39     LinterVisitor.visitNamedExpression (package:analyzer/src/lint/linter_visitor.dart:651:10)
#40     NamedExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:12583:50)
#41     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#42     ArgumentListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:476:16)
#43     LinterVisitor.visitArgumentList (package:analyzer/src/lint/linter_visitor.dart:45:10)
#44     ArgumentListImpl.accept (package:analyzer/src/dart/ast/ast.dart:472:50)
#45     InstanceCreationExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10518:19)
#46     LinterVisitor.visitInstanceCreationExpression (package:analyzer/src/lint/linter_visitor.dart:531:10)
#47     InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:10507:15)
#48     NamedExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12593:17)
#49     LinterVisitor.visitNamedExpression (package:analyzer/src/lint/linter_visitor.dart:651:10)
#50     NamedExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:12583:50)
#51     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#52     ArgumentListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:476:16)
#53     LinterVisitor.visitArgumentList (package:analyzer/src/lint/linter_visitor.dart:45:10)
#54     ArgumentListImpl.accept (package:analyzer/src/dart/ast/ast.dart:472:50)
#55     InstanceCreationExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10518:19)
#56     LinterVisitor.visitInstanceCreationExpression (package:analyzer/src/lint/linter_visitor.dart:531:10)
#57     InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:10507:15)
#58     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#59     ListLiteralImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:11313:15)
#60     LinterVisitor.visitListLiteral (package:analyzer/src/lint/linter_visitor.dart:585:10)
#61     ListLiteralImpl.accept (package:analyzer/src/dart/ast/ast.dart:11303:50)
#62     NamedExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12593:17)
#63     LinterVisitor.visitNamedExpression (package:analyzer/src/lint/linter_visitor.dart:651:10)
#64     NamedExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:12583:50)
#65     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#66     ArgumentListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:476:16)
#67     LinterVisitor.visitArgumentList (package:analyzer/src/lint/linter_visitor.dart:45:10)
#68     ArgumentListImpl.accept (package:analyzer/src/dart/ast/ast.dart:472:50)
#69     InstanceCreationExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10518:19)
#70     LinterVisitor.visitInstanceCreationExpression (package:analyzer/src/lint/linter_visitor.dart:531:10)
#71     InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:10507:15)
#72     NamedExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12593:17)
#73     LinterVisitor.visitNamedExpression (package:analyzer/src/lint/linter_visitor.dart:651:10)
#74     NamedExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:12583:50)
#75     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#76     ArgumentListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:476:16)
#77     LinterVisitor.visitArgumentList (package:analyzer/src/lint/linter_visitor.dart:45:10)
#78     ArgumentListImpl.accept (package:analyzer/src/dart/ast/ast.dart:472:50)
#79     InstanceCreationExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10518:19)
#80     LinterVisitor.visitInstanceCreationExpression (package:analyzer/src/lint/linter_visitor.dart:531:10)
#81     InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:10507:15)
#82     ReturnStatementImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:15635:18)
#83     LinterVisitor.visitReturnStatement (package:analyzer/src/lint/linter_visitor.dart:867:10)
#84     ReturnStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:15631:50)
#85     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#86     BlockImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2051:17)
#87     LinterVisitor.visitBlock (package:analyzer/src/lint/linter_visitor.dart:105:10)
#88     BlockImpl.accept (package:analyzer/src/dart/ast/ast.dart:2047:50)
#89     BlockFunctionBodyImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2007:12)
#90     LinterVisitor.visitBlockFunctionBody (package:analyzer/src/lint/linter_visitor.dart:111:10)
#91     BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1999:50)
#92     FunctionExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:8624:11)
#93     LinterVisitor.visitFunctionExpression (package:analyzer/src/lint/linter_visitor.dart:435:10)
#94     FunctionExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:8613:50)
#95     NamedExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12593:17)
#96     LinterVisitor.visitNamedExpression (package:analyzer/src/lint/linter_visitor.dart:651:10)
#97     NamedExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:12583:50)
#98     NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#99     ArgumentListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:476:16)
#100    LinterVisitor.visitArgumentList (package:analyzer/src/lint/linter_visitor.dart:45:10)
#101    ArgumentListImpl.accept (package:analyzer/src/dart/ast/ast.dart:472:50)
#102    InstanceCreationExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:10518:19)
#103    LinterVisitor.visitInstanceCreationExpression (package:analyzer/src/lint/linter_visitor.dart:531:10)
#104    InstanceCreationExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:10507:15)
#105    ReturnStatementImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:15635:18)
#106    LinterVisitor.visitReturnStatement (package:analyzer/src/lint/linter_visitor.dart:867:10)
#107    ReturnStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:15631:50)
#108    NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#109    BlockImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2051:17)
#110    LinterVisitor.visitBlock (package:analyzer/src/lint/linter_visitor.dart:105:10)
#111    BlockImpl.accept (package:analyzer/src/dart/ast/ast.dart:2047:50)
#112    BlockFunctionBodyImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2007:12)
#113    LinterVisitor.visitBlockFunctionBody (package:analyzer/src/lint/linter_visitor.dart:111:10)
#114    BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1999:50)
#115    MethodDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:12069:10)
#116    LinterVisitor.visitMethodDeclaration (package:analyzer/src/lint/linter_visitor.dart:627:10)
#117    MethodDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:12061:50)
#118    NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#119    ClassDeclarationImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:2939:13)
#120    LinterVisitor.visitClassDeclaration (package:analyzer/src/lint/linter_visitor.dart:159:10)
#121    ClassDeclarationImpl.accept (package:analyzer/src/dart/ast/ast.dart:2929:50)
#122    NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:13009:20)
#123    CompilationUnitImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:3621:21)
#124    LinterVisitor.visitCompilationUnit (package:analyzer/src/lint/linter_visitor.dart:183:10)
#125    CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:3614:50)
#126    LibraryAnalyzer._computeLints (package:analyzer/src/dart/analysis/library_analyzer.dart:410:12)
#127    LibraryAnalyzer._computeDiagnostics (package:analyzer/src/dart/analysis/library_analyzer.dart:334:7)
#128    LibraryAnalyzer.analyze (package:analyzer/src/dart/analysis/library_analyzer.dart:109:5)
#129    AnalysisDriver._analyzeFileImpl.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1401:11)
<asynchronous suspension>
#130    PerformanceLog.runAsync (package:analyzer/src/dart/analysis/performance_logger.dart:50:14)
<asynchronous suspension>
#131    AnalysisDriver._analyzeFile.<anonymous closure> (package:analyzer/src/dart/analysis/driver.dart:1315:9)
<asynchronous suspension>
#132    OperationPerformanceImpl.runAsync (package:analyzer/src/util/performance/operation_performance.dart:174:14)
<asynchronous suspension>
#133    AnalysisDriver._analyzeFile (package:analyzer/src/dart/analysis/driver.dart:1312:5)
<asynchronous suspension>
#134    AnalysisDriver._getErrors (package:analyzer/src/dart/analysis/driver.dart:1743:5)
<asynchronous suspension>
#135    AnalysisDriver.performWork (package:analyzer/src/dart/analysis/driver.dart:1214:7)
<asynchronous suspension>
#136    AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2446:7)
<asynchronous suspension>


null
@JCKodel JCKodel added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Jan 27, 2025
@pq pq added analyzer-constants analyzer-dartfix Issues with the dartfix package P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jan 28, 2025
@pq
Copy link
Member

pq commented Jan 28, 2025

@kallentu: in case this is familiar territory?

Or @scheglov?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-constants analyzer-dartfix Issues with the dartfix package area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants