Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d0d8e6ed
Unverified
Commit
d0d8e6ed
authored
Oct 30, 2019
by
Zachary Anderson
Committed by
GitHub
Oct 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tool] Teach the tool about local engine Fuchsia artifacts (#43759)
parent
417449e2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
80 additions
and
122 deletions
+80
-122
artifacts.dart
packages/flutter_tools/lib/src/artifacts.dart
+29
-21
build_system.dart
...ages/flutter_tools/lib/src/build_system/build_system.dart
+3
-0
dart.dart
...ages/flutter_tools/lib/src/build_system/targets/dart.dart
+16
-2
codegen.dart
packages/flutter_tools/lib/src/codegen.dart
+6
-1
fuchsia_device.dart
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
+0
-18
fuchsia_kernel_compiler.dart
...lutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart
+3
-3
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+18
-3
run_test.dart
.../flutter_tools/test/commands.shard/hermetic/run_test.dart
+3
-0
dart_test.dart
...ls/test/general.shard/build_system/targets/dart_test.dart
+0
-2
fuchsia_device_test.dart
...tools/test/general.shard/fuchsia/fuchsia_device_test.dart
+2
-72
No files found.
packages/flutter_tools/lib/src/artifacts.dart
View file @
d0d8e6ed
...
...
@@ -61,8 +61,6 @@ enum Artifact {
// Fuchsia artifacts from the engine prebuilts.
fuchsiaKernelCompiler
,
fuchsiaPlatformDill
,
fuchsiaPatchedSdk
,
fuchsiaFlutterJitRunner
,
}
...
...
@@ -138,10 +136,6 @@ String _artifactToFileName(Artifact artifact, [ TargetPlatform platform, BuildMo
return
'flutter_ddc_sdk.dill'
;
case
Artifact
.
fuchsiaKernelCompiler
:
return
'kernel_compiler.snapshot'
;
case
Artifact
.
fuchsiaPlatformDill
:
return
'platform_strong.dill'
;
case
Artifact
.
fuchsiaPatchedSdk
:
return
'flutter_runner_patched_sdk'
;
case
Artifact
.
fuchsiaFlutterJitRunner
:
if
(
mode
==
BuildMode
.
debug
||
mode
==
BuildMode
.
profile
)
{
return
'flutter_jit_runner-0.far'
;
...
...
@@ -245,18 +239,17 @@ class CachedArtifacts extends Artifacts {
final
String
hostPlatform
=
getNameForHostPlatform
(
getCurrentHostPlatform
());
return
fs
.
path
.
join
(
engineDir
,
hostPlatform
,
_artifactToFileName
(
artifact
));
default
:
assert
(
false
,
'Artifact
$artifact
not available for platform
$platform
.'
);
return
null
;
return
_getHostArtifactPath
(
artifact
,
platform
,
mode
);
}
}
String
_getIosArtifactPath
(
Artifact
artifact
,
TargetPlatform
platform
,
BuildMode
mode
)
{
final
String
artifactFileName
=
_artifactToFileName
(
artifact
);
switch
(
artifact
)
{
case
Artifact
.
genSnapshot
:
case
Artifact
.
snapshotDart
:
case
Artifact
.
flutterFramework
:
case
Artifact
.
frontendServerSnapshotForEngineDartSdk
:
final
String
artifactFileName
=
_artifactToFileName
(
artifact
);
final
String
engineDir
=
_getEngineArtifactsPath
(
platform
,
mode
);
return
fs
.
path
.
join
(
engineDir
,
artifactFileName
);
case
Artifact
.
ideviceId
:
...
...
@@ -264,21 +257,23 @@ class CachedArtifacts extends Artifacts {
case
Artifact
.
idevicescreenshot
:
case
Artifact
.
idevicesyslog
:
case
Artifact
.
idevicename
:
final
String
artifactFileName
=
_artifactToFileName
(
artifact
);
return
cache
.
getArtifactDirectory
(
'libimobiledevice'
).
childFile
(
artifactFileName
).
path
;
case
Artifact
.
iosDeploy
:
final
String
artifactFileName
=
_artifactToFileName
(
artifact
);
return
cache
.
getArtifactDirectory
(
'ios-deploy'
).
childFile
(
artifactFileName
).
path
;
case
Artifact
.
ideviceinstaller
:
final
String
artifactFileName
=
_artifactToFileName
(
artifact
);
return
cache
.
getArtifactDirectory
(
'ideviceinstaller'
).
childFile
(
artifactFileName
).
path
;
case
Artifact
.
iproxy
:
final
String
artifactFileName
=
_artifactToFileName
(
artifact
);
return
cache
.
getArtifactDirectory
(
'usbmuxd'
).
childFile
(
artifactFileName
).
path
;
default
:
assert
(
false
,
'Artifact
$artifact
not available for platform
$platform
.'
);
return
null
;
return
_getHostArtifactPath
(
artifact
,
platform
,
mode
);
}
}
String
_getFuchsiaArtifactPath
(
Artifact
artifact
,
TargetPlatform
platform
,
BuildMode
mode
)
{
final
String
artifactFileName
=
_artifactToFileName
(
artifact
,
platform
,
mode
);
final
String
root
=
fs
.
path
.
join
(
cache
.
getArtifactDirectory
(
'flutter_runner'
).
path
,
'flutter'
,
...
...
@@ -286,16 +281,20 @@ class CachedArtifacts extends Artifacts {
getNameForBuildMode
(
mode
),
);
switch
(
artifact
)
{
case
Artifact
.
flutterPatchedSdkPath
:
const
String
artifactFileName
=
'flutter_runner_patched_sdk'
;
return
fs
.
path
.
join
(
root
,
'jit'
,
artifactFileName
);
case
Artifact
.
platformKernelDill
:
final
String
artifactFileName
=
_artifactToFileName
(
artifact
,
platform
,
mode
);
return
fs
.
path
.
join
(
root
,
'jit'
,
'flutter_runner_patched_sdk'
,
artifactFileName
);
case
Artifact
.
fuchsiaKernelCompiler
:
final
String
artifactFileName
=
_artifactToFileName
(
artifact
,
platform
,
mode
);
return
fs
.
path
.
join
(
root
,
'jit'
,
'dart_binaries'
,
artifactFileName
);
case
Artifact
.
fuchsiaPlatformDill
:
return
fs
.
path
.
join
(
root
,
'jit'
,
'flutter_runner_patched_sdk'
,
artifactFileName
);
case
Artifact
.
fuchsiaPatchedSdk
:
case
Artifact
.
fuchsiaFlutterJitRunner
:
final
String
artifactFileName
=
_artifactToFileName
(
artifact
,
platform
,
mode
);
return
fs
.
path
.
join
(
root
,
'jit'
,
artifactFileName
);
default
:
assert
(
false
,
'Artifact
$artifact
not available for platform
$platform
.'
);
return
null
;
return
_getHostArtifactPath
(
artifact
,
platform
,
mode
);
}
}
...
...
@@ -423,6 +422,9 @@ class LocalEngineArtifacts extends Artifacts {
case
Artifact
.
vmSnapshotData
:
return
fs
.
path
.
join
(
engineOutPath
,
'gen'
,
'flutter'
,
'lib'
,
'snapshot'
,
artifactFileName
);
case
Artifact
.
platformKernelDill
:
if
(
platform
==
TargetPlatform
.
fuchsia_x64
||
platform
==
TargetPlatform
.
fuchsia_arm64
)
{
return
fs
.
path
.
join
(
engineOutPath
,
'flutter_runner_patched_sdk'
,
artifactFileName
);
}
return
fs
.
path
.
join
(
_getFlutterPatchedSdkPath
(
mode
),
artifactFileName
);
case
Artifact
.
platformLibrariesJson
:
return
fs
.
path
.
join
(
_getFlutterPatchedSdkPath
(
mode
),
'lib'
,
artifactFileName
);
...
...
@@ -435,6 +437,9 @@ class LocalEngineArtifacts extends Artifacts {
// what was specified in [mode] argument because local engine will
// have only one flutter_patched_sdk in standard location, that
// is happen to be what debug(non-release) mode is using.
if
(
platform
==
TargetPlatform
.
fuchsia_x64
||
platform
==
TargetPlatform
.
fuchsia_arm64
)
{
return
fs
.
path
.
join
(
engineOutPath
,
'flutter_runner_patched_sdk'
);
}
return
_getFlutterPatchedSdkPath
(
BuildMode
.
debug
);
case
Artifact
.
flutterWebSdk
:
return
_getFlutterWebSdkPath
();
...
...
@@ -473,11 +478,14 @@ class LocalEngineArtifacts extends Artifacts {
case
Artifact
.
webPlatformKernelDill
:
return
fs
.
path
.
join
(
_getFlutterWebSdkPath
(),
'kernel'
,
_artifactToFileName
(
artifact
));
case
Artifact
.
fuchsiaKernelCompiler
:
case
Artifact
.
fuchsiaPlatformDill
:
case
Artifact
.
fuchsiaPatchedSdk
:
final
String
hostPlatform
=
getNameForHostPlatform
(
getCurrentHostPlatform
());
final
String
dartBinaries
=
'dart_binaries-
$mode
-
$hostPlatform
'
;
return
fs
.
path
.
join
(
engineOutPath
,
'host_bundle'
,
dartBinaries
,
'kernel_compiler.dart.snapshot'
);
case
Artifact
.
fuchsiaFlutterJitRunner
:
assert
(
false
,
'Invalid local engine artifact
$artifact
.'
);
return
null
;
if
(
mode
==
BuildMode
.
debug
||
mode
==
BuildMode
.
profile
)
{
return
fs
.
path
.
join
(
engineOutPath
,
'flutter_jit_runner-0.far'
);
}
return
fs
.
path
.
join
(
engineOutPath
,
'flutter_jit_product_runner-0.far'
);
}
assert
(
false
,
'Invalid artifact
$artifact
.'
);
return
null
;
...
...
packages/flutter_tools/lib/src/build_system/build_system.dart
View file @
d0d8e6ed
...
...
@@ -575,6 +575,9 @@ class ExceptionMeasurement {
final
String
target
;
final
dynamic
exception
;
final
StackTrace
stackTrace
;
@override
String
toString
()
=>
'target:
$target
\n
exception:
$exception
\n
$stackTrace
'
;
}
/// Helper class to collect measurement data.
...
...
packages/flutter_tools/lib/src/build_system/targets/dart.dart
View file @
d0d8e6ed
...
...
@@ -207,19 +207,33 @@ class KernelSnapshot extends Target {
if
(
environment
.
defines
[
kBuildMode
]
==
null
)
{
throw
MissingDefineException
(
kBuildMode
,
'kernel_snapshot'
);
}
if
(
environment
.
defines
[
kTargetPlatform
]
==
null
)
{
throw
MissingDefineException
(
kTargetPlatform
,
'kernel_snapshot'
);
}
final
BuildMode
buildMode
=
getBuildModeForName
(
environment
.
defines
[
kBuildMode
]);
final
String
targetFile
=
environment
.
defines
[
kTargetFile
]
??
fs
.
path
.
join
(
'lib'
,
'main.dart'
);
final
String
packagesPath
=
environment
.
projectDir
.
childFile
(
'.packages'
).
path
;
final
String
targetFileAbsolute
=
fs
.
file
(
targetFile
).
absolute
.
path
;
// everything besides 'false' is considered to be enabled.
final
bool
trackWidgetCreation
=
environment
.
defines
[
kTrackWidgetCreation
]
!=
'false'
;
final
TargetPlatform
targetPlatform
=
getTargetPlatformForName
(
environment
.
defines
[
kTargetPlatform
]);
TargetModel
targetModel
=
TargetModel
.
flutter
;
if
(
targetPlatform
==
TargetPlatform
.
fuchsia_x64
||
targetPlatform
==
TargetPlatform
.
fuchsia_arm64
)
{
targetModel
=
TargetModel
.
flutterRunner
;
}
final
CompilerOutput
output
=
await
compiler
.
compile
(
sdkRoot:
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
,
mode:
buildMode
),
sdkRoot:
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
,
platform:
targetPlatform
,
mode:
buildMode
,
),
aot:
buildMode
!=
BuildMode
.
debug
,
buildMode:
buildMode
,
trackWidgetCreation:
trackWidgetCreation
&&
buildMode
==
BuildMode
.
debug
,
targetModel:
TargetModel
.
flutter
,
targetModel:
targetModel
,
outputFilePath:
environment
.
buildDir
.
childFile
(
'app.dill'
).
path
,
packagesPath:
packagesPath
,
linkPlatformKernelIn:
buildMode
==
BuildMode
.
release
,
...
...
packages/flutter_tools/lib/src/codegen.dart
View file @
d0d8e6ed
...
...
@@ -171,10 +171,15 @@ class CodeGeneratingResidentCompiler implements ResidentCompiler {
String
outputPath
,
String
initializeFromDill
,
bool
runCold
=
false
,
TargetPlatform
targetPlatform
,
})
async
{
codeGenerator
.
updatePackages
(
flutterProject
);
final
ResidentCompiler
residentCompiler
=
ResidentCompiler
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
),
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
,
platform:
targetPlatform
,
mode:
buildMode
,
),
buildMode:
buildMode
,
trackWidgetCreation:
trackWidgetCreation
,
packagesPath:
PackageMap
.
globalGeneratedPackagesPath
,
...
...
packages/flutter_tools/lib/src/fuchsia/fuchsia_device.dart
View file @
d0d8e6ed
...
...
@@ -432,24 +432,6 @@ class FuchsiaDevice extends Device {
@override
void
clearLogs
()
{}
@override
OverrideArtifacts
get
artifactOverrides
{
return
_artifactOverrides
??=
OverrideArtifacts
(
parent:
Artifacts
.
instance
,
platformKernelDill:
fs
.
file
(
artifacts
.
getArtifactPath
(
Artifact
.
fuchsiaPlatformDill
,
platform:
TargetPlatform
.
fuchsia_x64
,
mode:
BuildMode
.
debug
,
)),
flutterPatchedSdk:
fs
.
file
(
artifacts
.
getArtifactPath
(
Artifact
.
fuchsiaPatchedSdk
,
platform:
TargetPlatform
.
fuchsia_x64
,
mode:
BuildMode
.
debug
,
)),
);
}
OverrideArtifacts
_artifactOverrides
;
@override
bool
get
supportsScreenshot
=>
false
;
...
...
packages/flutter_tools/lib/src/fuchsia/fuchsia_kernel_compiler.dart
View file @
d0d8e6ed
...
...
@@ -38,13 +38,13 @@ class FuchsiaKernelCompiler {
final
String
kernelCompiler
=
artifacts
.
getArtifactPath
(
Artifact
.
fuchsiaKernelCompiler
,
platform:
TargetPlatform
.
fuchsia_x64
,
// This file is not arch-specific.
mode:
BuildMode
.
debug
,
mode:
buildInfo
.
mode
,
);
if
(!
fs
.
isFileSync
(
kernelCompiler
))
{
throwToolExit
(
'Fuchisa kernel compiler not found at "
$kernelCompiler
"'
);
}
final
String
platformDill
=
artifacts
.
getArtifactPath
(
Artifact
.
fuchsiaPlatform
Dill
,
Artifact
.
platformKernel
Dill
,
platform:
TargetPlatform
.
fuchsia_x64
,
// This file is not arch-specific.
mode:
buildInfo
.
mode
,
);
...
...
@@ -92,7 +92,7 @@ class FuchsiaKernelCompiler {
final
List
<
String
>
command
=
<
String
>[
artifacts
.
getArtifactPath
(
Artifact
.
engineDartBinary
),
artifacts
.
getArtifactPath
(
Artifact
.
fuchsiaKernelCompiler
)
,
kernelCompiler
,
...
flags
,
];
final
Process
process
=
await
processUtils
.
start
(
command
);
...
...
packages/flutter_tools/lib/src/resident_runner.dart
View file @
d0d8e6ed
...
...
@@ -37,12 +37,17 @@ class FlutterDevice {
this
.
fileSystemScheme
,
this
.
viewFilter
,
TargetModel
targetModel
=
TargetModel
.
flutter
,
TargetPlatform
targetPlatform
,
List
<
String
>
experimentalFlags
,
ResidentCompiler
generator
,
@required
BuildMode
buildMode
,
})
:
assert
(
trackWidgetCreation
!=
null
),
generator
=
generator
??
ResidentCompiler
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
,
mode:
buildMode
),
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
,
platform:
targetPlatform
,
mode:
buildMode
,
),
buildMode:
buildMode
,
trackWidgetCreation:
trackWidgetCreation
,
fileSystemRoots:
fileSystemRoots
,
...
...
@@ -66,8 +71,12 @@ class FlutterDevice {
ResidentCompiler
generator
,
})
async
{
ResidentCompiler
generator
;
final
TargetPlatform
targetPlatform
=
await
device
.
targetPlatform
;
if
(
device
.
platformType
==
PlatformType
.
fuchsia
)
{
targetModel
=
TargetModel
.
flutterRunner
;
}
if
(
featureFlags
.
isWebIncrementalCompilerEnabled
&&
await
device
.
targetPlatform
==
TargetPlatform
.
web_javascript
)
{
targetPlatform
==
TargetPlatform
.
web_javascript
)
{
generator
=
ResidentCompiler
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterWebSdk
,
mode:
buildMode
),
buildMode:
buildMode
,
...
...
@@ -80,12 +89,17 @@ class FlutterDevice {
);
}
else
if
(
flutterProject
.
hasBuilders
)
{
generator
=
await
CodeGeneratingResidentCompiler
.
create
(
targetPlatform:
targetPlatform
,
buildMode:
buildMode
,
flutterProject:
flutterProject
,
);
}
else
{
generator
=
ResidentCompiler
(
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
,
mode:
buildMode
),
artifacts
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
,
platform:
targetPlatform
,
mode:
buildMode
,
),
buildMode:
buildMode
,
trackWidgetCreation:
trackWidgetCreation
,
fileSystemRoots:
fileSystemRoots
,
...
...
@@ -102,6 +116,7 @@ class FlutterDevice {
viewFilter:
viewFilter
,
experimentalFlags:
experimentalFlags
,
targetModel:
targetModel
,
targetPlatform:
targetPlatform
,
generator:
generator
,
buildMode:
buildMode
,
);
...
...
packages/flutter_tools/test/commands.shard/hermetic/run_test.dart
View file @
d0d8e6ed
...
...
@@ -231,6 +231,9 @@ class FakeDevice extends Fake implements Device {
@override
Future
<
TargetPlatform
>
get
targetPlatform
async
=>
_targetPlatform
;
@override
final
PlatformType
platformType
=
PlatformType
.
ios
;
@override
Future
<
LaunchResult
>
startApp
(
ApplicationPackage
package
,
{
...
...
packages/flutter_tools/test/general.shard/build_system/targets/dart_test.dart
View file @
d0d8e6ed
...
...
@@ -236,7 +236,6 @@ flutter_tools:lib/''');
expect
(
result
.
exceptions
.
values
.
single
.
exception
,
isInstanceOf
<
MissingDefineException
>());
}));
test
(
'aot_elf_profile throws error if missing target platform'
,
()
=>
testbed
.
run
(()
async
{
final
BuildResult
result
=
await
buildSystem
.
build
(
const
AotElfProfile
(),
androidEnvironment
..
defines
.
remove
(
kTargetPlatform
));
...
...
@@ -244,7 +243,6 @@ flutter_tools:lib/''');
expect
(
result
.
exceptions
.
values
.
single
.
exception
,
isInstanceOf
<
MissingDefineException
>());
}));
test
(
'aot_assembly_profile throws error if missing build mode'
,
()
=>
testbed
.
run
(()
async
{
final
BuildResult
result
=
await
buildSystem
.
build
(
const
AotAssemblyProfile
(),
iosEnvironment
..
defines
.
remove
(
kBuildMode
));
...
...
packages/flutter_tools/test/general.shard/fuchsia/fuchsia_device_test.dart
View file @
d0d8e6ed
...
...
@@ -126,76 +126,6 @@ void main() {
});
});
group
(
'Fuchsia device artifact overrides'
,
()
{
MemoryFileSystem
memoryFileSystem
;
File
devFinder
;
File
sshConfig
;
File
platformDill
;
File
patchedSdk
;
MockArtifacts
mockArtifacts
;
setUp
(()
{
memoryFileSystem
=
MemoryFileSystem
();
devFinder
=
memoryFileSystem
.
file
(
'dev_finder'
);
sshConfig
=
memoryFileSystem
.
file
(
'ssh_config'
);
platformDill
=
memoryFileSystem
.
file
(
'platform_strong.dill'
);
patchedSdk
=
memoryFileSystem
.
file
(
'flutter_runner_patched_sdk'
);
mockArtifacts
=
MockArtifacts
();
when
(
mockArtifacts
.
getArtifactPath
(
Artifact
.
fuchsiaPlatformDill
,
platform:
anyNamed
(
'platform'
),
mode:
anyNamed
(
'mode'
),
)).
thenReturn
(
platformDill
.
path
);
when
(
mockArtifacts
.
getArtifactPath
(
Artifact
.
fuchsiaPatchedSdk
,
platform:
anyNamed
(
'platform'
),
mode:
anyNamed
(
'mode'
),
)).
thenReturn
(
patchedSdk
.
path
);
});
testUsingContext
(
'exist'
,
()
async
{
final
FuchsiaDevice
device
=
FuchsiaDevice
(
'fuchsia-device'
);
expect
(
device
.
artifactOverrides
,
isNotNull
);
expect
(
device
.
artifactOverrides
.
platformKernelDill
.
path
,
equals
(
platformDill
.
path
));
expect
(
device
.
artifactOverrides
.
flutterPatchedSdk
.
path
,
equals
(
patchedSdk
.
path
));
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
mockArtifacts
,
FileSystem:
()
=>
memoryFileSystem
,
FuchsiaArtifacts:
()
=>
FuchsiaArtifacts
(
sshConfig:
sshConfig
,
devFinder:
devFinder
,
),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
testUsingContext
(
'are used'
,
()
async
{
final
FuchsiaDevice
device
=
FuchsiaDevice
(
'fuchsia-device'
);
expect
(
device
.
artifactOverrides
,
isNotNull
);
expect
(
device
.
artifactOverrides
.
platformKernelDill
.
path
,
equals
(
platformDill
.
path
));
expect
(
device
.
artifactOverrides
.
flutterPatchedSdk
.
path
,
equals
(
patchedSdk
.
path
));
await
context
.
run
<
void
>(
body:
()
{
expect
(
Artifacts
.
instance
.
getArtifactPath
(
Artifact
.
platformKernelDill
),
equals
(
platformDill
.
path
));
expect
(
Artifacts
.
instance
.
getArtifactPath
(
Artifact
.
flutterPatchedSdkPath
),
equals
(
patchedSdk
.
path
));
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
device
.
artifactOverrides
,
},
);
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
mockArtifacts
,
FileSystem:
()
=>
memoryFileSystem
,
FuchsiaArtifacts:
()
=>
FuchsiaArtifacts
(
sshConfig:
sshConfig
,
devFinder:
devFinder
,
),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
});
});
group
(
'displays friendly error when'
,
()
{
MockProcessManager
mockProcessManager
;
MockProcessResult
mockProcessResult
;
...
...
@@ -480,12 +410,12 @@ void main() {
mode:
anyNamed
(
'mode'
),
)).
thenReturn
(
compilerSnapshot
.
path
);
when
(
mockArtifacts
.
getArtifactPath
(
Artifact
.
fuchsiaPlatform
Dill
,
Artifact
.
platformKernel
Dill
,
platform:
anyNamed
(
'platform'
),
mode:
anyNamed
(
'mode'
),
)).
thenReturn
(
platformDill
.
path
);
when
(
mockArtifacts
.
getArtifactPath
(
Artifact
.
f
uchsiaPatchedSdk
,
Artifact
.
f
lutterPatchedSdkPath
,
platform:
anyNamed
(
'platform'
),
mode:
anyNamed
(
'mode'
),
)).
thenReturn
(
patchedSdk
.
path
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment