Closed
Description
Here is an example package:
http://filebin.ca/2B2DDfWYrFNu/docdemo.zip
Here is a diff version of that zip:
diff --git a/packages/test b/packages/test
new file mode 120000
index 0000000..187d1b6
--- /dev/null
+++ b/packages/test
@@ -0,0 +1 @@
+../test/lib
\ No newline at end of file
diff --git a/test/lib/one.dart b/test/lib/one.dart
new file mode 100644
index 0000000..e4aa859
--- /dev/null
+++ b/test/lib/one.dart
@@ -0,0 +1,4 @@
+import 'packages:test/two.dart';
+
+class One {
+}
diff --git a/test/lib/two.dart b/test/lib/two.dart
new file mode 100644
index 0000000..a5a8403
--- /dev/null
+++ b/test/lib/two.dart
@@ -0,0 +1,2 @@
+class Two {
+}
diff --git a/test/pubspec.yaml b/test/pubspec.yaml
new file mode 100644
index 0000000..b327536
--- /dev/null
+++ b/test/pubspec.yaml
@@ -0,0 +1 @@
+name: test
(Note that in the above diff packages/test is a symlink, that's just the way git diff represents it.)
Now attempt to run dartdoc:
%dartdoc --input test
Generating documentation for 'test' into /src/docdemo/doc/api/
parsing test/lib/two.dart...
parsing test/lib/one.dart...
Parsed 2 files in 3.0 seconds.
[error] Target of URI does not exist: 'packages:test/two.dart' at /src/docdemo/test/lib/one.dart, line 1.
Generation failed: encountered 1 analysis error.
Now try with a --package-root:
dartdoc --input test --package-root packages
Generating documentation for 'test' into /src/docdemo/doc/api/
parsing test/lib/two.dart...
parsing test/lib/one.dart...
Parsed 2 files in 3.0 seconds.
[error] Target of URI does not exist: 'packages:test/two.dart' at /src/docdemo/test/lib/one.dart, line 1.
Generation failed: encountered 1 analysis error.
It appears the package-root is just being ignored.