File tree Expand file tree Collapse file tree 4 files changed +18
-9
lines changed Expand file tree Collapse file tree 4 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 1+ ## 0.5.0+1
2+ * [ bug] fixed an issue running dartdoc as a pub global activated snapshot
3+
14## 0.5.0
25* [ health] remove calls to deprecated methods
36* [ health] remove workaround when sorting empty iterable
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ export 'src/package_meta.dart';
3636
3737const String name = 'dartdoc' ;
3838// Update when pubspec version changes.
39- const String version = '0.5.0' ;
39+ const String version = '0.5.0+1 ' ;
4040
4141final String defaultOutDir = 'doc${Platform .pathSeparator }api' ;
4242
Original file line number Diff line number Diff line change @@ -26,11 +26,15 @@ Future<String> loadAsString(String path) {
2626 if (! path.startsWith ('package:' )) {
2727 throw new ArgumentError ('path must begin with package:' );
2828 }
29- return new Resource (path).readAsString ().catchError ((_) async {
30- // TODO: Remove once https://github.com/dart-lang/pub/issues/22 is fixed.
31- var bytes = await _doLoad (path);
32- return new String .fromCharCodes (bytes);
33- });
29+
30+ try {
31+ return new Resource (path).readAsString ().catchError ((_) {
32+ // TODO: Remove once https://github.com/dart-lang/pub/issues/22 is fixed.
33+ return _doLoad (path).then ((bytes) => new String .fromCharCodes (bytes));
34+ });
35+ } catch (_) {
36+ return _doLoad (path).then ((bytes) => new String .fromCharCodes (bytes));
37+ }
3438}
3539
3640/// Loads a `package:` resource as an [List<int>] .
@@ -39,10 +43,12 @@ Future<List<int>> loadAsBytes(String path) {
3943 throw new ArgumentError ('path must begin with package:' );
4044 }
4145
42- return new Resource (path). readAsBytes (). catchError ((_) {
46+ try {
4347 // TODO: Remove once https://github.com/dart-lang/pub/issues/22 is fixed.
48+ return new Resource (path).readAsBytes ().catchError ((_) => _doLoad (path));
49+ } catch (_) {
4450 return _doLoad (path);
45- });
51+ }
4652}
4753
4854/// Determine how to do the load. HTTP? Snapshotted? From source?
Original file line number Diff line number Diff line change 11name : dartdoc
22# Also update the `version` field in lib/dartdoc.dart.
3- version : 0.5.0
3+ version : 0.5.0+1
44author :
Dart Team <[email protected] > 55description : A documentation generator for Dart.
66homepage : https://github.com/dart-lang/dartdoc
You can’t perform that action at this time.
0 commit comments