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
cb69bbb4
Unverified
Commit
cb69bbb4
authored
Aug 10, 2020
by
Michael Klimushyn
Committed by
GitHub
Aug 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused `l` and `--isolate-filter` tools (#63336)
parent
ba92cbed
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
0 additions
and
496 deletions
+0
-496
named_isolates_test.dart
dev/devicelab/bin/tasks/named_isolates_test.dart
+0
-117
manifest.yaml
dev/devicelab/manifest.yaml
+0
-7
README.md
dev/integration_tests/named_isolates/README.md
+0
-1
build.gradle
...integration_tests/named_isolates/android/app/build.gradle
+0
-52
AndroidManifest.xml
...s/named_isolates/android/app/src/main/AndroidManifest.xml
+0
-31
MainActivity.java
...roid/app/src/main/java/com/example/view/MainActivity.java
+0
-74
flutter_view_layout.xml
...s/android/app/src/main/res/layout/flutter_view_layout.xml
+0
-26
build.gradle
dev/integration_tests/named_isolates/android/build.gradle
+0
-33
gradle.properties
...ntegration_tests/named_isolates/android/gradle.properties
+0
-4
gradle-wrapper.properties
...isolates/android/gradle/wrapper/gradle-wrapper.properties
+0
-6
settings.gradle
dev/integration_tests/named_isolates/android/settings.gradle
+0
-15
main.dart
dev/integration_tests/named_isolates/lib/main.dart
+0
-27
pubspec.yaml
dev/integration_tests/named_isolates/pubspec.yaml
+0
-21
fuchsia_attach.dart
packages/flutter_tools/bin/fuchsia_attach.dart
+0
-2
resident_web_runner.dart
...utter_tools/lib/src/build_runner/resident_web_runner.dart
+0
-5
attach.dart
packages/flutter_tools/lib/src/commands/attach.dart
+0
-2
daemon.dart
packages/flutter_tools/lib/src/commands/daemon.dart
+0
-1
run.dart
packages/flutter_tools/lib/src/commands/run.dart
+0
-2
resident_runner.dart
packages/flutter_tools/lib/src/resident_runner.dart
+0
-23
flutter_command.dart
packages/flutter_tools/lib/src/runner/flutter_command.dart
+0
-8
resident_runner_test.dart
...lutter_tools/test/general.shard/resident_runner_test.dart
+0
-25
terminal_handler_test.dart
...utter_tools/test/general.shard/terminal_handler_test.dart
+0
-14
No files found.
dev/devicelab/bin/tasks/named_isolates_test.dart
deleted
100644 → 0
View file @
ba92cbed
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:async'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'package:meta/meta.dart'
;
import
'package:path/path.dart'
as
path
;
import
'package:flutter_devicelab/framework/adb.dart'
;
import
'package:flutter_devicelab/framework/framework.dart'
;
import
'package:flutter_devicelab/framework/utils.dart'
;
const
String
_kActivityId
=
'io.flutter.examples.named_isolates/com.example.view.MainActivity'
;
const
String
_kFirstIsolateName
=
'first isolate name'
;
const
String
_kSecondIsolateName
=
'second isolate name'
;
void
main
(
)
{
task
(()
async
{
final
AndroidDevice
device
=
await
devices
.
workingDevice
as
AndroidDevice
;
await
device
.
unlock
();
section
(
'Compile and run the tester app'
);
Completer
<
void
>
firstNameFound
=
Completer
<
void
>();
Completer
<
void
>
secondNameFound
=
Completer
<
void
>();
final
Process
runProcess
=
await
_run
(
device:
device
,
command:
<
String
>[
'run'
,
'--disable-service-auth-codes'
,
'--no-fast-start'
],
stdoutListener:
(
String
line
)
{
if
(
line
.
contains
(
_kFirstIsolateName
))
{
firstNameFound
.
complete
();
}
else
if
(
line
.
contains
(
_kSecondIsolateName
))
{
secondNameFound
.
complete
();
}
});
section
(
'Verify all the debug isolate names are set'
);
runProcess
.
stdin
.
write
(
'l'
);
await
Future
.
wait
<
dynamic
>(<
Future
<
dynamic
>>[
firstNameFound
.
future
,
secondNameFound
.
future
])
.
timeout
(
const
Duration
(
seconds:
1
),
onTimeout:
()
=>
throw
'Isolate names not found.'
);
await
_quitRunner
(
runProcess
);
section
(
'Attach to the second debug isolate'
);
firstNameFound
=
Completer
<
void
>();
secondNameFound
=
Completer
<
void
>();
final
String
currentTime
=
(
await
device
.
shellEval
(
'date'
,
<
String
>[
'"+%F %R:%S.000"'
])).
trim
();
await
device
.
shellExec
(
'am'
,
<
String
>[
'start'
,
'-n'
,
_kActivityId
]);
final
String
observatoryLine
=
await
device
.
adb
(<
String
>[
'logcat'
,
'-e'
,
'Observatory listening on http:'
,
'-m'
,
'1'
,
'-T'
,
currentTime
]);
print
(
'Found observatory line:
$observatoryLine
'
);
final
String
observatoryUri
=
RegExp
(
r'Observatory listening on ((http|//)[a-zA-Z0-9:/=_\-\.\[\]]+)'
).
firstMatch
(
observatoryLine
)[
1
];
print
(
'Extracted observatory port:
$observatoryUri
'
);
final
Process
attachProcess
=
await
_run
(
device:
device
,
command:
<
String
>[
'attach'
,
'--debug-uri'
,
observatoryUri
,
'--isolate-filter'
,
_kSecondIsolateName
],
stdoutListener:
(
String
line
)
{
if
(
line
.
contains
(
_kFirstIsolateName
))
{
firstNameFound
.
complete
();
}
else
if
(
line
.
contains
(
_kSecondIsolateName
))
{
secondNameFound
.
complete
();
}
});
attachProcess
.
stdin
.
write
(
'l'
);
await
secondNameFound
.
future
;
if
(
firstNameFound
.
isCompleted
)
throw
'--isolate-filter failed to attach to a specific isolate'
;
await
_quitRunner
(
attachProcess
);
return
TaskResult
.
success
(
null
);
});
}
Future
<
Process
>
_run
({
@required
Device
device
,
@required
List
<
String
>
command
,
@required
Function
(
String
)
stdoutListener
})
async
{
final
Directory
appDir
=
dir
(
path
.
join
(
flutterDirectory
.
path
,
'dev/integration_tests/named_isolates'
));
Process
runner
;
bool
observatoryConnected
=
false
;
await
inDirectory
(
appDir
,
()
async
{
runner
=
await
startProcess
(
path
.
join
(
flutterDirectory
.
path
,
'bin'
,
'flutter'
),
<
String
>[
'--suppress-analytics'
,
'-d'
,
device
.
deviceId
,
...
command
],
isBot:
false
,
// we just want to test the output, not have any debugging info
);
final
StreamController
<
String
>
stdout
=
StreamController
<
String
>.
broadcast
();
// Mirror output to stdout, listen for ready message
final
Completer
<
void
>
appReady
=
Completer
<
void
>();
runner
.
stdout
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
const
LineSplitter
())
.
listen
((
String
line
)
{
print
(
'run:stdout:
$line
'
);
stdout
.
add
(
line
);
if
(
parseServicePort
(
line
)
!=
null
)
{
appReady
.
complete
();
observatoryConnected
=
true
;
}
stdoutListener
(
line
);
});
runner
.
stderr
.
transform
<
String
>(
utf8
.
decoder
)
.
transform
<
String
>(
const
LineSplitter
())
.
listen
((
String
line
)
{
stderr
.
writeln
(
'run:stderr:
$line
'
);
});
// Wait for either the process to fail or for the run to begin.
await
Future
.
any
<
dynamic
>(<
Future
<
dynamic
>>[
appReady
.
future
,
runner
.
exitCode
]);
if
(!
observatoryConnected
)
throw
'Failed to find service port when running `
${command.join(' ')}
`'
;
});
return
runner
;
}
Future
<
void
>
_quitRunner
(
Process
runner
)
async
{
runner
.
stdin
.
write
(
'q'
);
final
int
result
=
await
runner
.
exitCode
;
if
(
result
!=
0
)
throw
'Received unexpected exit code
$result
when quitting process.'
;
}
dev/devicelab/manifest.yaml
View file @
cb69bbb4
...
@@ -420,13 +420,6 @@ tasks:
...
@@ -420,13 +420,6 @@ tasks:
# required_agent_capabilities: ["linux/android"]
# required_agent_capabilities: ["linux/android"]
# flaky: true
# flaky: true
named_isolates_test
:
description
:
>
Tests naming and attaching to specific isolates.
stage
:
devicelab
required_agent_capabilities
:
[
"
linux/android"
]
flaky
:
true
# https://github.com/flutter/flutter/issues/63016
linux_chrome_dev_mode
:
linux_chrome_dev_mode
:
description
:
>
description
:
>
Run flutter web on the devicelab and hot restart.
Run flutter web on the devicelab and hot restart.
...
...
dev/integration_tests/named_isolates/README.md
deleted
100644 → 0
View file @
ba92cbed
Integration app for testing multiple named isolates.
\ No newline at end of file
dev/integration_tests/named_isolates/android/app/build.gradle
deleted
100644 → 0
View file @
ba92cbed
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
def
localProperties
=
new
Properties
()
def
localPropertiesFile
=
rootProject
.
file
(
'local.properties'
)
if
(
localPropertiesFile
.
exists
())
{
localPropertiesFile
.
withInputStream
{
stream
->
localProperties
.
load
(
stream
)
}
}
def
flutterRoot
=
localProperties
.
getProperty
(
'flutter.sdk'
)
if
(
flutterRoot
==
null
)
{
throw
new
GradleException
(
"Flutter SDK not found. Define location with flutter.sdk in the local.properties file."
)
}
apply
plugin:
'com.android.application'
apply
from:
"$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android
{
compileSdkVersion
28
lintOptions
{
disable
'InvalidPackage'
}
defaultConfig
{
applicationId
"io.flutter.examples.named_isolates"
minSdkVersion
16
targetSdkVersion
28
versionCode
1
versionName
"0.0.1"
}
buildTypes
{
release
{
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig
signingConfigs
.
debug
}
}
}
flutter
{
source
'../..'
}
dependencies
{
implementation
'androidx.appcompat:appcompat:1.1.0'
implementation
'com.google.android.material:material:1.0.0'
}
dev/integration_tests/named_isolates/android/app/src/main/AndroidManifest.xml
deleted
100644 → 0
View file @
ba92cbed
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.example.view"
>
<!-- The INTERNET permission is required for development. Specifically, flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission
android:name=
"android.permission.INTERNET"
/>
<!-- io.flutter.app.FlutterApplication is an android.app.Application that
calls FlutterMain.startInitialization(this); in its onCreate method.
In most cases you can leave this as-is, but you if you want to provide
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name=
"io.flutter.app.FlutterApplication"
android:label=
"named_isolates"
>
<activity
android:name=
".MainActivity"
android:launchMode=
"singleTop"
android:theme=
"@style/Theme.AppCompat"
android:configChanges=
"orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated=
"true"
android:windowSoftInputMode=
"adjustResize"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
</application>
</manifest>
dev/integration_tests/named_isolates/android/app/src/main/java/com/example/view/MainActivity.java
deleted
100644 → 0
View file @
ba92cbed
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package
com
.
example
.
view
;
import
android.content.Intent
;
import
android.os.Bundle
;
import
android.view.View
;
import
android.widget.TextView
;
import
androidx.appcompat.app.ActionBar
;
import
androidx.appcompat.app.AppCompatActivity
;
import
io.flutter.plugin.common.BasicMessageChannel
;
import
io.flutter.plugin.common.BasicMessageChannel.MessageHandler
;
import
io.flutter.plugin.common.BasicMessageChannel.Reply
;
import
io.flutter.plugin.common.StringCodec
;
import
io.flutter.view.FlutterMain
;
import
io.flutter.view.FlutterRunArguments
;
import
io.flutter.view.FlutterView
;
import
java.util.ArrayList
;
public
class
MainActivity
extends
AppCompatActivity
{
private
FlutterView
firstFlutterView
;
private
FlutterView
secondFlutterView
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
FlutterMain
.
ensureInitializationComplete
(
getApplicationContext
(),
null
);
setContentView
(
R
.
layout
.
flutter_view_layout
);
ActionBar
supportActionBar
=
getSupportActionBar
();
if
(
supportActionBar
!=
null
)
{
supportActionBar
.
hide
();
}
FlutterRunArguments
firstRunArguments
=
new
FlutterRunArguments
();
firstRunArguments
.
bundlePath
=
FlutterMain
.
findAppBundlePath
(
getApplicationContext
());
firstRunArguments
.
entrypoint
=
"first"
;
firstFlutterView
=
findViewById
(
R
.
id
.
first
);
firstFlutterView
.
runFromBundle
(
firstRunArguments
);
FlutterRunArguments
secondRunArguments
=
new
FlutterRunArguments
();
secondRunArguments
.
bundlePath
=
FlutterMain
.
findAppBundlePath
(
getApplicationContext
());
secondRunArguments
.
entrypoint
=
"second"
;
secondFlutterView
=
findViewById
(
R
.
id
.
second
);
secondFlutterView
.
runFromBundle
(
secondRunArguments
);
}
@Override
protected
void
onDestroy
()
{
if
(
firstFlutterView
!=
null
)
{
firstFlutterView
.
destroy
();
}
if
(
secondFlutterView
!=
null
)
{
secondFlutterView
.
destroy
();
}
super
.
onDestroy
();
}
@Override
protected
void
onPause
()
{
super
.
onPause
();
firstFlutterView
.
onPause
();
secondFlutterView
.
onPause
();
}
@Override
protected
void
onPostResume
()
{
super
.
onPostResume
();
firstFlutterView
.
onPostResume
();
secondFlutterView
.
onPostResume
();
}
}
dev/integration_tests/named_isolates/android/app/src/main/res/layout/flutter_view_layout.xml
deleted
100644 → 0
View file @
ba92cbed
<!-- Copyright 2014 The Flutter Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<io.flutter.view.FlutterView
android:id=
"@+id/first"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
/>
<io.flutter.view.FlutterView
android:id=
"@+id/second"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
/>
</LinearLayout>
dev/integration_tests/named_isolates/android/build.gradle
deleted
100644 → 0
View file @
ba92cbed
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
buildscript
{
repositories
{
google
()
jcenter
()
}
dependencies
{
classpath
'com.android.tools.build:gradle:3.5.0'
}
}
allprojects
{
repositories
{
google
()
jcenter
()
}
}
rootProject
.
buildDir
=
'../build'
subprojects
{
project
.
buildDir
=
"${rootProject.buildDir}/${project.name}"
}
subprojects
{
project
.
evaluationDependsOn
(
':app'
)
}
task
clean
(
type:
Delete
)
{
delete
rootProject
.
buildDir
}
dev/integration_tests/named_isolates/android/gradle.properties
deleted
100644 → 0
View file @
ba92cbed
org.gradle.jvmargs
=
-Xmx1536M
android.useAndroidX
=
true
android.enableJetifier
=
true
android.enableR8
=
true
dev/integration_tests/named_isolates/android/gradle/wrapper/gradle-wrapper.properties
deleted
100644 → 0
View file @
ba92cbed
#Fri Jun 23 08:50:38 CEST 2017
distributionBase
=
GRADLE_USER_HOME
distributionPath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
zipStorePath
=
wrapper/dists
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-5.6.2-all.zip
dev/integration_tests/named_isolates/android/settings.gradle
deleted
100644 → 0
View file @
ba92cbed
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
include
':app'
def
localPropertiesFile
=
new
File
(
rootProject
.
projectDir
,
"local.properties"
)
def
properties
=
new
Properties
()
assert
localPropertiesFile
.
exists
()
localPropertiesFile
.
withReader
(
"UTF-8"
)
{
reader
->
properties
.
load
(
reader
)
}
def
flutterSdkPath
=
properties
.
getProperty
(
"flutter.sdk"
)
assert
flutterSdkPath
!=
null
,
"flutter.sdk not set in local.properties"
apply
from:
"$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
dev/integration_tests/named_isolates/lib/main.dart
deleted
100644 → 0
View file @
ba92cbed
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:ui'
as
ui
;
import
'package:flutter/material.dart'
;
// named_isolates_test depends on these values.
const
String
_kFirstIsolateName
=
'first isolate name'
;
const
String
_kSecondIsolateName
=
'second isolate name'
;
void
first
(
)
{
_run
(
_kFirstIsolateName
);
}
void
second
(
)
{
_run
(
_kSecondIsolateName
);
}
void
_run
(
String
name
)
{
ui
.
window
.
setIsolateDebugName
(
name
);
runApp
(
Center
(
child:
Text
(
name
,
textDirection:
TextDirection
.
ltr
)));
}
// `first` and `second` are the actual entrypoints to this app, but dart specs
// require a main function.
void
main
(
)
{
}
dev/integration_tests/named_isolates/pubspec.yaml
deleted
100644 → 0
View file @
ba92cbed
name
:
named_isolates
description
:
Tester app for naming specific isolates.
environment
:
# The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
sdk
:
"
>=2.0.0-dev.68.0
<3.0.0"
dependencies
:
flutter
:
sdk
:
flutter
characters
:
1.1.0-nullsafety.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection
:
1.15.0-nullsafety.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
meta
:
1.3.0-nullsafety.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
typed_data
:
1.3.0-nullsafety.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
vector_math
:
2.1.0-nullsafety.2
# THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
flutter
:
uses-material-design
:
true
# PUBSPEC CHECKSUM: 98a5
packages/flutter_tools/bin/fuchsia_attach.dart
View file @
cb69bbb4
...
@@ -83,8 +83,6 @@ Future<void> main(List<String> args) async {
...
@@ -83,8 +83,6 @@ Future<void> main(List<String> args) async {
'attach'
,
'attach'
,
'--module'
,
'--module'
,
name
,
name
,
'--isolate-filter'
,
name
,
'--target'
,
'--target'
,
targetFile
,
targetFile
,
'--target-model'
,
'--target-model'
,
...
...
packages/flutter_tools/lib/src/build_runner/resident_web_runner.dart
View file @
cb69bbb4
...
@@ -198,11 +198,6 @@ abstract class ResidentWebRunner extends ResidentRunner {
...
@@ -198,11 +198,6 @@ abstract class ResidentWebRunner extends ResidentRunner {
}
}
}
}
@override
Future
<
List
<
FlutterView
>>
listFlutterViews
()
async
{
return
<
FlutterView
>[];
}
@override
@override
Future
<
void
>
debugDumpApp
()
async
{
Future
<
void
>
debugDumpApp
()
async
{
try
{
try
{
...
...
packages/flutter_tools/lib/src/commands/attach.dart
View file @
cb69bbb4
...
@@ -57,7 +57,6 @@ import '../widget_cache.dart';
...
@@ -57,7 +57,6 @@ import '../widget_cache.dart';
class
AttachCommand
extends
FlutterCommand
{
class
AttachCommand
extends
FlutterCommand
{
AttachCommand
({
bool
verboseHelp
=
false
,
this
.
hotRunnerFactory
})
{
AttachCommand
({
bool
verboseHelp
=
false
,
this
.
hotRunnerFactory
})
{
addBuildModeFlags
(
defaultToRelease:
false
);
addBuildModeFlags
(
defaultToRelease:
false
);
usesIsolateFilterOption
(
hide:
!
verboseHelp
);
usesTargetOption
();
usesTargetOption
();
usesPortOptions
();
usesPortOptions
();
usesIpv6Flag
();
usesIpv6Flag
();
...
@@ -380,7 +379,6 @@ class AttachCommand extends FlutterCommand {
...
@@ -380,7 +379,6 @@ class AttachCommand extends FlutterCommand {
flutterProject:
flutterProject
,
flutterProject:
flutterProject
,
fileSystemRoots:
stringsArg
(
'filesystem-root'
),
fileSystemRoots:
stringsArg
(
'filesystem-root'
),
fileSystemScheme:
stringArg
(
'filesystem-scheme'
),
fileSystemScheme:
stringArg
(
'filesystem-scheme'
),
viewFilter:
stringArg
(
'isolate-filter'
),
target:
stringArg
(
'target'
),
target:
stringArg
(
'target'
),
targetModel:
TargetModel
(
stringArg
(
'target-model'
)),
targetModel:
TargetModel
(
stringArg
(
'target-model'
)),
buildInfo:
getBuildInfo
(),
buildInfo:
getBuildInfo
(),
...
...
packages/flutter_tools/lib/src/commands/daemon.dart
View file @
cb69bbb4
...
@@ -470,7 +470,6 @@ class AppDomain extends Domain {
...
@@ -470,7 +470,6 @@ class AppDomain extends Domain {
final
FlutterDevice
flutterDevice
=
await
FlutterDevice
.
create
(
final
FlutterDevice
flutterDevice
=
await
FlutterDevice
.
create
(
device
,
device
,
flutterProject:
flutterProject
,
flutterProject:
flutterProject
,
viewFilter:
isolateFilter
,
target:
target
,
target:
target
,
buildInfo:
options
.
buildInfo
,
buildInfo:
options
.
buildInfo
,
widgetCache:
WidgetCache
(
featureFlags:
featureFlags
),
widgetCache:
WidgetCache
(
featureFlags:
featureFlags
),
...
...
packages/flutter_tools/lib/src/commands/run.dart
View file @
cb69bbb4
...
@@ -73,7 +73,6 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
...
@@ -73,7 +73,6 @@ abstract class RunCommandBase extends FlutterCommand with DeviceBasedDevelopment
usesIpv6Flag
();
usesIpv6Flag
();
usesPubOption
();
usesPubOption
();
usesTrackWidgetCreation
(
verboseHelp:
verboseHelp
);
usesTrackWidgetCreation
(
verboseHelp:
verboseHelp
);
usesIsolateFilterOption
(
hide:
!
verboseHelp
);
addNullSafetyModeOptions
(
hide:
!
verboseHelp
);
addNullSafetyModeOptions
(
hide:
!
verboseHelp
);
usesDeviceUserOption
();
usesDeviceUserOption
();
}
}
...
@@ -526,7 +525,6 @@ class RunCommand extends RunCommandBase {
...
@@ -526,7 +525,6 @@ class RunCommand extends RunCommandBase {
flutterProject:
flutterProject
,
flutterProject:
flutterProject
,
fileSystemRoots:
stringsArg
(
'filesystem-root'
),
fileSystemRoots:
stringsArg
(
'filesystem-root'
),
fileSystemScheme:
stringArg
(
'filesystem-scheme'
),
fileSystemScheme:
stringArg
(
'filesystem-scheme'
),
viewFilter:
stringArg
(
'isolate-filter'
),
experimentalFlags:
expFlags
,
experimentalFlags:
expFlags
,
target:
stringArg
(
'target'
),
target:
stringArg
(
'target'
),
buildInfo:
getBuildInfo
(),
buildInfo:
getBuildInfo
(),
...
...
packages/flutter_tools/lib/src/resident_runner.dart
View file @
cb69bbb4
...
@@ -42,7 +42,6 @@ class FlutterDevice {
...
@@ -42,7 +42,6 @@ class FlutterDevice {
@required
this
.
buildInfo
,
@required
this
.
buildInfo
,
this
.
fileSystemRoots
,
this
.
fileSystemRoots
,
this
.
fileSystemScheme
,
this
.
fileSystemScheme
,
this
.
viewFilter
,
TargetModel
targetModel
=
TargetModel
.
flutter
,
TargetModel
targetModel
=
TargetModel
.
flutter
,
TargetPlatform
targetPlatform
,
TargetPlatform
targetPlatform
,
ResidentCompiler
generator
,
ResidentCompiler
generator
,
...
@@ -76,7 +75,6 @@ class FlutterDevice {
...
@@ -76,7 +75,6 @@ class FlutterDevice {
@required
BuildInfo
buildInfo
,
@required
BuildInfo
buildInfo
,
List
<
String
>
fileSystemRoots
,
List
<
String
>
fileSystemRoots
,
String
fileSystemScheme
,
String
fileSystemScheme
,
String
viewFilter
,
TargetModel
targetModel
=
TargetModel
.
flutter
,
TargetModel
targetModel
=
TargetModel
.
flutter
,
List
<
String
>
experimentalFlags
,
List
<
String
>
experimentalFlags
,
ResidentCompiler
generator
,
ResidentCompiler
generator
,
...
@@ -165,7 +163,6 @@ class FlutterDevice {
...
@@ -165,7 +163,6 @@ class FlutterDevice {
device
,
device
,
fileSystemRoots:
fileSystemRoots
,
fileSystemRoots:
fileSystemRoots
,
fileSystemScheme:
fileSystemScheme
,
fileSystemScheme:
fileSystemScheme
,
viewFilter:
viewFilter
,
targetModel:
targetModel
,
targetModel:
targetModel
,
targetPlatform:
targetPlatform
,
targetPlatform:
targetPlatform
,
generator:
generator
,
generator:
generator
,
...
@@ -188,7 +185,6 @@ class FlutterDevice {
...
@@ -188,7 +185,6 @@ class FlutterDevice {
String
fileSystemScheme
;
String
fileSystemScheme
;
StreamSubscription
<
String
>
_loggingSubscription
;
StreamSubscription
<
String
>
_loggingSubscription
;
bool
_isListeningForObservatoryUri
;
bool
_isListeningForObservatoryUri
;
final
String
viewFilter
;
/// Whether the stream [observatoryUris] is still open.
/// Whether the stream [observatoryUris] is still open.
bool
get
isWaitingForObservatory
=>
_isListeningForObservatoryUri
??
false
;
bool
get
isWaitingForObservatory
=>
_isListeningForObservatoryUri
??
false
;
...
@@ -947,18 +943,6 @@ abstract class ResidentRunner {
...
@@ -947,18 +943,6 @@ abstract class ResidentRunner {
throw
Exception
(
'Canvaskit not supported by this runner.'
);
throw
Exception
(
'Canvaskit not supported by this runner.'
);
}
}
/// List the attached flutter views.
Future
<
List
<
FlutterView
>>
listFlutterViews
()
async
{
final
List
<
List
<
FlutterView
>>
views
=
await
Future
.
wait
(<
Future
<
List
<
FlutterView
>>>[
for
(
FlutterDevice
device
in
flutterDevices
)
if
(
device
.
vmService
!=
null
)
device
.
vmService
.
getFlutterViews
()
]);
return
views
.
expand
((
List
<
FlutterView
>
viewList
)
=>
viewList
)
.
toList
();
}
/// Write the SkSL shaders to a zip file in build directory.
/// Write the SkSL shaders to a zip file in build directory.
///
///
/// Returns the name of the file, or `null` on failures.
/// Returns the name of the file, or `null` on failures.
...
@@ -1532,13 +1516,6 @@ class TerminalHandler {
...
@@ -1532,13 +1516,6 @@ class TerminalHandler {
return
true
;
return
true
;
}
}
return
false
;
return
false
;
case
'l'
:
final
List
<
FlutterView
>
views
=
await
residentRunner
.
listFlutterViews
();
globals
.
printStatus
(
'Connected
${pluralize('view', views.length)}
:'
);
for
(
final
FlutterView
v
in
views
)
{
globals
.
printStatus
(
'
${v.uiIsolate.name}
(
${v.uiIsolate.id}
)'
,
indent:
2
);
}
return
true
;
case
'L'
:
case
'L'
:
if
(
residentRunner
.
supportsServiceProtocol
)
{
if
(
residentRunner
.
supportsServiceProtocol
)
{
await
residentRunner
.
debugDumpLayerTree
();
await
residentRunner
.
debugDumpLayerTree
();
...
...
packages/flutter_tools/lib/src/runner/flutter_command.dart
View file @
cb69bbb4
...
@@ -396,14 +396,6 @@ abstract class FlutterCommand extends Command<void> {
...
@@ -396,14 +396,6 @@ abstract class FlutterCommand extends Command<void> {
);
);
}
}
void
usesIsolateFilterOption
({
@required
bool
hide
})
{
argParser
.
addOption
(
'isolate-filter'
,
defaultsTo:
null
,
hide:
hide
,
help:
'Restricts commands to a subset of the available isolates (running instances of Flutter).
\n
'
"Normally there's only one, but when adding Flutter to a pre-existing app it's possible to create multiple."
);
}
void
usesDeviceUserOption
()
{
void
usesDeviceUserOption
()
{
argParser
.
addOption
(
FlutterOptions
.
kDeviceUser
,
argParser
.
addOption
(
FlutterOptions
.
kDeviceUser
,
help:
'Identifier number for a user or work profile on Android only. Run "adb shell pm list users" for available identifiers.'
,
help:
'Identifier number for a user or work profile on Android only. Run "adb shell pm list users" for available identifiers.'
,
...
...
packages/flutter_tools/test/general.shard/resident_runner_test.dart
View file @
cb69bbb4
...
@@ -207,20 +207,6 @@ void main() {
...
@@ -207,20 +207,6 @@ void main() {
});
});
});
});
testUsingContext
(
'FlutterDevice can list views with a filter'
,
()
=>
testbed
.
run
(()
async
{
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[
listViews
,
]);
final
MockDevice
mockDevice
=
MockDevice
();
final
FlutterDevice
flutterDevice
=
FlutterDevice
(
mockDevice
,
buildInfo:
BuildInfo
.
debug
,
viewFilter:
'b'
,
// Does not match name of `fakeFlutterView`.
);
flutterDevice
.
vmService
=
fakeVmServiceHost
.
vmService
;
}));
testUsingContext
(
'ResidentRunner can attach to device successfully'
,
()
=>
testbed
.
run
(()
async
{
testUsingContext
(
'ResidentRunner can attach to device successfully'
,
()
=>
testbed
.
run
(()
async
{
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[
listViews
,
listViews
,
...
@@ -1640,17 +1626,6 @@ void main() {
...
@@ -1640,17 +1626,6 @@ void main() {
expect
(
fakeVmServiceHost
.
hasRemainingExpectations
,
false
);
expect
(
fakeVmServiceHost
.
hasRemainingExpectations
,
false
);
}));
}));
testUsingContext
(
'listViews handles a null VM service'
,
()
=>
testbed
.
run
(()
async
{
final
FlutterDevice
device
=
FlutterDevice
(
mockDevice
,
buildInfo:
BuildInfo
.
debug
);
final
ResidentRunner
residentRunner
=
HotRunner
(
<
FlutterDevice
>[
device
],
debuggingOptions:
DebuggingOptions
.
disabled
(
BuildInfo
.
debug
)
);
expect
(
await
residentRunner
.
listFlutterViews
(),
isEmpty
);
}));
testUsingContext
(
'ResidentRunner debugDumpApp calls flutter device'
,
()
=>
testbed
.
run
(()
async
{
testUsingContext
(
'ResidentRunner debugDumpApp calls flutter device'
,
()
=>
testbed
.
run
(()
async
{
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[]);
fakeVmServiceHost
=
FakeVmServiceHost
(
requests:
<
VmServiceExpectation
>[]);
await
residentRunner
.
debugDumpApp
();
await
residentRunner
.
debugDumpApp
();
...
...
packages/flutter_tools/test/general.shard/terminal_handler_test.dart
View file @
cb69bbb4
...
@@ -8,7 +8,6 @@ import 'package:flutter_tools/src/build_info.dart';
...
@@ -8,7 +8,6 @@ import 'package:flutter_tools/src/build_info.dart';
import
'package:flutter_tools/src/compile.dart'
;
import
'package:flutter_tools/src/compile.dart'
;
import
'package:flutter_tools/src/device.dart'
;
import
'package:flutter_tools/src/device.dart'
;
import
'package:flutter_tools/src/resident_runner.dart'
;
import
'package:flutter_tools/src/resident_runner.dart'
;
import
'package:flutter_tools/src/vmservice.dart'
;
import
'package:mockito/mockito.dart'
;
import
'package:mockito/mockito.dart'
;
import
'../src/common.dart'
;
import
'../src/common.dart'
;
...
@@ -155,19 +154,6 @@ void main() {
...
@@ -155,19 +154,6 @@ void main() {
});
});
testUsingContext
(
'l - list flutter views'
,
()
async
{
final
MockFlutterDevice
mockFlutterDevice
=
MockFlutterDevice
();
when
(
mockResidentRunner
.
isRunningDebug
).
thenReturn
(
true
);
when
(
mockResidentRunner
.
flutterDevices
).
thenReturn
(<
FlutterDevice
>[
mockFlutterDevice
]);
when
(
mockResidentRunner
.
listFlutterViews
()).
thenAnswer
((
Invocation
invocation
)
async
{
return
<
FlutterView
>[];
});
await
terminalHandler
.
processTerminalInput
(
'l'
);
expect
(
testLogger
.
statusText
,
contains
(
'Connected views:
\n
'
));
});
testUsingContext
(
'L - debugDumpLayerTree with service protocol'
,
()
async
{
testUsingContext
(
'L - debugDumpLayerTree with service protocol'
,
()
async
{
await
terminalHandler
.
processTerminalInput
(
'L'
);
await
terminalHandler
.
processTerminalInput
(
'L'
);
...
...
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