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

Unified Diff: lib/src/codegen/html_codegen.dart

Issue 1145243013: Check for duplicate library names (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Address comments Created 5 years, 6 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/runtime/dart_runtime.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/codegen/html_codegen.dart
diff --git a/lib/src/codegen/html_codegen.dart b/lib/src/codegen/html_codegen.dart
index 890646ede99c0aee5f98361141b300447b054d3a..2f1908b42ee5b6aab180af711ee10c8c99131814 100644
--- a/lib/src/codegen/html_codegen.dart
+++ b/lib/src/codegen/html_codegen.dart
@@ -13,7 +13,7 @@ import 'package:dev_compiler/src/dependency_graph.dart';
import 'package:dev_compiler/src/options.dart';
import 'package:dev_compiler/src/utils.dart' show colorOf, resourceOutputPath;
-import 'js_codegen.dart' show jsLibraryName, jsOutputPath;
+import 'js_codegen.dart' show jsOutputPath, jsOutputBase;
/// Emits an entry point HTML file corresponding to [inputFile] that can load
/// the code generated by the dev compiler.
@@ -82,8 +82,8 @@ String generateEntryHtml(HtmlSourceNode root, CompilerOptions options) {
for (var lib in libraries) {
var info = lib.info;
if (info == null) continue;
- if (info.isEntry) mainLibraryName = jsLibraryName(info.library);
- var jsPath = jsOutputPath(info, root.uri);
+ var jsPath = jsOutputPath(info.library, root.uri);
+ if (info.isEntry) mainLibraryName = jsOutputBase(info.library, root.uri);
if (lib.cachingHash != null) {
jsPath = _addHash(jsPath, lib.cachingHash);
}
@@ -104,7 +104,7 @@ Node _invokeMain(String mainLibraryName) {
? 'console.error("dev_compiler error: main was not generated");'
// TODO(vsm): Can we simplify this?
// See: https://github.com/dart-lang/dev_compiler/issues/164
- : '_isolate_helper.startRootIsolate($mainLibraryName.main, []);';
+ : "dart.start('$mainLibraryName');";
return parseFragment('<script>$code</script>\n');
}
« no previous file with comments | « lib/runtime/dart_runtime.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698