Skip to content

Commit

Permalink
Revert "dump-info: Use relative paths for library canonicalUri..."
Browse files Browse the repository at this point in the history
This reverts commit 7fe8659.

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>
  • Loading branch information
sigmundch authored and commit-bot@chromium.org committed May 8, 2018
1 parent e10f071 commit 2e1c17e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 1 addition & 12 deletions pkg/compiler/lib/src/dump_info.dart
Expand Up @@ -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';
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 0 additions & 2 deletions pkg/compiler/pubspec.yaml
Expand Up @@ -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
Expand Down

0 comments on commit 2e1c17e

Please sign in to comment.