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
1e86c1fb
Unverified
Commit
1e86c1fb
authored
Apr 03, 2020
by
Jonah Williams
Committed by
GitHub
Apr 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] re-enable debug extension (#53765)
parent
66d7a6c2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
2 deletions
+62
-2
devfs_web.dart
packages/flutter_tools/lib/src/build_runner/devfs_web.dart
+19
-2
devfs_web_test.dart
.../flutter_tools/test/general.shard/web/devfs_web_test.dart
+43
-0
No files found.
packages/flutter_tools/lib/src/build_runner/devfs_web.dart
View file @
1e86c1fb
...
...
@@ -36,6 +36,22 @@ import '../globals.dart' as globals;
import
'../web/bootstrap.dart'
;
import
'../web/chrome.dart'
;
typedef
DwdsLauncher
=
Future
<
Dwds
>
Function
({
@required
AssetReader
assetReader
,
@required
Stream
<
BuildResult
>
buildResults
,
@required
ConnectionProvider
chromeConnection
,
@required
LoadStrategy
loadStrategy
,
@required
bool
enableDebugging
,
bool
enableDebugExtension
,
String
hostname
,
bool
useSseForDebugProxy
,
bool
serveDevTools
,
void
Function
(
Level
,
String
)
logWriter
,
bool
verbose
,
UrlEncoder
urlEncoder
,
ExpressionCompiler
expressionCompiler
,
});
/// An expression compiler connecting to FrontendServer
///
/// This is only used in development mode
...
...
@@ -87,7 +103,6 @@ class WebAssetServer implements AssetReader {
static
const
String
_kDefaultMimeType
=
'application/octet-stream'
;
final
Map
<
String
,
String
>
_modules
;
final
Map
<
String
,
String
>
_digests
;
void
performRestart
(
List
<
String
>
modules
)
{
...
...
@@ -121,6 +136,7 @@ class WebAssetServer implements AssetReader {
Uri
entrypoint
,
ExpressionCompiler
expressionCompiler
,
{
bool
testMode
=
false
,
DwdsLauncher
dwdsLauncher
=
Dwds
.
start
,
})
async
{
try
{
final
InternetAddress
address
=
(
await
InternetAddress
.
lookup
(
hostname
)).
first
;
...
...
@@ -184,8 +200,9 @@ class WebAssetServer implements AssetReader {
}
// In debug builds, spin up DWDS and the full asset server.
final
Dwds
dwds
=
await
Dwds
.
start
(
final
Dwds
dwds
=
await
dwdsLauncher
(
assetReader:
server
,
enableDebugExtension:
true
,
buildResults:
const
Stream
<
BuildResult
>.
empty
(),
chromeConnection:
()
async
{
final
Chrome
chrome
=
await
ChromeLauncher
.
connectedInstance
;
...
...
packages/flutter_tools/test/general.shard/web/devfs_web_test.dart
View file @
1e86c1fb
...
...
@@ -2,14 +2,21 @@
// 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:io'
;
import
'package:dwds/data/build_result.dart'
;
import
'package:dwds/dwds.dart'
;
import
'package:dwds/src/loaders/strategy.dart'
;
import
'package:dwds/src/readers/asset_reader.dart'
;
import
'package:dwds/src/services/expression_compiler.dart'
;
import
'package:flutter_tools/src/base/file_system.dart'
;
import
'package:flutter_tools/src/base/io.dart'
;
import
'package:flutter_tools/src/build_info.dart'
;
import
'package:flutter_tools/src/compile.dart'
;
import
'package:flutter_tools/src/convert.dart'
;
import
'package:flutter_tools/src/build_runner/devfs_web.dart'
;
import
'package:logging/logging.dart'
;
import
'package:mockito/mockito.dart'
;
// TODO(bkonyi): remove deprecated member usage, https://github.com/flutter/flutter/issues/51951
// ignore: deprecated_member_use
...
...
@@ -432,7 +439,43 @@ void main() {
await
webDevFS
.
destroy
();
}));
test
(
'Launches DWDS with the correct arguments'
,
()
=>
testbed
.
run
(()
async
{
final
WebAssetServer
server
=
await
WebAssetServer
.
start
(
'localhost'
,
8123
,
(
String
url
)
=>
null
,
BuildMode
.
debug
,
true
,
Uri
.
file
(
'test.dart'
),
null
,
dwdsLauncher:
({
AssetReader
assetReader
,
Stream
<
BuildResult
>
buildResults
,
ConnectionProvider
chromeConnection
,
bool
enableDebugExtension
,
bool
enableDebugging
,
ExpressionCompiler
expressionCompiler
,
String
hostname
,
LoadStrategy
loadStrategy
,
void
Function
(
Level
,
String
)
logWriter
,
bool
serveDevTools
,
UrlEncoder
urlEncoder
,
bool
useSseForDebugProxy
,
bool
verbose
,
})
async
{
expect
(
serveDevTools
,
false
);
expect
(
verbose
,
null
);
expect
(
enableDebugging
,
true
);
expect
(
enableDebugExtension
,
true
);
return
MockDwds
();
});
await
server
.
dispose
();
}));
}
class
MockHttpServer
extends
Mock
implements
HttpServer
{}
class
MockResidentCompiler
extends
Mock
implements
ResidentCompiler
{}
class
MockDwds
extends
Mock
implements
Dwds
{}
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