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

Unified Diff: lib/src/utils.dart

Issue 1145993003: Fix asset and SDK path detection. (Closed) Base URL: git@github.com:dart-lang/pub_test@master
Patch Set: Code review changes Created 5 years, 7 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/sdk.dart ('k') | test/real_version_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/utils.dart
diff --git a/lib/src/utils.dart b/lib/src/utils.dart
index d0eb936f7f818d5e0b4eac6013e3952cbb251cd0..9693b8098340a066c58e8c2de255717702b33998 100644
--- a/lib/src/utils.dart
+++ b/lib/src/utils.dart
@@ -9,16 +9,12 @@ import 'dart:async';
import "dart:convert";
import 'dart:io';
-// This is used by [libraryPath]. It must be kept up-to-date with all libraries
-// whose paths are looked up using that function.
-@MirrorsUsed(targets: const ['pub.io', 'test_pub'])
-import 'dart:mirrors';
-
import "package:crypto/crypto.dart";
import 'package:path/path.dart' as path;
import "package:stack_trace/stack_trace.dart";
import 'exceptions.dart';
+import 'io.dart';
import 'log.dart' as log;
export '../../asset/dart/utils.dart';
@@ -784,16 +780,6 @@ Future awaitObject(object) {
});
}
-/// Returns the path to the library named [libraryName].
-///
-/// The library name must be globally unique, or the wrong library path may be
-/// returned. Any libraries accessed must be added to the [MirrorsUsed]
-/// declaration in the import above.
-String libraryPath(String libraryName) {
- var lib = currentMirrorSystem().findLibrary(new Symbol(libraryName));
- return path.fromUri(lib.uri);
-}
-
/// Whether "special" strings such as Unicode characters or color escapes are
/// safe to use.
///
« no previous file with comments | « lib/src/sdk.dart ('k') | test/real_version_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698