Skip to content

Graceful handling of asset-only packages. #2327

Closed
@isoos

Description

@isoos

When a package has no .dart files in it, dartdoc fails with the following output:

Unhandled exception:
dartdoc could not find any libraries to document
#0      Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:218:9)
<asynchronous suspension>
#1      main (file:///project/pkg/pub_dartdoc/bin/pub_dartdoc.dart:27:33)
<asynchronous suspension>
#2      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#3      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

Instead, dartdoc should emit a warning, and still generate the index.html file based on the README.md.

Example package from pub.dev: cupertino_icons, bulma_min.

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failurestype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)type-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions