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
ea8aeb74
Unverified
Commit
ea8aeb74
authored
Mar 22, 2022
by
Danny Tuppeny
Committed by
GitHub
Mar 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dap] Remove some code that's not longer required (#98928)
parent
4b819782
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
46 deletions
+4
-46
flutter_adapter.dart
...flutter_tools/lib/src/debug_adapters/flutter_adapter.dart
+2
-3
flutter_test_adapter.dart
...er_tools/lib/src/debug_adapters/flutter_test_adapter.dart
+2
-3
mixins.dart
packages/flutter_tools/lib/src/debug_adapters/mixins.dart
+0
-40
No files found.
packages/flutter_tools/lib/src/debug_adapters/flutter_adapter.dart
View file @
ea8aeb74
...
...
@@ -5,7 +5,7 @@
import
'dart:async'
;
import
'dart:math'
as
math
;
import
'package:dds/dap.dart'
hide
PidTracker
,
PackageConfigUtils
;
import
'package:dds/dap.dart'
hide
PidTracker
;
import
'package:meta/meta.dart'
;
import
'package:vm_service/vm_service.dart'
as
vm
;
...
...
@@ -19,7 +19,7 @@ import 'mixins.dart';
/// A DAP Debug Adapter for running and debugging Flutter applications.
class
FlutterDebugAdapter
extends
DartDebugAdapter
<
FlutterLaunchRequestArguments
,
FlutterAttachRequestArguments
>
with
PidTracker
,
PackageConfigUtils
{
with
PidTracker
{
FlutterDebugAdapter
(
ByteStreamServerChannel
channel
,
{
required
this
.
fileSystem
,
...
...
@@ -36,7 +36,6 @@ class FlutterDebugAdapter extends DartDebugAdapter<FlutterLaunchRequestArguments
logger:
logger
,
);
@override
FileSystem
fileSystem
;
Platform
platform
;
Process
?
_process
;
...
...
packages/flutter_tools/lib/src/debug_adapters/flutter_test_adapter.dart
View file @
ea8aeb74
...
...
@@ -5,7 +5,7 @@
import
'dart:async'
;
import
'dart:math'
as
math
;
import
'package:dds/dap.dart'
hide
PidTracker
,
PackageConfigUtils
;
import
'package:dds/dap.dart'
hide
PidTracker
;
import
'package:meta/meta.dart'
;
import
'package:vm_service/vm_service.dart'
as
vm
;
...
...
@@ -19,7 +19,7 @@ import 'mixins.dart';
/// A DAP Debug Adapter for running and debugging Flutter tests.
class
FlutterTestDebugAdapter
extends
DartDebugAdapter
<
FlutterLaunchRequestArguments
,
FlutterAttachRequestArguments
>
with
PidTracker
,
PackageConfigUtils
,
TestAdapter
{
with
PidTracker
,
TestAdapter
{
FlutterTestDebugAdapter
(
ByteStreamServerChannel
channel
,
{
required
this
.
fileSystem
,
...
...
@@ -36,7 +36,6 @@ class FlutterTestDebugAdapter extends DartDebugAdapter<FlutterLaunchRequestArgum
logger:
logger
,
);
@override
FileSystem
fileSystem
;
Platform
platform
;
Process
?
_process
;
...
...
packages/flutter_tools/lib/src/debug_adapters/mixins.dart
View file @
ea8aeb74
...
...
@@ -2,48 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'../base/file_system.dart'
;
import
'../base/io.dart'
;
/// A mixin providing some utility functions for locating/working with
/// package_config.json files.
///
/// Adapted from package:dds/src/dap/adapters/mixins.dart to use Flutter's
/// dart:io wrappers.
mixin
PackageConfigUtils
{
abstract
FileSystem
fileSystem
;
/// Find the `package_config.json` file for the program being launched.
File
?
findPackageConfigFile
(
String
possibleRoot
)
{
// TODO(dantup): Remove this once
// https://github.com/dart-lang/sdk/issues/45530 is done as it will not be
// necessary.
File
?
packageConfig
;
while
(
true
)
{
packageConfig
=
fileSystem
.
file
(
fileSystem
.
path
.
join
(
possibleRoot
,
'.dart_tool'
,
'package_config.json'
),
);
// If this packageconfig exists, use it.
if
(
packageConfig
.
existsSync
())
{
break
;
}
final
String
parent
=
fileSystem
.
path
.
dirname
(
possibleRoot
);
// If we can't go up anymore, the search failed.
if
(
parent
==
possibleRoot
)
{
packageConfig
=
null
;
break
;
}
possibleRoot
=
parent
;
}
return
packageConfig
;
}
}
/// A mixin for tracking additional PIDs that can be shut down at the end of a debug session.
///
/// Adapted from package:dds/src/dap/adapters/mixins.dart to use Flutter's
...
...
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