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 appears to be having a problem with "package:" imports. #5218

Closed
DartBot opened this issue Sep 17, 2012 · 19 comments
Closed

Dartdoc appears to be having a problem with "package:" imports. #5218

DartBot opened this issue Sep 17, 2012 · 19 comments
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Milestone

Comments

@DartBot
Copy link

DartBot commented Sep 17, 2012

This issue was originally filed by pru...@gmail.com


Here's the output (also screenshot attached):

Running dartdoc...
/F:/Development/Dart/Projects/buckshot_lib/lib/buckshot.dart:15:9: Error: Cannot read "../dart-xml/xml.dart" (OS Error: The system cannot find the path specified.

, errno = 3).

import('package:dart-xml/xml.dart');

        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/F:/Development/Dart/Projects/buckshot_lib/lib/buckshot.dart:1:1: Error: The compiler crashed when compiling this element.
// Copyright (c) 2012, John Evans

Unhandled exception:
Error: Cannot read "../dart-xml/xml.dart" (OS Error: The system cannot find the path specified.

, errno = 3).

­0 Dart2JsCompilation.handler.handler (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart:324:7)

­1 Compiler.reportDiagnostic (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/apiimpl.dart:144:14)

­2 Compiler.cancel (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/compiler.dart:264:21)

­3 Compiler.readScript (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/apiimpl.dart:86:15)

­4 ScannerTask.loadLibrary.<anonymous closure> (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/scanner/scanner_task.dart:124:46)

­5 HashMapImplementation.putIfAbsent (bootstrap_impl:885:23)

­6 ScannerTask.loadLibrary (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/scanner/scanner_task.dart:122:37)

­7 ScannerTask.importLibraryFromTag (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/scanner/scanner_task.dart:105:49)

­8 ScannerTask.processScriptTags (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/scanner/scanner_task.dart:80:27)

­9 ScannerTask.scanLibrary (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/scanner/scanner_task.dart:13:22)

­10 ScannerTask.loadLibrary.<anonymous closure> (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/scanner/scanner_task.dart:131:20)

­11 Compiler.withCurrentElement (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/compiler.dart:131:15)

­12 Compiler.withCurrentElement (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/compiler.dart:144:7)

­13 ScannerTask.loadLibrary (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/compiler/implementation/scanner/scanner_task.dart:130:34)

­14 LibraryCompiler.runCompilerList (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart:231:42)

­15 LibraryCompiler._runList (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart:216:22)

­16 LibraryCompiler._runList (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart:217:7)

­17 LibraryCompiler.runList (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart:207:28)

­18 Dart2JsCompilation.Dart2JsCompilation.library (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/dartdoc/lib/src/mirrors/dart2js_mirror.dart:362:22)

­19 Compilation.Compilation.library (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/dartdoc/lib/mirrors.dart:36:12)

­20 Dartdoc.documentLibraries (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/dartdoc/lib/dartdoc.dart:316:25)

­21 main (file:///D:/Development/dart/editor_latest/dart/dart-sdk/pkg/dartdoc/bin/dartdoc.dart:120:28)

What version of the product are you using? On what operating system?
Win 7, 64. SDK 12433


Attachment:
dartdoc_problem_with_package_paths.png (185.18 KB)

@DartBot
Copy link
Author

DartBot commented Sep 17, 2012

This comment was originally written by pr...@gmail.com


After further testing, it appears this may have more to do with VM apps, than dartdoc specifically.

@sethladd
Copy link
Contributor

Hi John,

Do you have a simple repro? Can you repro on the command line, or is this an editor thing?


Added Area-VM, NeedsInfo labels.

@DartBot
Copy link
Author

DartBot commented Sep 17, 2012

This comment was originally written by pr...@gmail.com


I get the exact same dump at the command line.

@DartBot
Copy link
Author

DartBot commented Sep 17, 2012

This comment was originally written by prujo...@gmail.com


Since dartdoc is a VM app, I think it's having trouble with finding anything with "package:". My VM-based unit tests are having the same problem.

@sethladd
Copy link
Contributor

Added Triaged label.

@kevmoo
Copy link
Member

kevmoo commented Sep 19, 2012

See also http://code.google.com/p/dart/issues/detail?id=4634

Same error, but trying to use sdk unittest

@DartBot
Copy link
Author

DartBot commented Oct 18, 2012

This comment was originally written by prujohn...@gmail.com


Any word on this? Still can't generate docs from Editor after M1.

@sethladd
Copy link
Contributor

Sorry to be a pain, but can you paste in the exact sequence of steps and commands you've used on the command line?

@DartBot
Copy link
Author

DartBot commented Oct 18, 2012

This comment was originally written by prujo...@gmail.com


I'm not using the command line. I'm using the editor "Tools-> Generate Dartdoc" and I get the stack trace attached above.

@iposva-google
Copy link
Contributor

Based on the info we have now this is definitely not a VM issue. The VM is not involved in any of the package lookup when running dartdoc.
Either the Editor does not spawn the subprocess with the correct flags or dartdoc is not properly handling them. Assigning to the Editor for further investigation.


Removed Area-VM label.
Added Area-Editor label.

@danrubel
Copy link

Set owner to @devoncarew.
Added this to the M2 milestone.

@devoncarew
Copy link
Member

I can reproduce this when running dartdoc from the editor. At a glance, it seems like dartdoc is not package: import aware. dart2js can compile a sample app, but dartdoc fails with the above error. For reference, here are the flags we're invoking dartdoc with:

dart-sdk/bin/dart dartdoc/bin/dartdoc.dart
--mode=static
--link-api
--verbose


Removed the owner.
Removed Area-Editor label.
Added Area-DartDoc label.

@dgrove
Copy link
Contributor

dgrove commented Nov 28, 2012

Set owner to amouravski@google.com.

@munificent
Copy link
Member

Issue #5515 has been merged into this issue.

@munificent
Copy link
Member

Marked this as blocking #6745.

@DartBot
Copy link
Author

DartBot commented Dec 7, 2012

This comment was originally written by VadimTs...@gmail.com


John, what you are doing while this bug is not fixed?
Have you invented some temporary workaround, or stopped to update your docs for the time being?

@kevmoo
Copy link
Member

kevmoo commented Dec 7, 2012

I'm excluding libraries that are using any of these packages...and I've avoided using a few packages (namely meta) so I can keep generating docs for them.

:-/

@DartBot
Copy link
Author

DartBot commented Dec 8, 2012

This comment was originally written by pru...@gmail.com


@vadim: I haven't generated docs in months. :(

@kevin: It would seem to be unavoidable now that the SDK is on pub, at least for me.

@dgrove
Copy link
Contributor

dgrove commented Dec 8, 2012

Andrei - can you please look at this asap?


Removed Priority-Medium label.
Added Priority-High label.

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures labels Dec 8, 2012
@DartBot DartBot added this to the M4 milestone Dec 8, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

8 participants