Revert "dump-info: Use relative paths for library canonicalUri..."

This reverts commit 7fe8659613.

Reason for revert: we decided to take an alternative approach to solve the problem.

Original change's description:
> dump-info: Use relative paths for library canonicalUri...
> 
> ...if they are within the working directory
> 
> Makes output from dump-info more stable, especially with pkg:build
> 
> Change-Id: I3e6c444a0aa7df55c10e1bdff4b59ef035d2acc3
> Reviewed-on: https://dart-review.googlesource.com/53168
> Reviewed-by: Harry Terkelsen <het@google.com>
> Commit-Queue: Kevin Moore <kevmoo@google.com>

TBR=kevmoo@google.com,het@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I701847cf8879599c3d129a83809b8fe1c9d9d172
Reviewed-on: https://dart-review.googlesource.com/54141
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
Sigmund Cherem 2018-05-08 02:00:52 +00:00 committed by commit-bot@chromium.org
parent e10f0717d2
commit 2e1c17e5c1
2 changed files with 1 additions and 14 deletions

View file

@ -8,7 +8,6 @@ import 'dart:convert'
show ChunkedConversionSink, JsonEncoder, StringConversionSink;
import 'package:dart2js_info/info.dart';
import 'package:path/path.dart' as p;
import '../compiler_new.dart';
import 'common/names.dart';
@ -78,17 +77,7 @@ class ElementInfoCollector {
libname = '<unnamed>';
}
int size = compiler.dumpInfoTask.sizeOf(lib);
var uri = lib.canonicalUri;
if (Uri.base.isScheme('file') && lib.canonicalUri.isScheme('file')) {
var basePath = p.fromUri(Uri.base);
var libPath = p.fromUri(lib.canonicalUri);
if (p.isWithin(basePath, libPath)) {
uri = p.toUri(p.relative(libPath, from: basePath));
}
}
LibraryInfo info = new LibraryInfo(libname, uri, null, size);
LibraryInfo info = new LibraryInfo(libname, lib.canonicalUri, null, size);
_entityToInfo[lib] = info;
environment.forEachLibraryMember(lib, (MemberEntity member) {

View file

@ -19,8 +19,6 @@ dependencies:
path: ../../third_party/pkg/dart2js_info
front_end:
path: ../front_end
path:
path: ../../third_party/pkg/path
dependency_overrides:
front_end:
path: ../front_end