Commit ce08bf9a authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

Log checksum validation errors at trace level (#11944)

Checksum validation is intended only as a performance improvement.
Checksum de-serialization errors (typically framework version mismatch) are
expected on framework updates and shouldn't be user-visible except for
informational purposes when --verbose is set.
parent de736f0d
...@@ -248,9 +248,9 @@ class Snapshotter { ...@@ -248,9 +248,9 @@ class Snapshotter {
final Checksum newChecksum = new Checksum.fromFiles(type, mainPath, checksumPaths); final Checksum newChecksum = new Checksum.fromFiles(type, mainPath, checksumPaths);
return oldChecksum != newChecksum; return oldChecksum != newChecksum;
} }
} catch (e, s) { } catch (e) {
// Log exception and continue, this step is a performance improvement only. // Log exception and continue, this step is a performance improvement only.
printTrace('Error during snapshot checksum output: $e\n$s'); printTrace('Rebuilding snapshot due to checksum validation error: $e');
} }
return true; return true;
} }
...@@ -263,7 +263,7 @@ class Snapshotter { ...@@ -263,7 +263,7 @@ class Snapshotter {
await fs.file(checksumsPath).writeAsString(checksum.toJson()); await fs.file(checksumsPath).writeAsString(checksum.toJson());
} catch (e, s) { } catch (e, s) {
// Log exception and continue, this step is a performance improvement only. // Log exception and continue, this step is a performance improvement only.
print('Error during snapshot checksum output: $e\n$s'); printTrace('Error during snapshot checksum output: $e\n$s');
} }
} }
} }
...@@ -299,12 +299,12 @@ Future<String> _buildAotSnapshot( ...@@ -299,12 +299,12 @@ Future<String> _buildAotSnapshot(
..addAll(outputPaths); ..addAll(outputPaths);
final Checksum newChecksum = new Checksum.fromFiles(snapshotType, mainPath, snapshotInputPaths); final Checksum newChecksum = new Checksum.fromFiles(snapshotType, mainPath, snapshotInputPaths);
if (oldChecksum == newChecksum) { if (oldChecksum == newChecksum) {
printStatus('Skipping AOT snapshot build. Checksums match.'); printTrace('Skipping AOT snapshot build. Checksums match.');
return outputPath; return outputPath;
} }
} catch (e, s) { } catch (e) {
// Log exception and continue, this step is a performance improvement only. // Log exception and continue, this step is a performance improvement only.
printStatus('Error during AOT snapshot checksum check: $e\n$s'); printTrace('Rebuilding snapshot due to checksum validation error: $e');
} }
} }
...@@ -379,7 +379,7 @@ Future<String> _buildAotSnapshot( ...@@ -379,7 +379,7 @@ Future<String> _buildAotSnapshot(
await checksumFile.writeAsString(checksum.toJson()); await checksumFile.writeAsString(checksum.toJson());
} catch (e, s) { } catch (e, s) {
// Log exception and continue, this step is a performance improvement only. // Log exception and continue, this step is a performance improvement only.
printStatus('Error during AOT snapshot checksum output: $e\n$s'); printTrace('Error during AOT snapshot checksum output: $e\n$s');
} }
return outputPath; return outputPath;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment