Ensure that the build system checks for updates of locally built flutter_web_sdk artifacts (#156534)
The SourceVisitor uses the engineVersion parameter to determine whether it needs to check for changes to artifacts or if it can assume that artifacts are unmodified from a versioned build of the engine. engineVersion is set based on whether the Artifacts instance sets the isLocalEngine property. CachedLocalWebSdkArtifacts (instantiated when the --local-web-sdk flag is used) was only setting isLocalEngine if --local-engine was also used. This caused the build system to ignore changes to the files in the locally built flutter_web_sdk when using --local-web-sdk alone. This PR renames Artifacts.isLocalEngine to usesLocalArtifacts in order to clarify what it means. It also changes CachedLocalWebSdkArtifacts to always enable usesLocalArtifacts.
This commit is contained in:
@@ -300,6 +300,17 @@ void main() {
|
||||
'darwin-x64',
|
||||
);
|
||||
});
|
||||
|
||||
testWithoutContext('CachedLocalWebSdkArtifacts wrapping a versioned engine sets usesLocalArtifacts', () {
|
||||
final CachedLocalWebSdkArtifacts webArtifacts = CachedLocalWebSdkArtifacts(
|
||||
parent: artifacts,
|
||||
webSdkPath: fileSystem.path.join(fileSystem.currentDirectory.path, 'out', 'wasm_release'),
|
||||
fileSystem: fileSystem,
|
||||
platform: platform,
|
||||
operatingSystemUtils: FakeOperatingSystemUtils()
|
||||
);
|
||||
expect(webArtifacts.usesLocalArtifacts, true);
|
||||
});
|
||||
});
|
||||
|
||||
group('LocalEngineArtifacts', () {
|
||||
|
||||
Reference in New Issue
Block a user