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

Unified Diff: lib/src/server/server.dart

Issue 1270993002: fixes #276, path manipulation issues on windows. Also fixes server mode (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/options.dart ('k') | test/codegen/expect/js_test.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/server/server.dart
diff --git a/lib/src/server/server.dart b/lib/src/server/server.dart
index 13b9b244df75428328f5d5dd789545f4d92c2f16..0a15d2d15dfc02b51a060a22e9dd7cf3a4a839c8 100644
--- a/lib/src/server/server.dart
+++ b/lib/src/server/server.dart
@@ -246,7 +246,7 @@ class DevServer {
? SourceResolverOptions.implicitHtmlFile
: entryPath;
- Future<bool> start() async {
+ Future start() async {
// Create output directory if needed. shelf_static will fail otherwise.
var out = new Directory(outDir);
if (!await out.exists()) await out.create(recursive: true);
@@ -257,8 +257,7 @@ class DevServer {
defaultDocument: _entryPath));
await shelf.serve(handler, host, port);
print('Serving $_entryPath at http://$host:$port/');
- CheckerResults results = compiler.run();
- return !results.failure;
+ // Never returns
Leaf 2015/08/04 22:27:59 I don't follow this comment. Does shelf.serve nev
Jennifer Messerly 2015/08/04 22:41:36 Good catch, the comment is wrong. Removed. Also re
}
shelf.Handler rebuildAndCache(shelf.Handler handler) => (request) {
@@ -285,11 +284,11 @@ class DevServer {
}
UriResolver _createImplicitEntryResolver(String entryPath) {
- var entry = path.absolute(SourceResolverOptions.implicitHtmlFile);
- var src = path.absolute(entryPath);
+ var entry = path.toUri(path.absolute(SourceResolverOptions.implicitHtmlFile));
+ var src = path.toUri(path.absolute(entryPath));
var provider = new MemoryResourceProvider();
provider.newFile(
- entry, '<body><script type="application/dart" src="$src"></script>');
+ entry.path, '<body><script type="application/dart" src="$src"></script>');
return new _ExistingSourceUriResolver(new ResourceUriResolver(provider));
}
« no previous file with comments | « lib/src/options.dart ('k') | test/codegen/expect/js_test.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698