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:
@@ -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',
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user