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

After updating dart to 2.16.0 stable channel dart doc is throwing error #2937

Closed
MohamedFBoussaid opened this issue Feb 4, 2022 · 2 comments

Comments

@MohamedFBoussaid
Copy link

running dart doc . is throwing the following errors :

dartdoc 4.1.0 failed: type 'PropertyAccessImpl' is not a subtype of type 'IdentifierImpl' in type cast
#0      CommentReferenceImpl.identifier (package:analyzer/src/dart/ast/ast.dart:1911:48)
dart-lang/sdk#1      new _ModelCommentReferenceImpl (package:dartdoc/src/comment_references/model_comment_reference.dart:101:29)
dart-lang/sdk#2      new ModelCommentReference (package:dartdoc/src/comment_references/model_comment_reference.dart:24:7)
dart-lang/sdk#3      ModelNode._commentRefsFor (package:dartdoc/src/model/model_node.dart:30:11)
dart-lang/sdk#4      new ModelNode (package:dartdoc/src/model/model_node.dart:22:23)
dart-lang/sdk#5      PackageGraph.populateModelNodeFor.<anonymous closure> (package:dartdoc/src/model/package_graph.dart:174:15)
dart-lang/sdk#6      _LinkedHashMapMixin.putIfAbsent (dart:collection-patch/compact_hash.dart:453:23)
dart-lang/sdk#7      PackageGraph.populateModelNodeFor (package:dartdoc/src/model/package_graph.dart:172:17)
dart-lang/sdk#8      new Library.fromLibraryResult.<anonymous closure> (package:dartdoc/src/model/library.dart:82:26)
dart-lang/sdk#9      _HashableChildLibraryElementVisitor.visitElement (package:dartdoc/src/model/library.dart:34:21)
dart-lang/sdk#10     GeneralizingElementVisitor.visitExecutableElement (package:analyzer/dart/element/visitor.dart:101:59)
dart-lang/sdk#11     GeneralizingElementVisitor.visitMethodElement (package:analyzer/dart/element/visitor.dart:151:7)
dart-lang/sdk#12     MethodElementImpl.accept (package:analyzer/src/dart/element/element.dart:4323:54)
dart-lang/sdk#13     ElementImpl.safelyVisitChildren (package:analyzer/src/dart/element/element.dart:2587:13)
dart-lang/sdk#14     ClassElementImpl.visitChildren (package:analyzer/src/dart/element/element.dart:804:5)
dart-lang/sdk#15     GeneralizingElementVisitor.visitElement (package:analyzer/dart/element/visitor.dart:97:13)
dart-lang/sdk#16     _HashableChildLibraryElementVisitor.visitElement (package:dartdoc/src/model/library.dart:35:11)
dart-lang/sdk#17     GeneralizingElementVisitor.visitClassElement (package:analyzer/dart/element/visitor.dart:86:49)
dart-lang/sdk#18     AbstractClassElementImpl.accept (package:analyzer/src/dart/element/element.dart:126:54)
dart-lang/sdk#19     ElementImpl.safelyVisitChildren (package:analyzer/src/dart/element/element.dart:2587:13)
dart-lang/sdk#20     CompilationUnitElementImpl.visitChildren (package:analyzer/src/dart/element/element.dart:1228:5)
dart-lang/sdk#21     GeneralizingElementVisitor.visitElement (package:analyzer/dart/element/visitor.dart:97:13)
dart-lang/sdk#22     _HashableChildLibraryElementVisitor.visitElement (package:dartdoc/src/model/library.dart:35:11)
dart-lang/sdk#23     GeneralizingElementVisitor.visitCompilationUnitElement (package:analyzer/dart/element/visitor.dart:90:7)
dart-lang/sdk#24     CompilationUnitElementImpl.accept (package:analyzer/src/dart/element/element.dart:1190:15)
dart-lang/sdk#25     ElementImpl.safelyVisitChildren (package:analyzer/src/dart/element/element.dart:2587:13)
dart-lang/sdk#26     LibraryElementImpl.visitChildren (package:analyzer/src/dart/element/element.dart:4169:5)
dart-lang/sdk#27     GeneralizingElementVisitor.visitElement (package:analyzer/dart/element/visitor.dart:97:13)
dart-lang/sdk#28     _HashableChildLibraryElementVisitor.visitElement (package:dartdoc/src/model/library.dart:35:11)
dart-lang/sdk#29     new Library.fromLibraryResult (package:dartdoc/src/model/library.dart:83:10)
dart-lang/sdk#30     PackageGraph.addLibraryToGraph (package:dartdoc/src/model/package_graph.dart:72:23)
dart-lang/sdk#31     PubPackageBuilder._parseLibraries (package:dartdoc/src/model/package_builder.dart:225:23)
<asynchronous suspension>
dart-lang/sdk#32     PubPackageBuilder.getLibraries (package:dartdoc/src/model/package_builder.dart:404:5)
<asynchronous suspension>
dart-lang/sdk#33     PubPackageBuilder.buildPackageGraph (package:dartdoc/src/model/package_builder.dart:75:5)
<asynchronous suspension>
dart-lang/sdk#34     Dartdoc.generateDocsBase (package:dartdoc/dartdoc.dart:185:24)
<asynchronous suspension>
dart-lang/sdk#35     Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:233:24)
<asynchronous suspension>
dart-lang/sdk#36     Dartdoc.executeGuarded.<anonymous closure> (package:dartdoc/dartdoc.dart:493:9)
<asynchronous suspension>

This was working fine with dart 2.15.1

@kevmoo kevmoo transferred this issue from dart-lang/sdk Feb 7, 2022
@RicardoRB
Copy link

#2934 related

@srawlins
Copy link
Member

srawlins commented Feb 8, 2022

Thanks for filing this issue. Duplicate of #2934.

@srawlins srawlins closed this as completed Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants