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

Unified Diff: pkg/docgen/lib/docgen.dart

Issue 52723007: Revert "Change dart:io Platform.script to return a Uri." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart ('k') | pkg/http_server/test/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/docgen.dart
diff --git a/pkg/docgen/lib/docgen.dart b/pkg/docgen/lib/docgen.dart
index 1d147c700b939ff33238a2477ac1a655d24d329c..7378afe7899d9ec67d73edf848f0bb4bf8b64721 100644
--- a/pkg/docgen/lib/docgen.dart
+++ b/pkg/docgen/lib/docgen.dart
@@ -249,7 +249,8 @@ Future<MirrorSystem> getMirrorSystem(List<String> args, {String packageRoot,
var libraries = !parseSdk ? _listLibraries(args) : _listSdk();
if (libraries.isEmpty) throw new StateError('No Libraries.');
// Finds the root of SDK library based off the location of docgen.
- var sdkRoot = Platform.script.resolve('../../../sdk').toFilePath();
+ var sdkRoot = path.join(path.dirname(path.dirname(path.dirname(path.dirname(
+ path.absolute(Platform.script))))), 'sdk');
logger.info('SDK Root: ${sdkRoot}');
return _analyzeLibraries(libraries, sdkRoot, packageRoot: packageRoot);
}
@@ -478,9 +479,10 @@ void _mdnComment(Indexable item) {
//Check if MDN is loaded.
if (_mdn == null) {
// Reading in MDN related json file.
- var mdnDatabase =
- Platform.script.resolve('../../../utils/apidoc/mdn/database.json');
- _mdn = JSON.decode(new File(mdnDatabase.toFilePath()).readAsStringSync());
+ var mdnDir = path.join(path.dirname(path.dirname(path.dirname(path.dirname(
+ path.absolute(Platform.script))))), 'utils', 'apidoc', 'mdn');
+ _mdn = JSON.decode(new File(path.join(mdnDir, 'database.json'))
+ .readAsStringSync());
}
if (item.comment.isNotEmpty) return;
var domAnnotation = item.annotations.firstWhere(
« no previous file with comments | « pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart ('k') | pkg/http_server/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698