reverted format changes
diff --git a/packages/flutter_tools/lib/src/isolated/devfs_web.dart b/packages/flutter_tools/lib/src/isolated/devfs_web.dart
index b3f9dcf..05a164a 100644
--- a/packages/flutter_tools/lib/src/isolated/devfs_web.dart
+++ b/packages/flutter_tools/lib/src/isolated/devfs_web.dart
@@ -36,20 +36,21 @@
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,
- ExpressionCompiler expressionCompiler,
- bool enableDebugExtension,
- String hostname,
- bool useSseForDebugProxy,
- bool useSseForDebugBackend,
- bool serveDevTools,
- UrlEncoder urlEncoder,
- bool spawnDds});
+typedef DwdsLauncher = Future<Dwds> Function({
+ @required AssetReader assetReader,
+ @required Stream<BuildResult> buildResults,
+ @required ConnectionProvider chromeConnection,
+ @required LoadStrategy loadStrategy,
+ @required bool enableDebugging,
+ ExpressionCompiler expressionCompiler,
+ bool enableDebugExtension,
+ String hostname,
+ bool useSseForDebugProxy,
+ bool useSseForDebugBackend,
+ bool serveDevTools,
+ UrlEncoder urlEncoder,
+ bool spawnDds
+});
// A minimal index for projects that do not yet support web.
const String _kDefaultIndex = '''
@@ -82,9 +83,8 @@
String moduleName,
String expression,
) async {
- final CompilerOutput compilerOutput =
- await _generator.compileExpressionToJs(libraryUri, line, column,
- jsModules, jsFrameValues, moduleName, expression);
+ final CompilerOutput compilerOutput = await _generator.compileExpressionToJs(libraryUri,
+ line, column, jsModules, jsFrameValues, moduleName, expression);
if (compilerOutput != null && compilerOutput.outputFilename != null) {
final String content = utf8.decode(
@@ -94,8 +94,7 @@
}
return ExpressionCompilationResult(
- 'InternalError: frontend server failed to compile \'$expression\'',
- true);
+ 'InternalError: frontend server failed to compile \'$expression\'', true);
}
@override
@@ -130,8 +129,9 @@
// We skip computing the digest by using the hashCode of the underlying buffer.
// Whenever a file is updated, the corresponding Uint8List.view it corresponds
// to will change.
- final String moduleName =
- module.startsWith('/') ? module.substring(1) : module;
+ final String moduleName = module.startsWith('/')
+ ? module.substring(1)
+ : module;
final String name = moduleName.replaceAll('.lib.js', '');
final String path = moduleName.replaceAll('.js', '');
_modules[name] = path;
@@ -209,15 +209,12 @@
// Ensure dwds is present and provide middleware to avoid trying to
// load the through the isolate APIs.
- final Directory directory =
- await _loadDwdsDirectory(globals.fs, globals.logger);
- final shelf.Middleware middleware =
- (FutureOr<shelf.Response> Function(shelf.Request) innerHandler) {
+ final Directory directory = await _loadDwdsDirectory(globals.fs, globals.logger);
+ final shelf.Middleware middleware = (FutureOr<shelf.Response> Function(shelf.Request) innerHandler) {
return (shelf.Request request) async {
if (request.url.path.endsWith('dwds/src/injected/client.js')) {
final Uri uri = directory.uri.resolve('src/injected/client.js');
- final String result =
- await globals.fs.file(uri.toFilePath()).readAsString();
+ final String result = await globals.fs.file(uri.toFilePath()).readAsString();
return shelf.Response.ok(result, headers: <String, String>{
HttpHeaders.contentTypeHeader: 'application/javascript'
});
@@ -228,33 +225,33 @@
// In debug builds, spin up DWDS and the full asset server.
final Dwds dwds = await dwdsLauncher(
- assetReader: server,
- enableDebugExtension: true,
- buildResults: const Stream<BuildResult>.empty(),
- chromeConnection: () async {
- final Chromium chromium = await chromiumLauncher.connectedInstance;
- return chromium.chromeConnection;
- },
- hostname: hostname,
- urlEncoder: urlTunneller,
- enableDebugging: true,
- useSseForDebugProxy: useSseForDebugProxy,
- useSseForDebugBackend: useSseForDebugBackend,
- serveDevTools: false,
- loadStrategy: FrontendServerRequireStrategyProvider(
- ReloadConfiguration.none, server, _digestProvider)
- .strategy,
- expressionCompiler: expressionCompiler,
- spawnDds: true);
+ assetReader: server,
+ enableDebugExtension: true,
+ buildResults: const Stream<BuildResult>.empty(),
+ chromeConnection: () async {
+ final Chromium chromium = await chromiumLauncher.connectedInstance;
+ return chromium.chromeConnection;
+ },
+ hostname: hostname,
+ urlEncoder: urlTunneller,
+ enableDebugging: true,
+ useSseForDebugProxy: useSseForDebugProxy,
+ useSseForDebugBackend: useSseForDebugBackend,
+ serveDevTools: false,
+ loadStrategy: FrontendServerRequireStrategyProvider(
+ ReloadConfiguration.none, server, _digestProvider)
+ .strategy,
+ expressionCompiler: expressionCompiler,
+ spawnDds: true);
shelf.Pipeline pipeline = const shelf.Pipeline();
if (enableDwds) {
pipeline = pipeline.addMiddleware(middleware);
pipeline = pipeline.addMiddleware(dwds.middleware);
}
- final shelf.Handler dwdsHandler =
- pipeline.addHandler(server.handleRequest);
- final shelf.Cascade cascade =
- shelf.Cascade().add(dwds.handler).add(dwdsHandler);
+ final shelf.Handler dwdsHandler = pipeline.addHandler(server.handleRequest);
+ final shelf.Cascade cascade = shelf.Cascade()
+ .add(dwds.handler)
+ .add(dwdsHandler);
shelf.serveRequests(httpServer, cascade.handler);
server.dwds = dwds;
return server;
@@ -291,7 +288,6 @@
Uint8List getMetadata(String path) => _metadataFiles[path];
@visibleForTesting
-
/// The base path to serve from.
///
/// It should have no leading or trailing slashes.
@@ -324,10 +320,9 @@
// If this is a JavaScript file, it must be in the in-memory cache.
// Attempt to look up the file by URI.
- final String webServerPath =
- requestPath.replaceFirst('.dart.js', '.dart.lib.js');
+ final String webServerPath = requestPath.replaceFirst('.dart.js', '.dart.lib.js');
if (_files.containsKey(requestPath) || _files.containsKey(webServerPath)) {
- final List<int> bytes = getFile(requestPath) ?? getFile(webServerPath);
+ final List<int> bytes = getFile(requestPath) ?? getFile(webServerPath);
// Use the underlying buffer hashCode as a revision string. This buffer is
// replaced whenever the frontend_server produces new output files, which
// will also change the hashCode.
@@ -373,18 +368,15 @@
// If all of the lookups above failed, the file might have been an asset.
// Try and resolve the path relative to the built asset directory.
if (!file.existsSync()) {
- final Uri potential = globals.fs
- .directory(getAssetBuildDirectory())
- .uri
- .resolve(requestPath.replaceFirst('assets/', ''));
+ final Uri potential = globals.fs.directory(getAssetBuildDirectory())
+ .uri.resolve(requestPath.replaceFirst('assets/', ''));
file = globals.fs.file(potential);
}
if (!file.existsSync()) {
final Uri webPath = globals.fs.currentDirectory
- .childDirectory('web')
- .uri
- .resolve(requestPath);
+ .childDirectory('web')
+ .uri.resolve(requestPath);
file = globals.fs.file(webPath);
}
@@ -399,8 +391,8 @@
// For real files, use a serialized file stat plus path as a revision.
// This allows us to update between canvaskit and non-canvaskit SDKs.
- final String etag = file.lastModifiedSync().toIso8601String() +
- Uri.encodeComponent(file.path);
+ final String etag = file.lastModifiedSync().toIso8601String()
+ + Uri.encodeComponent(file.path);
if (ifNoneMatch == etag) {
return shelf.Response.notModified();
}
@@ -441,26 +433,24 @@
///
/// Returns a list of updated modules.
List<String> write(
- File codeFile, File manifestFile, File sourcemapFile, File metadataFile) {
+ File codeFile,
+ File manifestFile,
+ File sourcemapFile,
+ File metadataFile) {
final List<String> modules = <String>[];
final Uint8List codeBytes = codeFile.readAsBytesSync();
final Uint8List sourcemapBytes = sourcemapFile.readAsBytesSync();
final Uint8List metadataBytes = metadataFile.readAsBytesSync();
- final Map<String, dynamic> manifest =
- castStringKeyedMap(json.decode(manifestFile.readAsStringSync()));
+ final Map<String, dynamic> manifest = castStringKeyedMap(json.decode(manifestFile.readAsStringSync()));
for (final String filePath in manifest.keys) {
if (filePath == null) {
globals.printTrace('Invalid manfiest file: $filePath');
continue;
}
- final Map<String, dynamic> offsets =
- castStringKeyedMap(manifest[filePath]);
- final List<int> codeOffsets =
- (offsets['code'] as List<dynamic>).cast<int>();
- final List<int> sourcemapOffsets =
- (offsets['sourcemap'] as List<dynamic>).cast<int>();
- final List<int> metadataOffsets =
- (offsets['metadata'] as List<dynamic>).cast<int>();
+ final Map<String, dynamic> offsets = castStringKeyedMap(manifest[filePath]);
+ final List<int> codeOffsets = (offsets['code'] as List<dynamic>).cast<int>();
+ final List<int> sourcemapOffsets = (offsets['sourcemap'] as List<dynamic>).cast<int>();
+ final List<int> metadataOffsets = (offsets['metadata'] as List<dynamic>).cast<int>();
if (codeOffsets.length != 2 ||
sourcemapOffsets.length != 2 ||
metadataOffsets.length != 2) {
@@ -479,15 +469,15 @@
codeStart,
codeEnd - codeStart,
);
- final String fileName =
- filePath.startsWith('/') ? filePath.substring(1) : filePath;
+ final String fileName = filePath.startsWith('/')
+ ? filePath.substring(1)
+ : filePath;
_files[fileName] = byteView;
final int sourcemapStart = sourcemapOffsets[0];
final int sourcemapEnd = sourcemapOffsets[1];
if (sourcemapStart < 0 || sourcemapEnd > sourcemapBytes.lengthInBytes) {
- globals
- .printTrace('Invalid byte index: [$sourcemapStart, $sourcemapEnd]');
+ globals.printTrace('Invalid byte index: [$sourcemapStart, $sourcemapEnd]');
continue;
}
final Uint8List sourcemapView = Uint8List.view(
@@ -501,8 +491,7 @@
final int metadataStart = metadataOffsets[0];
final int metadataEnd = metadataOffsets[1];
if (metadataStart < 0 || metadataEnd > metadataBytes.lengthInBytes) {
- globals
- .printTrace('Invalid byte index: [$metadataStart, $metadataEnd]');
+ globals.printTrace('Invalid byte index: [$metadataStart, $metadataEnd]');
continue;
}
final Uint8List metadataView = Uint8List.view(
@@ -517,8 +506,8 @@
}
_mergedMetadata = _metadataFiles.values
- .map((Uint8List encoded) => utf8.decode(encoded))
- .join('\n');
+ .map((Uint8List encoded) => utf8.decode(encoded))
+ .join('\n');
return modules;
}
@@ -531,12 +520,11 @@
HttpHeaders.contentTypeHeader: 'text/html',
};
final File indexFile = globals.fs.currentDirectory
- .childDirectory('web')
- .childFile('index.html');
+ .childDirectory('web')
+ .childFile('index.html');
if (indexFile.existsSync()) {
- headers[HttpHeaders.contentLengthHeader] =
- indexFile.lengthSync().toString();
+ headers[HttpHeaders.contentLengthHeader] = indexFile.lengthSync().toString();
return shelf.Response.ok(indexFile.openRead(), headers: headers);
}
@@ -551,30 +539,23 @@
case 'dart_sdk.js':
if (_buildInfo.nullSafetyMode == NullSafetyMode.unsound) {
return globals.fs.file(canvasKitRendering
- ? globals.artifacts
- .getArtifactPath(Artifact.webPrecompiledCanvaskitSdk)
- : globals.artifacts.getArtifactPath(Artifact.webPrecompiledSdk));
+ ? globals.artifacts.getArtifactPath(Artifact.webPrecompiledCanvaskitSdk)
+ : globals.artifacts.getArtifactPath(Artifact.webPrecompiledSdk));
} else {
return globals.fs.file(canvasKitRendering
- ? globals.artifacts
- .getArtifactPath(Artifact.webPrecompiledCanvaskitSoundSdk)
- : globals.artifacts
- .getArtifactPath(Artifact.webPrecompiledSoundSdk));
+ ? globals.artifacts.getArtifactPath(Artifact.webPrecompiledCanvaskitSoundSdk)
+ : globals.artifacts.getArtifactPath(Artifact.webPrecompiledSoundSdk));
}
break;
case 'dart_sdk.js.map':
if (_buildInfo.nullSafetyMode == NullSafetyMode.unsound) {
return globals.fs.file(canvasKitRendering
- ? globals.artifacts.getArtifactPath(
- Artifact.webPrecompiledCanvaskitSdkSourcemaps)
- : globals.artifacts
- .getArtifactPath(Artifact.webPrecompiledSdkSourcemaps));
+ ? globals.artifacts.getArtifactPath(Artifact.webPrecompiledCanvaskitSdkSourcemaps)
+ : globals.artifacts.getArtifactPath(Artifact.webPrecompiledSdkSourcemaps));
} else {
return globals.fs.file(canvasKitRendering
- ? globals.artifacts.getArtifactPath(
- Artifact.webPrecompiledCanvaskitSoundSdkSourcemaps)
- : globals.artifacts
- .getArtifactPath(Artifact.webPrecompiledSoundSdkSourcemaps));
+ ? globals.artifacts.getArtifactPath(Artifact.webPrecompiledCanvaskitSoundSdkSourcemaps)
+ : globals.artifacts.getArtifactPath(Artifact.webPrecompiledSoundSdkSourcemaps));
}
}
// This is the special generated entrypoint.
@@ -585,8 +566,7 @@
// If this is a dart file, it must be on the local file system and is
// likely coming from a source map request. The tool doesn't currently
// consider the case of Dart files as assets.
- final File dartFile =
- globals.fs.file(globals.fs.currentDirectory.uri.resolve(path));
+ final File dartFile = globals.fs.file(globals.fs.currentDirectory.uri.resolve(path));
if (dartFile.existsSync()) {
return dartFile;
}
@@ -599,8 +579,8 @@
// The file might have been a package file which is signaled by a
// `/packages/<package>/<path>` request.
if (segments.first == 'packages') {
- final Uri filePath = _packages
- .resolve(Uri(scheme: 'package', pathSegments: segments.skip(1)));
+ final Uri filePath = _packages.resolve(Uri(
+ scheme: 'package', pathSegments: segments.skip(1)));
if (filePath != null) {
final File packageFile = globals.fs.file(filePath);
if (packageFile.existsSync()) {
@@ -611,16 +591,15 @@
// Otherwise it must be a Dart SDK source or a Flutter Web SDK source.
final Directory dartSdkParent = globals.fs
- .directory(
- globals.artifacts.getArtifactPath(Artifact.engineDartSdkPath))
- .parent;
+ .directory(globals.artifacts.getArtifactPath(Artifact.engineDartSdkPath))
+ .parent;
final File dartSdkFile = globals.fs.file(dartSdkParent.uri.resolve(path));
if (dartSdkFile.existsSync()) {
return dartSdkFile;
}
- final Directory flutterWebSdk = globals.fs
- .directory(globals.artifacts.getArtifactPath(Artifact.flutterWebSdk));
+ final Directory flutterWebSdk = globals.fs.directory(globals.artifacts
+ .getArtifactPath(Artifact.flutterWebSdk));
final File webSdkFile = globals.fs.file(flutterWebSdk.uri.resolve(path));
return webSdkFile;
@@ -709,20 +688,16 @@
///
/// Only calls [AppConnection.runMain] on the subsequent connections.
Future<ConnectionResult> connect(bool useDebugExtension) {
- final Completer<ConnectionResult> firstConnection =
- Completer<ConnectionResult>();
- _connectedApps =
- dwds.connectedApps.listen((AppConnection appConnection) async {
+ final Completer<ConnectionResult> firstConnection = Completer<ConnectionResult>();
+ _connectedApps = dwds.connectedApps.listen((AppConnection appConnection) async {
try {
final DebugConnection debugConnection = useDebugExtension
- ? await (_cachedExtensionFuture ??=
- dwds.extensionDebugConnections.stream.first)
- : await dwds.debugConnection(appConnection);
+ ? await (_cachedExtensionFuture ??= dwds.extensionDebugConnections.stream.first)
+ : await dwds.debugConnection(appConnection);
if (firstConnection.isCompleted) {
appConnection.runMain();
} else {
- firstConnection
- .complete(ConnectionResult(appConnection, debugConnection));
+ firstConnection.complete(ConnectionResult(appConnection, debugConnection));
}
} on Exception catch (error, stackTrace) {
if (!firstConnection.isCompleted) {
@@ -730,8 +705,7 @@
}
}
}, onError: (dynamic error, StackTrace stackTrace) {
- globals.printError(
- 'Unknown error while waiting for debug connection:$error\n$stackTrace');
+ globals.printError('Unknown error while waiting for debug connection:$error\n$stackTrace');
if (!firstConnection.isCompleted) {
firstConnection.completeError(error, stackTrace);
}
@@ -823,20 +797,15 @@
final String outputDirectoryPath = mainFile.parent.path;
if (bundleFirstUpload) {
- webAssetServer.entrypointCacheDirectory =
- globals.fs.directory(outputDirectoryPath);
+ webAssetServer.entrypointCacheDirectory = globals.fs.directory(outputDirectoryPath);
generator.addFileSystemRoot(outputDirectoryPath);
final String entrypoint = globals.fs.path.basename(mainFile.path);
webAssetServer.writeBytes(entrypoint, mainFile.readAsBytesSync());
webAssetServer.writeBytes('require.js', requireJS.readAsBytesSync());
- webAssetServer.writeBytes(
- 'stack_trace_mapper.js', stackTraceMapper.readAsBytesSync());
- webAssetServer.writeFile(
- 'manifest.json', '{"info":"manifest not generated in run mode."}');
- webAssetServer.writeFile('flutter_service_worker.js',
- '// Service worker not loaded in run mode.');
- webAssetServer.writeFile(
- 'version.json', FlutterProject.current().getVersionInfo());
+ webAssetServer.writeBytes('stack_trace_mapper.js', stackTraceMapper.readAsBytesSync());
+ webAssetServer.writeFile('manifest.json', '{"info":"manifest not generated in run mode."}');
+ webAssetServer.writeFile('flutter_service_worker.js', '// Service worker not loaded in run mode.');
+ webAssetServer.writeFile('version.json', FlutterProject.current().getVersionInfo());
webAssetServer.writeFile(
'main.dart.js',
generateBootstrapScript(
@@ -876,8 +845,7 @@
),
invalidatedFiles,
outputPath: dillOutputPath ??
- getDefaultApplicationKernelPath(
- trackWidgetCreation: trackWidgetCreation),
+ getDefaultApplicationKernelPath(trackWidgetCreation: trackWidgetCreation),
packageConfig: packageConfig,
);
if (compilerOutput == null || compilerOutput.errorCount > 0) {
@@ -894,18 +862,12 @@
File metadataFile;
List<String> modules;
try {
- final Directory parentDirectory =
- globals.fs.directory(outputDirectoryPath);
- codeFile =
- parentDirectory.childFile('${compilerOutput.outputFilename}.sources');
- manifestFile =
- parentDirectory.childFile('${compilerOutput.outputFilename}.json');
- sourcemapFile =
- parentDirectory.childFile('${compilerOutput.outputFilename}.map');
- metadataFile = parentDirectory
- .childFile('${compilerOutput.outputFilename}.metadata');
- modules = webAssetServer.write(
- codeFile, manifestFile, sourcemapFile, metadataFile);
+ final Directory parentDirectory = globals.fs.directory(outputDirectoryPath);
+ codeFile = parentDirectory.childFile('${compilerOutput.outputFilename}.sources');
+ manifestFile = parentDirectory.childFile('${compilerOutput.outputFilename}.json');
+ sourcemapFile = parentDirectory.childFile('${compilerOutput.outputFilename}.map');
+ metadataFile = parentDirectory.childFile('${compilerOutput.outputFilename}.metadata');
+ modules = webAssetServer.write(codeFile, manifestFile, sourcemapFile, metadataFile);
} on FileSystemException catch (err) {
throwToolExit('Failed to load recompiled sources:\n$err');
}
@@ -943,19 +905,17 @@
}
class ReleaseAssetServer {
- ReleaseAssetServer(
- this.entrypoint, {
+ ReleaseAssetServer(this.entrypoint, {
@required FileSystem fileSystem,
@required String webBuildDirectory,
@required String flutterRoot,
@required Platform platform,
this.basePath = '',
- }) : _fileSystem = fileSystem,
- _platform = platform,
- _flutterRoot = flutterRoot,
- _webBuildDirectory = webBuildDirectory,
- _fileSystemUtils =
- FileSystemUtils(fileSystem: fileSystem, platform: platform);
+ }) : _fileSystem = fileSystem,
+ _platform = platform,
+ _flutterRoot = flutterRoot,
+ _webBuildDirectory = webBuildDirectory,
+ _fileSystemUtils = FileSystemUtils(fileSystem: fileSystem, platform: platform);
final Uri entrypoint;
final String _flutterRoot;
@@ -965,7 +925,6 @@
final Platform _platform;
@visibleForTesting
-
/// The base path to serve from.
///
/// It should have no leading or trailing slashes.
@@ -973,12 +932,12 @@
// Locations where source files, assets, or source maps may be located.
List<Uri> _searchPaths() => <Uri>[
- _fileSystem.directory(_webBuildDirectory).uri,
- _fileSystem.directory(_flutterRoot).uri,
- _fileSystem.directory(_flutterRoot).parent.uri,
- _fileSystem.currentDirectory.uri,
- _fileSystem.directory(_fileSystemUtils.homeDirPath).uri,
- ];
+ _fileSystem.directory(_webBuildDirectory).uri,
+ _fileSystem.directory(_flutterRoot).uri,
+ _fileSystem.directory(_flutterRoot).parent.uri,
+ _fileSystem.currentDirectory.uri,
+ _fileSystem.directory(_fileSystemUtils.homeDirPath).uri,
+ ];
Future<shelf.Response> handle(shelf.Request request) async {
if (request.method != 'GET') {
@@ -998,9 +957,8 @@
} else {
for (final Uri uri in _searchPaths()) {
final Uri potential = uri.resolve(requestPath);
- if (potential == null ||
- !_fileSystem.isFileSync(
- potential.toFilePath(windows: _platform.isWindows))) {
+ if (potential == null || !_fileSystem.isFileSync(
+ potential.toFilePath(windows: _platform.isWindows))) {
continue;
}
fileUri = potential;
@@ -1012,28 +970,24 @@
final Uint8List bytes = file.readAsBytesSync();
// Fallback to "application/octet-stream" on null which
// makes no claims as to the structure of the data.
- final String mimeType =
- mime.lookupMimeType(file.path, headerBytes: bytes) ??
- 'application/octet-stream';
+ final String mimeType = mime.lookupMimeType(file.path, headerBytes: bytes)
+ ?? 'application/octet-stream';
return shelf.Response.ok(bytes, headers: <String, String>{
'Content-Type': mimeType,
});
}
- final File file = _fileSystem
- .file(_fileSystem.path.join(_webBuildDirectory, 'index.html'));
+ final File file = _fileSystem.file(_fileSystem.path.join(_webBuildDirectory, 'index.html'));
return shelf.Response.ok(file.readAsBytesSync(), headers: <String, String>{
'Content-Type': 'text/html',
});
}
}
-Future<Directory> _loadDwdsDirectory(
- FileSystem fileSystem, Logger logger) async {
- final String toolPackagePath =
- fileSystem.path.join(Cache.flutterRoot, 'packages', 'flutter_tools');
- final String packageFilePath =
- fileSystem.path.join(toolPackagePath, kPackagesFileName);
+Future<Directory> _loadDwdsDirectory(FileSystem fileSystem, Logger logger) async {
+ final String toolPackagePath = fileSystem.path.join(
+ Cache.flutterRoot, 'packages', 'flutter_tools');
+ final String packageFilePath = fileSystem.path.join(toolPackagePath, kPackagesFileName);
final PackageConfig packageConfig = await loadPackageConfigWithLogging(
fileSystem.file(packageFilePath),
logger: logger,
@@ -1067,13 +1021,13 @@
}
String _parseBasePathFromIndexHtml(File indexHtml) {
- final String htmlContent =
- indexHtml.existsSync() ? indexHtml.readAsStringSync() : _kDefaultIndex;
+ final String htmlContent = indexHtml.existsSync()
+ ? indexHtml.readAsStringSync()
+ : _kDefaultIndex;
final Document document = parse(htmlContent);
final Element baseElement = document.querySelector('base');
- String baseHref =
- baseElement?.attributes == null ? null : baseElement.attributes['href'];
+ String baseHref = baseElement?.attributes == null ? null : baseElement.attributes['href'];
if (baseHref == null) {
baseHref = '';
diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml
index 44cccfc..d10b5a2 100644
--- a/packages/flutter_tools/pubspec.yaml
+++ b/packages/flutter_tools/pubspec.yaml
@@ -117,7 +117,6 @@
dependency_overrides:
dwds:
- path: /Users/annagrin/source/webdev/dwds
- # git:
- # url: git@github.com:dart-lang/webdev.git
- # path: dwds
+ git:
+ url: git@github.com:dart-lang/webdev.git
+ path: dwds