Skip to content

Commit 5de2352

Browse files
natebiggsCommit Queue
authored andcommitted
[dart2wasm] Fix URI resolution for wasm compiled on windows.
Reverts the change applied to `option.dart` here: https://dart-review.googlesource.com/c/sdk/+/397721/63/pkg/dart2wasm/lib/option.dart Fixes: #60126 Change-Id: I13629f79fd2b6d8990f2c32da0c5aa0a7d7f8046 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/409781 Commit-Queue: Martin Kustermann <[email protected]> Auto-Submit: Nate Biggs <[email protected]> Reviewed-by: Morgan :) <[email protected]> Reviewed-by: Martin Kustermann <[email protected]>
1 parent 539b0e2 commit 5de2352

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pkg/dart2wasm/lib/option.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
import 'dart:io' show Directory;
6+
57
import 'package:args/args.dart';
68
import 'package:front_end/src/api_unstable/vm.dart' show resolveInputUri;
79

@@ -104,6 +106,6 @@ class UriMultiOption extends MultiValueOption<Uri> {
104106
UriMultiOption(
105107
name, void Function(WasmCompilerOptions o, List<Uri> v) applyToOptions,
106108
{Iterable<String>? defaultsTo})
107-
: super(name, applyToOptions, (v) => Uri.base.resolve(v),
109+
: super(name, applyToOptions, (v) => Uri.file(Directory(v).absolute.path),
108110
defaultsTo: defaultsTo);
109111
}

pkg/dynamic_modules/test/runner/dart2wasm.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Dart2wasmExecutor implements TargetExecutor {
6060
var testDir = _tmp.uri.resolve(testName).toFilePath();
6161
var args = [
6262
'--packages=${repoRoot.toFilePath()}/.dart_tool/package_config.json',
63-
'--multi-root=${sourceDir.resolve('../../')}',
63+
'--multi-root=${sourceDir.resolve('../../').toFilePath()}',
6464
'--multi-root-scheme=$rootScheme',
6565
// This is required while binaryen lacks support for partially closed
6666
// world optimizations.

0 commit comments

Comments
 (0)