Skip to content

Commit 279c1da

Browse files
jakemac53commit-bot@chromium.org
authored andcommitted
Use absolute paths as canonical paths for inputs digest maps
Change-Id: I9a6c5efe22d4ef1f46393e2983084fe0b8a4652b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107682 Reviewed-by: David Morgan <[email protected]> Reviewed-by: Jens Johansen <[email protected]> Commit-Queue: Jake Macdonald <[email protected]>
1 parent cbf9cff commit 279c1da

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

pkg/dev_compiler/bin/dartdevc.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,7 @@ class _CompilerWorker extends AsyncWorkerLoop {
5656
/// Build a map of uris to digests.
5757
final inputDigests = <Uri, List<int>>{};
5858
for (var input in request.inputs) {
59-
var uri = Uri.parse(input.path);
60-
if (uri.scheme.isEmpty) {
61-
uri = Uri.parse('file://${input.path}');
62-
}
63-
inputDigests[uri] = input.digest;
59+
inputDigests[Uri.base.resolve(input.path)] = input.digest;
6460
}
6561

6662
lastResult = await runZoned(

utils/bazel/kernel_worker.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,7 @@ Future<ComputeKernelResult> computeKernel(List<String> args,
250250
/// Build a map of uris to digests.
251251
final inputDigests = <Uri, List<int>>{};
252252
for (var input in inputs) {
253-
var uri = Uri.parse(input.path);
254-
if (uri.scheme.isEmpty) {
255-
uri = Uri.parse('file://${input.path}');
256-
}
257-
inputDigests[uri] = input.digest;
253+
inputDigests[_toUri(input.path)] = input.digest;
258254
}
259255

260256
// TODO(sigmund): add support for experiments with the incremental compiler.

0 commit comments

Comments
 (0)