Index: bin/debug_info.dart |
diff --git a/bin/debug_info.dart b/bin/debug_info.dart |
index f0dd47bb98796c90ab04dd3674fbc1ab666824af..3c091141e003f24f0f455032ea6815ed9497f88f 100644 |
--- a/bin/debug_info.dart |
+++ b/bin/debug_info.dart |
@@ -6,23 +6,20 @@ |
/// that it is consistent and that it covers all the data we expect it to cover. |
library dart2js_info.bin.debug_info; |
-import 'dart:convert'; |
import 'dart:io'; |
import 'package:dart2js_info/info.dart'; |
import 'package:dart2js_info/src/graph.dart'; |
import 'package:dart2js_info/src/util.dart'; |
-main(args) { |
+main(args) async { |
if (args.length < 1) { |
print('usage: dart tool/debug_info.dart path-to-info.json ' |
'[--show-library libname]'); |
exit(1); |
} |
- var filename = args[0]; |
- var json = JSON.decode(new File(filename).readAsStringSync()); |
- var info = new AllInfoJsonCodec().decode(json); |
+ var info = await infoFromFile(args.first); |
var debugLibName; |
if (args.length > 2 && args[1] == '--show-library') { |