Platform binaries reland (#115502)

You can now specify a --local-web-sdk flag to point to a wasm_release folder. This will make it so that only artifacts that pertain to the web sdk are overridden to point to the wasm_release folder. Other artifacts (such as impellerc) will pull from the cache, or from the --local-engine path if that is specified.

This also uses precompiled platform kernel files for both ddc and dart2js
This commit is contained in:
Jackson Gardner
2022-12-02 14:13:40 -08:00
committed by GitHub
parent 08a2635e2b
commit db1c3e208d
45 changed files with 810 additions and 471 deletions

View File

@@ -561,8 +561,9 @@ class WebAssetServer implements AssetReader {
// Otherwise it must be a Dart SDK source or a Flutter Web SDK source.
final Directory dartSdkParent = globals.fs
.directory(
globals.artifacts!.getHostArtifact(HostArtifact.engineDartSdkPath))
.directory(globals.artifacts!.getArtifactPath(
Artifact.engineDartSdkPath,
platform: TargetPlatform.web_javascript))
.parent;
final File dartSdkFile = globals.fs.file(dartSdkParent.uri.resolve(path));
if (dartSdkFile.existsSync()) {
@@ -926,7 +927,7 @@ class WebDevFS implements DevFS {
@visibleForTesting
final File requireJS = globals.fs.file(globals.fs.path.join(
globals.artifacts!.getHostArtifact(HostArtifact.engineDartSdkPath).path,
globals.artifacts!.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript),
'lib',
'dev_compiler',
'kernel',
@@ -936,7 +937,7 @@ class WebDevFS implements DevFS {
@visibleForTesting
final File stackTraceMapper = globals.fs.file(globals.fs.path.join(
globals.artifacts!.getHostArtifact(HostArtifact.engineDartSdkPath).path,
globals.artifacts!.getArtifactPath(Artifact.engineDartSdkPath, platform: TargetPlatform.web_javascript),
'lib',
'dev_compiler',
'web',

View File

@@ -24,8 +24,8 @@ class SdkWebConfigurationProvider extends SdkConfigurationProvider {
Future<SdkConfiguration> get configuration async {
if (_configuration == null) {
final String sdkDir = _artifacts.getHostArtifact(HostArtifact.flutterWebSdk).path;
final String unsoundSdkSummaryPath = _artifacts.getHostArtifact(HostArtifact.webPlatformKernelDill).path;
final String soundSdkSummaryPath = _artifacts.getHostArtifact(HostArtifact.webPlatformSoundKernelDill).path;
final String unsoundSdkSummaryPath = _artifacts.getHostArtifact(HostArtifact.webPlatformDDCKernelDill).path;
final String soundSdkSummaryPath = _artifacts.getHostArtifact(HostArtifact.webPlatformDDCSoundKernelDill).path;
final String librariesPath = _artifacts.getHostArtifact(HostArtifact.flutterWebLibrariesJson).path;
_configuration = SdkConfiguration(