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

error running dartdoc #38

Closed
d2m opened this issue Jan 5, 2015 · 9 comments
Closed

error running dartdoc #38

d2m opened this issue Jan 5, 2015 · 9 comments
Assignees

Comments

@d2m
Copy link

d2m commented Jan 5, 2015

is this working for you, because running dartdoc on itself or other packages gets me an error

Dart VM version: 1.8.3 (Mon Dec 1 08:39:04 2014) on "linux_ia32"

$ pub run dartdoc
parsing /.../dartdoc/lib/dartdoc.dart...
generating docs/dartdoc_package.html
generating docs/dartdoc.html
Unhandled exception:
type 'MappedListIterable' is not a subtype of type 'List<Parameter>' of 'params'.
#0      HtmlGeneratorHelper.printParams (package:dartdoc/src/generator.dart:501:38)
#1      ModelElement.createLinkedSummary (package:dartdoc/src/model.dart:125:39)
#2      HtmlGenerator.createToc (package:dartdoc/src/generator.dart:184:65)
#3      generateClass (package:dartdoc/src/generator.dart:236:14)
#4      List.forEach (dart:core-patch/growable_array.dart:254)
#5      HtmlGenerator.generateLibrary (package:dartdoc/src/generator.dart:161:18)
#6      HtmlGenerator.generate.<anonymous closure> (package:dartdoc/src/generator.dart:37:55)
#7      List.forEach (dart:core-patch/growable_array.dart:254)
#8      HtmlGenerator.generate (package:dartdoc/src/generator.dart:37:30)
#9      DartDoc.generateDocs (package:dartdoc/dartdoc.dart:60:23)
#10     main (http://localhost:35193/dartdoc.dart:26:62)
#11     _startIsolate (dart:isolate-patch/isolate_patch.dart:237)
#12     _startMainIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:192)
#13     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:130)

Dart VM version: 1.9.0-dev.2.2 (Sun Dec 21 11:39:18 2014) on "linux_ia32"

$ pub run dartdoc
parsing /.../dartdoc/lib/dartdoc.dart...
generating docs/dartdoc_package.html
generating docs/dartdoc.html
Unhandled exception:
type 'MappedListIterable' is not a subtype of type 'List<Parameter>' of 'params'.
#0      HtmlGeneratorHelper.printParams (package:dartdoc/src/generator.dart:501:38)
#1      ModelElement.createLinkedSummary (package:dartdoc/src/model.dart:125:39)
#2      HtmlGenerator.createToc (package:dartdoc/src/generator.dart:184:65)
#3      generateClass (package:dartdoc/src/generator.dart:236:14)
#4      List.forEach (dart:core-patch/growable_array.dart:219)
#5      HtmlGenerator.generateLibrary (package:dartdoc/src/generator.dart:161:18)
#6      HtmlGenerator.generate.<anonymous closure> (package:dartdoc/src/generator.dart:37:55)
#7      List.forEach (dart:core-patch/growable_array.dart:219)
#8      HtmlGenerator.generate (package:dartdoc/src/generator.dart:37:30)
#9      DartDoc.generateDocs (package:dartdoc/dartdoc.dart:60:23)
#10     main (http://localhost:51146/dartdoc.dart:26:62)
#11     _startMainIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:203)
#12     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:141)
@sethladd
Copy link
Contributor

sethladd commented Jan 5, 2015

Thanks for the report! We should probably have a test for this... running dartdoc on itself seems like a reasonable goal :)

@keertip keertip mentioned this issue Jan 5, 2015
@keertip
Copy link
Collaborator

keertip commented Jan 5, 2015

Fixed exceptions. Unfortunately, using pub run vs. the VM exhibits different behavior when running dartdoc. So even with the fix, running dartdoc with pub run does not work. Works running it with the VM.

@keertip keertip closed this as completed Jan 5, 2015
@d2m
Copy link
Author

d2m commented Jan 5, 2015

Thanks for the fix. Want to say that DART_SDK needs to be set or --dart-sdk passed as an option if running with the VM.

@sethladd
Copy link
Contributor

sethladd commented Jan 5, 2015

@keertip do you know why dartdoc requires an explicitly set location for the SDK?

@keertip
Copy link
Collaborator

keertip commented Jan 5, 2015

dartdoc does not need location of SDK. Maybe the DART_SDK is used here to set path to the vm?

@devoncarew
Copy link
Member

The analyzer library we're using needs to be able to locate the dart: sources.

@keertip
Copy link
Collaborator

keertip commented Jan 5, 2015

Yes, that is true, but specifying sdk location is not required. It will still generate docs for package.

@sethladd
Copy link
Contributor

sethladd commented Jan 6, 2015

How do I use --dart-sdk? Added it to the command line throws an error:

sethladd@sethladd-macbookair ~/Code/dart-uuid (master)$ dart ../dartdoc/bin/dartdoc.dart --dart-sdk=~/homebrew/Cellar/dart/1.8.3/libexec/
Unhandled exception:
FormatException: Could not find an option named "dart-sdk".

@keertip
Copy link
Collaborator

keertip commented Jan 6, 2015

Currently there is no option for passing the sdk location. Just run

dart ../dartdoc/bin/dartdoc.dart

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

4 participants