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
6c88b2e9
Unverified
Commit
6c88b2e9
authored
Nov 07, 2018
by
Jonah Williams
Committed by
GitHub
Nov 07, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore compileExpressionService (#24063)
parent
fe6798bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
flutter_platform.dart
packages/flutter_tools/lib/src/test/flutter_platform.dart
+25
-0
No files found.
packages/flutter_tools/lib/src/test/flutter_platform.dart
View file @
6c88b2e9
...
...
@@ -28,6 +28,7 @@ import '../bundle.dart';
import
'../compile.dart'
;
import
'../dart/package_map.dart'
;
import
'../globals.dart'
;
import
'../vmservice.dart'
;
import
'watcher.dart'
;
/// The timeout we give the test process to connect to the test harness
...
...
@@ -450,6 +451,22 @@ class _FlutterPlatform extends PlatformPlugin {
return
remoteChannel
;
}
Future
<
String
>
_compileExpressionService
(
String
isolateId
,
String
expression
,
List
<
String
>
definitions
,
List
<
String
>
typeDefinitions
,
String
libraryUri
,
String
klass
,
bool
isStatic
,
)
async
{
if
(
compiler
==
null
||
compiler
.
compiler
==
null
)
{
throw
'Compiler is not set up properly to compile
$expression
'
;
}
final
CompilerOutput
compilerOutput
=
await
compiler
.
compiler
.
compileExpression
(
expression
,
definitions
,
typeDefinitions
,
libraryUri
,
klass
,
isStatic
);
if
(
compilerOutput
!=
null
&&
compilerOutput
.
outputFilename
!=
null
)
{
return
base64
.
encode
(
fs
.
file
(
compilerOutput
.
outputFilename
).
readAsBytesSync
());
}
throw
'Failed to compile
$expression
'
;
}
Future
<
_AsyncError
>
_startTest
(
String
testPath
,
StreamChannel
<
dynamic
>
controller
,
...
...
@@ -573,6 +590,14 @@ class _FlutterPlatform extends PlatformPlugin {
printTrace
(
'test
$ourTestCount
: using observatory uri
$detectedUri
from pid
${process.pid}
'
);
}
processObservatoryUri
=
detectedUri
;
{
printTrace
(
'Connecting to service protocol:
$processObservatoryUri
'
);
final
Future
<
VMService
>
localVmService
=
VMService
.
connect
(
processObservatoryUri
,
compileExpression:
_compileExpressionService
);
localVmService
.
then
((
VMService
vmservice
)
{
printTrace
(
'Successfully connected to service protocol:
$processObservatoryUri
'
);
});
}
gotProcessObservatoryUri
.
complete
();
watcher
?.
handleStartedProcess
(
ProcessEvent
(
ourTestCount
,
process
,
processObservatoryUri
));
...
...
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