Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(331)

Side by Side Diff: pkg/analyzer/tool/summary/inspect.dart

Issue 1905173002: Add a debugging tool for inspecting the contents of a summary file. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'dart:io';
6
7 import 'package:analyzer/src/summary/idl.dart';
8 import 'package:analyzer/src/summary/inspect.dart';
9
10 main(List<String> args) {
11 if (args.length != 1) {
12 print('Usage: inspect PATH');
13 exitCode = 1;
14 return;
15 }
16 String path = args[0];
17 List<int> bytes = new File(path).readAsBytesSync();
18 PackageBundle bundle = new PackageBundle.fromBuffer(bytes);
19 SummaryInspector inspector = new SummaryInspector();
20 print(inspector.dumpPackageBundle(bundle).join('\n'));
21 }
OLDNEW
« pkg/analyzer/lib/src/summary/inspect.dart ('K') | « pkg/analyzer/lib/src/summary/inspect.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698