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

Linter 0.1.5 crashes #151

Closed
dikmax opened this issue Nov 10, 2015 · 2 comments
Closed

Linter 0.1.5 crashes #151

dikmax opened this issue Nov 10, 2015 · 2 comments
Assignees
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@dikmax
Copy link
Contributor

dikmax commented Nov 10, 2015

Updated linter to new version get runtime error:

An error occurred while linting
  Please report it at: github.com/dart-lang/linter/issues
AnalysisException: Cannot compute DART_ERRORS for /Users/dikmax/workspace/md_proc/lib/definitions.dart
Caused by Unexpected exception while performing GenerateLintsTask for source /Users/dikmax/workspace/md_proc/lib/definitions.dart
#0      AnalysisTask._safelyPerform (package:analyzer/task/model.dart:320)
#1      AnalysisTask.perform (package:analyzer/task/model.dart:210)
#2      AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:271)
#3      AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:110)
#4      AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:662)
#5      AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:595)
#6      AnalysisDriver.analyze (package:linter/src/analysis.dart:142)
#7      DartLinter.lintFiles (package:linter/src/linter.dart:67)
#8      runLinter (http://localhost:56260/linter.dart:144)
#9      main (http://localhost:56260/linter.dart:17)
#10     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:259)
#11     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

Caused by The null object does not have a method 'accept'.

NoSuchMethodError: method not found: 'accept'
Receiver: null
Arguments: [Instance of '_VisitoHelper']
#0      Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1      Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2      Visitor.visitMethodDeclaration (package:linter/src/rules/type_annotate_public_apis.dart:101)
#3      DelegatingAstVisitor.visitMethodDeclaration.<anonymous closure> (package:analyzer/src/generated/visitors.dart:475)
#4      Iterable.forEach (dart:core/iterable.dart:217)
#5      DelegatingAstVisitor.visitMethodDeclaration (package:analyzer/src/generated/visitors.dart:475)
#6      MethodDeclaration.accept (package:analyzer/src/generated/ast.dart:12172)
#7      NodeList.accept (package:analyzer/src/generated/ast.dart:12777)
#8      ClassDeclaration.visitChildren (package:analyzer/src/generated/ast.dart:4419)
#9      DelegatingAstVisitor.visitClassDeclaration (package:analyzer/src/generated/visitors.dart:116)
#10     ClassDeclaration.accept (package:analyzer/src/generated/ast.dart:4349)
#11     NodeList.accept (package:analyzer/src/generated/ast.dart:12777)
#12     CompilationUnit.visitChildren (package:analyzer/src/generated/ast.dart:4975)
#13     DelegatingAstVisitor.visitCompilationUnit (package:analyzer/src/generated/visitors.dart:144)
#14     CompilationUnit.accept (package:analyzer/src/generated/ast.dart:4968)
#15     GenerateLintsTask.internalPerform (package:analyzer/src/task/dart.dart:2667)
#16     AnalysisTask._safelyPerform (package:analyzer/task/model.dart:310)
#17     AnalysisTask.perform (package:analyzer/task/model.dart:210)
#18     AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:271)
#19     AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:110)
#20     AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:662)
#21     AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:595)
#22     AnalysisDriver.analyze (package:linter/src/analysis.dart:142)
#23     DartLinter.lintFiles (package:linter/src/linter.dart:67)
#24     runLinter (http://localhost:56260/linter.dart:144)
#25     main (http://localhost:56260/linter.dart:17)
#26     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:259)
#27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)


#0      AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:666)
#1      AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:595)
#2      AnalysisDriver.analyze (package:linter/src/analysis.dart:142)
#3      DartLinter.lintFiles (package:linter/src/linter.dart:67)
#4      runLinter (http://localhost:56260/linter.dart:144)
#5      main (http://localhost:56260/linter.dart:17)
#6      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:259)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:148)

Linter was run from command line:

pub run linter .
@harryterkelsen
Copy link

I'm seeing the same thing when doing pub global run linter . on https://github.com/QuiverDart/quiver_iterables

Task failed: GenerateLintsTask for source /usr/local/google/home/het/code/quiver_iterables/lib/src/infinite_iterable.dart
An error occurred while linting
  Please report it at: github.com/dart-lang/linter/issues
AnalysisException: Cannot compute DART_ERRORS for /usr/local/google/home/het/code/quiver_iterables/lib/src/infinite_iterable.dart
Caused by Unexpected exception while performing GenerateLintsTask for source /usr/local/google/home/het/code/quiver_iterables/lib/src/infinite_iterable.dart
#0      AnalysisTask._safelyPerform (package:analyzer/task/model.dart:320)
#1      AnalysisTask.perform (package:analyzer/task/model.dart:210)
#2      AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:271)
#3      AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:110)
#4      AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:662)
#5      AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:595)
#6      AnalysisDriver.analyze (package:linter/src/analysis.dart:142)
#7      DartLinter.lintFiles (package:linter/src/linter.dart:67)
#8      runLinter (http://localhost:53270/linter.dart:144)
#9      main (http://localhost:53270/linter.dart:17)
#10     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:261)
#11     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:150)

Caused by The null object does not have a method 'accept'.

NoSuchMethodError: method not found: 'accept'
Receiver: null
Arguments: [Instance of '_VisitoHelper']
#0      Object._noSuchMethod (dart:core-patch/object_patch.dart:42)
#1      Object.noSuchMethod (dart:core-patch/object_patch.dart:45)
#2      Visitor.visitMethodDeclaration (package:linter/src/rules/type_annotate_public_apis.dart:101)
#3      DelegatingAstVisitor.visitMethodDeclaration.<anonymous closure> (package:analyzer/src/generated/visitors.dart:475)
#4      Iterable.forEach (dart:core/iterable.dart:217)
#5      DelegatingAstVisitor.visitMethodDeclaration (package:analyzer/src/generated/visitors.dart:475)
#6      MethodDeclaration.accept (package:analyzer/src/generated/ast.dart:12172)
#7      NodeList.accept (package:analyzer/src/generated/ast.dart:12777)
#8      ClassDeclaration.visitChildren (package:analyzer/src/generated/ast.dart:4419)
#9      DelegatingAstVisitor.visitClassDeclaration (package:analyzer/src/generated/visitors.dart:116)
#10     ClassDeclaration.accept (package:analyzer/src/generated/ast.dart:4349)
#11     NodeList.accept (package:analyzer/src/generated/ast.dart:12777)
#12     CompilationUnit.visitChildren (package:analyzer/src/generated/ast.dart:4975)
#13     DelegatingAstVisitor.visitCompilationUnit (package:analyzer/src/generated/visitors.dart:144)
#14     CompilationUnit.accept (package:analyzer/src/generated/ast.dart:4968)
#15     GenerateLintsTask.internalPerform (package:analyzer/src/task/dart.dart:2667)
#16     AnalysisTask._safelyPerform (package:analyzer/task/model.dart:310)
#17     AnalysisTask.perform (package:analyzer/task/model.dart:210)
#18     AnalysisDriver.performWorkItem (package:analyzer/src/task/driver.dart:271)
#19     AnalysisDriver.computeResult (package:analyzer/src/task/driver.dart:110)
#20     AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:662)
#21     AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:595)
#22     AnalysisDriver.analyze (package:linter/src/analysis.dart:142)
#23     DartLinter.lintFiles (package:linter/src/linter.dart:67)
#24     runLinter (http://localhost:53270/linter.dart:144)
#25     main (http://localhost:53270/linter.dart:17)
#26     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:261)
#27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:150)


#0      AnalysisContextImpl.computeResult (package:analyzer/src/context/context.dart:666)
#1      AnalysisContextImpl.computeErrors (package:analyzer/src/context/context.dart:595)
#2      AnalysisDriver.analyze (package:linter/src/analysis.dart:142)
#3      DartLinter.lintFiles (package:linter/src/linter.dart:67)
#4      runLinter (http://localhost:53270/linter.dart:144)
#5      main (http://localhost:53270/linter.dart:17)
#6      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:261)
#7      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:150)

@harryterkelsen harryterkelsen added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Nov 11, 2015
@pq
Copy link
Member

pq commented Dec 2, 2015

Thanks for the report! (And sorry for the slow reply.) Shooting to have this fixed today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants