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

Side by Side Diff: pkg/front_end/lib/src/fasta/translate_uri.dart

Issue 2906673002: Read file names from libraries.json, not URIs. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.translate_uri; 5 library fasta.translate_uri;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'dart:convert' show JSON; 9 import 'dart:convert' show JSON;
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 } 92 }
93 93
94 Future<Map<String, Uri>> computeLibraries( 94 Future<Map<String, Uri>> computeLibraries(
95 FileSystem fileSystem, Uri uri) async { 95 FileSystem fileSystem, Uri uri) async {
96 if (uri == null) return const <String, Uri>{}; 96 if (uri == null) return const <String, Uri>{};
97 Map<String, String> libraries = JSON 97 Map<String, String> libraries = JSON
98 .decode(await fileSystem.entityForUri(uri).readAsString())["libraries"]; 98 .decode(await fileSystem.entityForUri(uri).readAsString())["libraries"];
99 Map<String, Uri> result = <String, Uri>{}; 99 Map<String, Uri> result = <String, Uri>{};
100 libraries.forEach((String name, String path) { 100 libraries.forEach((String name, String path) {
101 result[name] = uri.resolve(path); 101 result[name] = uri.resolveUri(new Uri.file(path));
102 }); 102 });
103 return result; 103 return result;
104 } 104 }
105 105
106 Future<Map<String, List<Uri>>> computePatches( 106 Future<Map<String, List<Uri>>> computePatches(
107 FileSystem fileSystem, Uri uri) async { 107 FileSystem fileSystem, Uri uri) async {
108 // TODO(ahe): Read patch information. 108 // TODO(ahe): Read patch information.
109 return const <String, List<Uri>>{}; 109 return const <String, List<Uri>>{};
110 } 110 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698