dart-lang / dartdoc

API documentation tool for Dart.
https://pub.dev/packages/dartdoc
BSD 3-Clause "New" or "Revised" License
472 stars 118 forks source link

Documenting mono repository project #2794

Open MatteoNTT opened 3 years ago

MatteoNTT commented 3 years ago

Hi,

We have a mono repository project structured like this one: https://github.com/firebaseextended/flutterfire

Is it possible to generate a single html doc for all packages inside the mono repo?

jcollins-g commented 3 years ago

This is not directly supported. You can either generate for each package individually and have them cross-link (as they do on pub), or you can use the technique Flutter uses which is to create a "fake" top level package that imports all the remaining packages, then use --auto-include-dependencies and --exclude-packages to control which packages are included.

MatteoNTT commented 3 years ago

Hi @jcollins-g,

thanks for quick reply!

I have and issue while try to run dartdoc --auto-include-dependencies --include <my_melos_package>.

This is the error log:

error: no canonical library found for dart-async.Future, not linking
    from dart-async.Future: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/async/future.dart:146:16)
  error: no canonical library found for dart-core.String, not linking
    from dart-core.String: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/string.dart:97:16)
  error: no canonical library found for dart-core.int, not linking
    from dart-core.int: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/int.dart:23:16)
  error: no canonical library found for dart-core.List, not linking
    from dart-core.List: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/list.dart:52:16)
  error: no canonical library found for dart-core.Type, not linking
    from dart-core.Type: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/type.dart:21:16)
  error: no canonical library found for dart-core.Map, not linking
    from dart-core.Map: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/map.dart:30:16)
  error: no canonical library found for dart-core.bool, not linking
    from dart-core.bool: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/bool.dart:13:7)
  error: no canonical library found for dart-core.Invocation, not linking
    from dart-core.Invocation: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/invocation.dart:12:16)
  error: no canonical library found for dart-core.Object, not linking
    from dart-core.Object: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/object.dart:18:7)
  error: no canonical library found for dart-core.Exception, not linking
    from dart-core.Exception: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/exceptions.dart:19:16)
  error: no canonical library found for dart-core.double, not linking
    from dart-core.double: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/double.dart:19:16)
  error: no canonical library found for dart-core.StackTrace, not linking
    from dart-core.StackTrace: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/stacktrace.dart:14:16)
  error: no canonical library found for dart-core.override, not linking
    from dart-core.override: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/core/annotations.dart:118:14)
  error: no canonical library found for dart-async.FutureOr, not linking
    from dart-async.FutureOr: (file:///Users/matteo/fvm/versions/stable/bin/cache/pkg/sky_engine/lib/async/future.dart:38:16)
  warning: no canonical library found for get_it.GetIt, not linking
    from get_it.GetIt: (file:///Users/matteo/.pub-cache/hosted/pub.dartlang.org/get_it-7.2.0/lib/get_it.dart:128:16)

I can't figure out how to fix it

Thanks Matteo

bwilkerson commented 2 years ago

I'm sorry you haven't received a response before this. The most likely scenario is that the notification of your response was lost in someone's email. We'll try to do better in the future.

@jcollins-g @srawlins

pq commented 1 year ago

Bumping priority for a proper response (not necessarily for a fix).

/cc @srawlins

srawlins commented 1 year ago

From which directory are you running dartdoc?