0

我有如下所示的结构。当我从 DartEditor 和命令行运行 dartdoc 时,我在导入时收到有关“没有此类文件”的错误。当我运行我的 Dart 应用程序bin/ebisu.ebisu.dart时,它工作得很好。dartdoc 网页说如果你的结构是非标准的,你可能需要指定包。我的不能是标准的,因为如果我添加允许我生成文档的 --package-root 标志。我认为它看起来确实很标准......我可以做些什么来修复结构以使 dartdoc 和 DartEditor 高兴?

附加信息:以下是说明结构的文件:

bash-3.2$ find .
.
./bin
./bin/compile_dart_templates.dart
./bin/docs
./bin/ebisu.ebisu.dart
./bin/packages
./lib
./lib/ebisu.dart
./lib/ebisu_compiler.dart
./lib/ebisu_dart_meta.dart
./lib/ebisu_id.dart
./lib/ebisu_utils.dart
./lib/src
./lib/src/ebisu
./lib/src/ebisu/ebisu.dart
./lib/src/ebisu_compiler
./lib/src/ebisu_compiler/compiler.dart
./lib/src/ebisu_dart_meta
./lib/src/ebisu_dart_meta/meta.dart
./lib/src/ebisu_id
./lib/src/ebisu_id/id.dart
./lib/templates
./lib/templates/dart_meta
./lib/templates/dart_meta/app.tmpl
./lib/templates/dart_meta/class_.tmpl
./lib/templates/dart_meta/enum_.tmpl
./lib/templates/dart_meta/library.tmpl
./lib/templates/dart_meta/member.tmpl
./lib/templates/dart_meta/part.tmpl
./lib/templates/dart_meta/pubspec.tmpl
./lib/templates/dart_meta/script.tmpl
./lib/templates/dart_meta/src
./lib/templates/dart_meta/src/app.dart
./lib/templates/dart_meta/src/class_.dart
./lib/templates/dart_meta/src/enum_.dart
./lib/templates/dart_meta/src/library.dart
./lib/templates/dart_meta/src/member.dart
./lib/templates/dart_meta/src/part.dart
./lib/templates/dart_meta/src/pubspec.dart
./lib/templates/dart_meta/src/script.dart
./lib/templates/dart_meta/src/variable.dart
./lib/templates/dart_meta/variable.tmpl
./lib/templates/dart_meta.dart
./packages
./packages/ebisu
./packages/pathos
./pubspec.lock
./pubspec.yaml
./test
./test/ebisu_functions.dart
./test/packages
bash-3.2$ cat ./pubspec.yaml
name: ebisu
version: 0.0.1
description: >
  A library that supports code generation of the structure Dart (and potentially
  other languages like D) using a fairly declarative aproach.

dependencies:
  pathos:
bash-3.2$ dart bin/ebisu.ebisu.dart 
Done
bash-3.2$ dartdoc --out /tmp/docs/ebisu bin/ebisu.ebisu.dart 
Analyzing libraries...
bin/ebisu.ebisu.dart:3:8: Error: Cannot read "../../../../dart/dart-sdk/packages/ebisu/ebisu.dart" (OS Error: No such file or directory, errno = 2).
import "package:ebisu/ebisu.dart";
       ^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: generation failed: Failed to create mirror system.
bash-3.2$ dartdoc --out /tmp/docs/ebisu --package-root=`pwd`/packages bin/ebisu.ebisu.dart 
Analyzing libraries...

这是我的导入语句集:

find . -name \*dart | xargs grep "import \""
./bin/compile_dart_templates.dart:import "dart:io";
./bin/compile_dart_templates.dart:import "package:pathos/path.dart" as path;
./bin/compile_dart_templates.dart:import "package:ebisu/ebisu.dart";
./bin/compile_dart_templates.dart:import "package:ebisu/ebisu_id.dart";
./bin/compile_dart_templates.dart:import "package:ebisu/ebisu_compiler.dart";
./bin/ebisu.ebisu.dart:import "dart:io";
./bin/ebisu.ebisu.dart:import "package:pathos/path.dart" as path;
./bin/ebisu.ebisu.dart:import "package:ebisu/ebisu.dart";
./bin/ebisu.ebisu.dart:import "package:ebisu/ebisu_id.dart";
./bin/ebisu.ebisu.dart:import "package:ebisu/ebisu_dart_meta.dart";
./bin/ebisu.ebisu.dart:import "package:ebisu/ebisu_compiler.dart";
./lib/ebisu.dart:import "dart:io";
./lib/ebisu.dart:import "package:pathos/path.dart" as path;
./lib/ebisu_compiler.dart:import "dart:io";
./lib/ebisu_compiler.dart:import "package:ebisu/ebisu.dart";
./lib/ebisu_compiler.dart:import "package:pathos/path.dart" as path;
./lib/ebisu_dart_meta.dart:import "dart:io";
./lib/ebisu_dart_meta.dart:import "dart:json";
./lib/ebisu_dart_meta.dart:import "package:ebisu/ebisu.dart";
./lib/ebisu_dart_meta.dart:import "package:ebisu/ebisu_id.dart";
./lib/ebisu_dart_meta.dart:import "package:ebisu/ebisu_utils.dart" as EBISU_UTILS;
./lib/ebisu_dart_meta.dart:import "templates/dart_meta.dart" as META;
./lib/ebisu_id.dart:import "dart:io";
./lib/ebisu_id.dart:import "package:ebisu/ebisu.dart";
./lib/ebisu_id.dart:import "package:pathos/path.dart" as path;
./lib/ebisu_id.dart:import "ebisu_utils.dart" as EBISU_UTILS;
./lib/ebisu_utils.dart:import "dart:math";
./lib/src/ebisu_compiler/compiler.dart:import "package:ebisu/ebisu.dart";
./lib/src/ebisu_compiler/compiler.dart:import "package:ebisu/ebisu_dart_meta.dart";
./lib/templates/dart_meta.dart:import "package:ebisu/ebisu.dart";
./lib/templates/dart_meta.dart:import "package:ebisu/ebisu_dart_meta.dart";
./test/ebisu_functions.dart:import "package:ebisu/ebisu.dart";
4

0 回答 0