Skip to content

Commit b3bd2e9

Browse files
johnniwinthercommit-bot@chromium.org
authored andcommitted
[cfe] Fix git access in presubmit script on Windows
Change-Id: I6c871264dc1fff39b19421ce1f5513eb2e56901d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163061 Reviewed-by: Jens Johansen <[email protected]> Commit-Queue: Johnni Winther <[email protected]>
1 parent 44b765f commit b3bd2e9

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

pkg/front_end/lib/src/fasta/source/source_library_builder.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1903,7 +1903,9 @@ class SourceLibraryBuilder extends LibraryBuilderImpl {
19031903
isMixinDeclaration ? null : supertype,
19041904
isNamedMixinApplication
19051905
? interfaces
1906-
: isMixinDeclaration ? [supertype, mixin] : null,
1906+
: isMixinDeclaration
1907+
? [supertype, mixin]
1908+
: null,
19071909
null, // No `on` clause types.
19081910
new Scope(
19091911
local: <String, MemberBuilder>{},

pkg/front_end/test/testing_utils.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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 Platform, Process, ProcessResult;
5+
import 'dart:io' show Directory, Process, ProcessResult;
66

77
import 'package:testing/testing.dart' show Chain, TestDescription;
88

@@ -21,9 +21,9 @@ Stream<TestDescription> filterList(
2121
}
2222

2323
Future<Set<Uri>> getGitFiles(Chain suite) async {
24-
ProcessResult result = await Process.run(
25-
Platform.isWindows ? "git.bat" : "git", ["ls-files", "."],
26-
workingDirectory: suite.uri.path);
24+
ProcessResult result = await Process.run("git", ["ls-files", "."],
25+
workingDirectory: new Directory.fromUri(suite.uri).absolute.path,
26+
runInShell: true);
2727
String stdout = result.stdout;
2828
return stdout
2929
.split(new RegExp('^', multiLine: true))

pkg/kernel/lib/transformations/mixin_full_resolution.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ class SuperCallResolutionTransformer extends Transformer {
325325
hierarchy.getDispatchTarget(lookupClass, new Name("noSuchMethod"));
326326
String methodNameUsed = (isGetter)
327327
? "get:$methodName"
328-
: (isSetter) ? "set:$methodName=" : methodName;
328+
: (isSetter)
329+
? "set:$methodName="
330+
: methodName;
329331
if (noSuchMethod != null &&
330332
noSuchMethod.function.positionalParameters.length == 1 &&
331333
noSuchMethod.function.namedParameters.isEmpty) {

pkg/vm/lib/transformations/ffi_definitions.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,9 @@ class _FfiDefinitionTransformer extends FfiTransformer {
406406
// _fromAddress<Int8>(_loadIntPtr(pointer, offset));
407407
final loadMethod = isPointer
408408
? loadMethods[NativeType.kIntptr]
409-
: optimizedTypes.contains(type) ? loadMethods[type] : loadStructMethod;
409+
: optimizedTypes.contains(type)
410+
? loadMethods[type]
411+
: loadStructMethod;
410412
Expression getterReturnValue = StaticInvocation(
411413
loadMethod,
412414
Arguments([

0 commit comments

Comments
 (0)