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

Unified Diff: lib/src/utils.dart

Issue 1145243013: Check for duplicate library names (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rework with canonical names 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
Index: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index 96166b0998e1e7293bde20fc0c3f7e1a34b89aac..b72536af799037850ad73bd02bf80dda822fb2dc 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -49,6 +49,10 @@ String canonicalLibraryName(LibraryElement library) {
return _toIdentifier(name);
}
+String canonicalLibraryUri(LibraryElement library) {
+ return '${library.source.uri}';
+}
+
/// Escape [name] to make it into a valid identifier.
String _toIdentifier(String name) {
if (name.length == 0) return r'$';

Powered by Google App Engine
This is Rietveld 408576698