| Index: dart/pkg/compiler/lib/src/library_loader.dart
|
| diff --git a/dart/pkg/compiler/lib/src/library_loader.dart b/dart/pkg/compiler/lib/src/library_loader.dart
|
| index 8debbe7c92c3ddc79c02608ea5041816dfd72286..25b5288781eff6ca010471d8278addac13d6c346 100644
|
| --- a/dart/pkg/compiler/lib/src/library_loader.dart
|
| +++ b/dart/pkg/compiler/lib/src/library_loader.dart
|
| @@ -435,23 +435,8 @@ class _LibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
|
| });
|
| }
|
|
|
| - /// True if the uris are pointing to a library that is shared between dart2js
|
| - /// and the core libraries. By construction they must be imported into the
|
| - /// runtime, and, at the same time, into dart2js. This can lead to
|
| - /// duplicated imports, like in the docgen.
|
| - // TODO(johnniwinther): is this necessary, or should we change docgen not
|
| - // to include both libraries (compiler and lib) at the same time?
|
| - bool _isSharedDart2jsLibrary(Uri uri1, Uri uri2) {
|
| - bool inJsLibShared(Uri uri) {
|
| - List<String> segments = uri.pathSegments;
|
| - if (segments.length < 3) return false;
|
| - if (segments[segments.length - 2] != 'shared') return false;
|
| - return (segments[segments.length - 3] == 'js_lib');
|
| - }
|
| - return inJsLibShared(uri1) && inJsLibShared(uri2);
|
| - }
|
| -
|
| void checkDuplicatedLibraryName(LibraryElement library) {
|
| + if (library.isInternalLibrary) return;
|
| Uri resourceUri = library.entryCompilationUnit.script.resourceUri;
|
| LibraryName tag = library.libraryTag;
|
| LibraryElement existing =
|
| @@ -476,8 +461,7 @@ class _LibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
|
| } else if (tag != null) {
|
| String name = library.getLibraryOrScriptName();
|
| existing = libraryNames.putIfAbsent(name, () => library);
|
| - if (!identical(existing, library) &&
|
| - !_isSharedDart2jsLibrary(resourceUri, existing.canonicalUri)) {
|
| + if (!identical(existing, library)) {
|
| compiler.withCurrentElement(library, () {
|
| compiler.reportWarning(tag.name,
|
| MessageKind.DUPLICATED_LIBRARY_NAME,
|
| @@ -525,7 +509,7 @@ class _LibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
|
| Future registerLibraryFromTag(LibraryDependencyHandler handler,
|
| LibraryElement library,
|
| LibraryDependency tag) {
|
| - Uri base = library.entryCompilationUnit.script.readableUri;
|
| + Uri base = library.canonicalUri;
|
| Uri resolvedUri = base.resolve(tag.uri.dartString.slowToString());
|
| return createLibrary(handler, library, resolvedUri, tag.uri)
|
| .then((LibraryElement loadedLibrary) {
|
|
|