Skip to content

dartdoc failed: type 'UndefinedElementType' is not a subtype of type 'DefinedElementType' #2102

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

Closed
sigurdm opened this issue Dec 20, 2019 · 2 comments · Fixed by #2112
Closed
Assignees
Labels
P0 A serious issue requiring immediate resolution type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@sigurdm
Copy link
Contributor

sigurdm commented Dec 20, 2019

Seen on pub.

Happens for the package:
https://storage.googleapis.com/pub-packages/packages/dart_extension_methods-0.1.0.tar.gz

Command:

$ dartdoc .

Version:

$ dartdoc --version
dartdoc version: 0.29.1

Full stacktrace:

dartdoc failed: type 'UndefinedElementType' is not a subtype of type 'DefinedElementType'
package:dartdoc/src/model.dart 1342:5                                       new Extension
package:dartdoc/src/model.dart 3289:29                                      new ModelElement.from
package:dartdoc/src/model.dart 2525:36                                      Library.extensions.<fn>
dart:core                                                                   Iterable.toList
package:dartdoc/src/model.dart 2526:12                                      Library.extensions
package:dartdoc/src/model.dart 2941:17                                      Library.modelElementsMap
package:dartdoc/src/model.dart 2982:47                                      Library.allModelElements
package:dartdoc/src/model.dart 5868:48                                      PackageGraph.allModelElements.<fn>.<fn>
dart:collection                                                             SetMixin.forEach
package:dartdoc/src/model.dart 5867:18                                      PackageGraph.allModelElements.<fn>
dart:collection                                                             SetMixin.forEach
package:dartdoc/src/model.dart 5861:52                                      PackageGraph.allModelElements
package:dartdoc/src/model.dart 5121:28                                      PackageGraph.precacheLocalDocs
dart:core                                                                   Iterable.toList
package:dartdoc/src/model.dart 5074:56                                      PackageGraph.initializePackageGraph
package:dartdoc/src/model.dart 6908:20                                      PackageBuilder.buildPackageGraph
===== asynchronous gap ===========================
package:dartdoc/dartdoc.dart 95:26                                          Dartdoc.generateDocsBase
package:dartdoc/dartdoc.dart 134:43                                         Dartdoc.generateDocs
dart:async                                                                  runZoned
/b/s/w/ir/cache/builder/sdk/third_party/pkg/dartdoc/bin/dartdoc.dart 96:13  main.<fn>
package:stack_trace                                                         Chain.capture
/b/s/w/ir/cache/builder/sdk/third_party/pkg/dartdoc/bin/dartdoc.dart 95:17  main
@jcollins-g jcollins-g added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P0 A serious issue requiring immediate resolution labels Jan 2, 2020
@jcollins-g jcollins-g self-assigned this Jan 2, 2020
@jcollins-g
Copy link
Contributor

reproduced at head + #2109.

@jcollins-g
Copy link
Contributor

dartdoc does not consider that extensions on dynamic might exist.

/// 
extension LogExtensions on dynamic {}

This is therefore fatal.

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

Successfully merging a pull request may close this issue.

2 participants