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

dartdoc can't run successfully on pub #3196

Closed
mpfaff opened this issue Dec 19, 2019 · 5 comments
Closed

dartdoc can't run successfully on pub #3196

mpfaff opened this issue Dec 19, 2019 · 5 comments

Comments

@mpfaff
Copy link

mpfaff commented Dec 19, 2019

So, I'm publishing this package on pub.dev, and when I look at the score breakdown, I get a bunch of errors. In the "Health suggestions" section, it says to run dartfmt on every file in the lib folder. In the "Maintenance issues and suggestions" section, it says "Make sure dartdoc successfully runs on your package's source files. (-10 points)" and spits out this error:

exitCode: 255 stdout: parsing /tmp/pub-dartlang-dartdocWRUKEU/pkg/lib/expose.dart... parsing /tmp/pub-dartlang-dartdocWRUKEU/pkg/lib/plexus.dart... parsing /dart-sdk/lib/core/core.dart... parsing /dart-sdk/lib/collection/collection.dart... parsing /dart-sdk/lib/internal/internal.dart... parsing /dart-sdk/lib/async/async.dart... parsing /dart-sdk/lib/convert/convert.dart... parsing /dart-sdk/lib/typed_data/typed_data.dart... parsing /dart-sdk/lib/math/math.dart... parsing /tmp/pub-dartlang-dartdocWRUKEU/pkg/lib/src/expose/list.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/meta-1.1.8/lib/meta.dart... parsing /tmp/pub-dartlang-dartdocWRUKEU/pkg/lib/src/expose/maps.dart... parsing /tmp/pub-dartlang-dartdocWRUKEU/pkg/lib/src/ansi.dart... parsing /dart-sdk/lib/io/io.dart... parsing /dart-sdk/lib/developer/developer.dart... parsing /dart-sdk/lib/isolate/isolate.dart... parsing /dart-sdk/lib/_http/http.dart... parsing /tmp/pub-dartlang-dartdocWRUKEU/pkg/lib/src/event.dart... parsing /tmp/pub-dartlang-dartdocWRUKEU/pkg/lib/src/extension/iterable.dart... parsing /tmp/pub-dartlang-dartdocWRUKEU/pkg/lib/src/extension/string.dart... [...] parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/instrumentation/file_instrumentation.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/task/model.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/args-1.5.2/lib/command_runner.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/http-0.12.0+2/lib/src/browser_client.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/http-0.12.0+2/lib/src/io_client.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/http-0.12.0+2/lib/src/mock_client.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/package_config-1.1.0/lib/src/packages_io_impl.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/src/dart/analysis/analysis_context_collection.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/src/dart/analysis/context_builder.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/src/source/package_map_provider.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/src/generated/sdk_io.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/src/source/sdk_ext.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/src/source/custom_resolver.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/src/source/path_filter.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/analyzer-0.39.2+1/lib/src/util/glob.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/args-1.5.2/lib/src/help_command.dart... parsing /tmp/pub-cache-dirTBJCBR/hosted/pub.dartlang.org/args-1.5.2/lib/src/usage_exception.dart... Initialized dartdoc with 879 libraries in 89.7 seconds documenting plexus Generating docs for library expose from package:plexus/expose.dart... stderr: Documenting plexus... warning: expose has no library level documentation comments, from expose: (file:///tmp/pub-dartlang-dartdocWRUKEU/pkg/lib/expose.dart:1:9) Unhandled exception: type 'FunctionTypeImpl' is not a subtype of type 'InterfaceType' #0 DefinedElementType.interfaceType (package:dartdoc/src/element_type.dart:324: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.

I'm really confused as to what I might be doing wrong and would love some help.

@isoos
Copy link
Collaborator

isoos commented Dec 19, 2019

@mpfaff: thanks for reporting, I've created an issue for in dartdoc: dart-lang/dartdoc#2101

Once it gets fixed in dartdoc, pub.dev will eventually use it, and the analysis of the package and its health score will be corrected.

@mpfaff
Copy link
Author

mpfaff commented Dec 19, 2019

Thanks, @isoos! I'll keep an eye out for any developments over there.

@jcollins-g
Copy link

@isoos Where can I find full output logs for dartdoc's run? Reproducing the crash is turning out to be non-trivial.

@isoos
Copy link
Collaborator

isoos commented Jan 2, 2020

@isoos
Copy link
Collaborator

isoos commented Jan 15, 2020

The new release fixed this issue.

@isoos isoos closed this as completed Jan 15, 2020
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