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

Side by Side Diff: lib/src/dart.dart

Issue 1231893004: Always pass absolute paths to dart2js. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 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 | « lib/src/barback/dart2js_transformer.dart ('k') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /// A library for compiling Dart code and manipulating analyzer parse trees. 5 /// A library for compiling Dart code and manipulating analyzer parse trees.
6 library pub.dart; 6 library pub.dart;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:isolate'; 10 import 'dart:isolate';
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 if (environment == null) environment = {}; 96 if (environment == null) environment = {};
97 if (commandLineOptions != null) options.addAll(commandLineOptions); 97 if (commandLineOptions != null) options.addAll(commandLineOptions);
98 98
99 if (packageRoot == null) { 99 if (packageRoot == null) {
100 packageRoot = path.join(path.dirname(entrypoint), 'packages'); 100 packageRoot = path.join(path.dirname(entrypoint), 'packages');
101 } 101 }
102 102
103 return compiler.compile( 103 return compiler.compile(
104 path.toUri(entrypoint), 104 path.toUri(path.absolute(entrypoint)),
105 provider.libraryRoot, 105 provider.libraryRoot,
106 path.toUri(appendSlash(packageRoot)), 106 path.toUri(appendSlash(path.absolute(packageRoot))),
107 provider.provideInput, 107 provider.provideInput,
108 provider.handleDiagnostic, 108 provider.handleDiagnostic,
109 options, 109 options,
110 provider.provideOutput, 110 provider.provideOutput,
111 environment); 111 environment);
112 }); 112 });
113 } 113 }
114 114
115 /// Returns whether [dart] looks like an entrypoint file. 115 /// Returns whether [dart] looks like an entrypoint file.
116 bool isEntrypoint(CompilationUnit dart) { 116 bool isEntrypoint(CompilationUnit dart) {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 Isolate.spawnUri(Uri.parse(message['uri']), [], message['message'], 215 Isolate.spawnUri(Uri.parse(message['uri']), [], message['message'],
216 packageRoot: packageRoot) 216 packageRoot: packageRoot)
217 .then((_) => replyTo.send({'type': 'success'})) 217 .then((_) => replyTo.send({'type': 'success'}))
218 .catchError((e, stack) { 218 .catchError((e, stack) {
219 replyTo.send({ 219 replyTo.send({
220 'type': 'error', 220 'type': 'error',
221 'error': CrossIsolateException.serialize(e, stack) 221 'error': CrossIsolateException.serialize(e, stack)
222 }); 222 });
223 }); 223 });
224 } 224 }
OLDNEW
« no previous file with comments | « lib/src/barback/dart2js_transformer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698