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

Unhandled exceptions with --link-to-remote (type 'DynamicTypeImpl' is not a subtype of type 'InterfaceType') #2113

Closed
isoos opened this issue Jan 7, 2020 · 5 comments · Fixed by #2129
Labels
P0 A serious issue requiring immediate resolution

Comments

@isoos
Copy link
Contributor

isoos commented Jan 7, 2020

Similar to #2101, I've found another exception that is triggered when running dartdoc with --link-to-remote:

https://pub.dev/packages/aws_sns_api

On pub.dev:
https://pub.dev/documentation/aws_sns_api/latest/log.txt

type 'DynamicTypeImpl' is not a subtype of type 'InterfaceType'
#0      TypeParameterElementType.interfaceType (package:dartdoc/src/element_type.dart:261:38)
#1      DefinedElementType.instantiatedType (package:dartdoc/src/element_type.dart:331:12)
#2      Extension._couldApplyTo (package:dartdoc/src/model.dart:1350:47)
#3      Extension.couldApplyTo (package:dartdoc/src/model.dart:1346:33)
#4      Class.potentiallyApplicableExtensions.<anonymous closure> (package:dartdoc/src/model.dart:805:27)

The fix to #2101 may have been fixed this one too, please double-check...

@jcollins-g jcollins-g added P0 A serious issue requiring immediate resolution Type: bug labels Jan 7, 2020
@jcollins-g
Copy link
Contributor

Yes, this is a similar bug and already fixed.

@isoos
Copy link
Contributor Author

isoos commented Jan 15, 2020

Reopening this, as it was not fixed with dartdoc 0.30.0+1, example package:

The stacktrace differs in some of the lines from the previous one:

Unhandled exception:
type 'DynamicTypeImpl' is not a subtype of type 'InterfaceType'
#0      TypeParameterElementType._interfaceType (package:dartdoc/src/element_type.dart:213:39)
#1      DefinedElementType.instantiatedType (package:dartdoc/src/element_type.dart:284:12)
#2      Extension._couldApplyTo (package:dartdoc/src/model/extension.dart:41:49)
#3      Extension.couldApplyTo (package:dartdoc/src/model/extension.dart:31:7)
#4      ExtensionTarget.potentiallyApplicableExtensions.<anonymous closure> (package:dartdoc/src/model/extension_target.dart:26:27)
#5      WhereIterator.moveNext (dart:_internal/iterable.dart:442:11)

@isoos
Copy link
Contributor Author

isoos commented Jan 15, 2020

(Oh, I thought I can reopen... should I create a new issue to track this?)

@jcollins-g jcollins-g reopened this Jan 15, 2020
@jcollins-g
Copy link
Contributor

This looks like some kind of different edge case. Thanks for pasting the log information into the bug, it helps a great deal!

@jcollins-g
Copy link
Contributor

This is what @scheglov warned me about in a previous PR; a bug where we assume TypeParameterType.bound is an InterfaceType. Sadly it looks like it hits bugs in the real world.

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants