I am trying to create dart code documentation. I noticed that I cannot create documentation through DartDoc, because sometimes inside my library I need to import some external libraries.
Below is a small example that shows my actual problem.
listController.dart
part of controllers;
@NgController (
selector: '[list-control]',
publishAs: 'listCtrl'
)
class ListController {
}
controllers.dart
library controllers;
import 'package:angular/angular.dart';
part 'listController.dart';
The end result on the console
Running dartdoc...
Using snapshot /Users/ecomtemarois/Downloads/dart/dart-sdk/bin/snapshots/utils_wrapper.dart.snapshot
Analyzing libraries...
../../../Documents/ecash.dart/ecash/controllers/controllers.dart:3:8: Error: Can't read 'package:angular/angular.dart' (Error reading 'packages/angular/angular.dart' (OS Error: No such file or directory, errno = 2)).
import 'package:angular/angular.dart';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../../../Documents/ecash.dart/ecash/controllers/listController.dart:3:2: Error: Cannot resolve 'NgController'.
@NgController (
^^^^^^^^^^^^
../../../Documents/ecash.dart/ecash/controllers/listController.dart:3:1: Error: Not a compile-time constant.
@NgController (
^^^^^^^^^^^^^^^^
Error: generation failed: Bad state: Failed to create mirror system.
StackTrace: #0 analyze.<anonymous closure> (file:///Volumes/data/b/build/slave/dart-editor-mac-trunk/build/dart/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart:232)
I would like to know how to access these packages and still be able to generate documentation.
thanks
source
share