mirror of
https://github.com/status-im/metro.git
synced 2025-01-17 14:41:09 +00:00
Improve error logging when rebuild fails
Summary: public We're seeing intermittent errors on the packager when rebasing. Since this is very hard to repro lets add more logging to the warning we show just before starting to rebuild the entire haste map again Reviewed By: frantic Differential Revision: D2585427 fb-gh-sync-id: fbfa953f6c8ae78cbee2f3ab19ad494b084165c8
This commit is contained in:
parent
213c18d221
commit
abeaa5bc9b
@ -211,9 +211,13 @@ class DependencyGraph {
|
|||||||
// we are in an error state and we should decide to do a full rebuild.
|
// we are in an error state and we should decide to do a full rebuild.
|
||||||
this._loading = this._loading.finally(() => {
|
this._loading = this._loading.finally(() => {
|
||||||
if (this._hasteMapError) {
|
if (this._hasteMapError) {
|
||||||
|
console.warn(
|
||||||
|
'Rebuilding haste map to recover from error:\n' +
|
||||||
|
this._hasteMapError.stack
|
||||||
|
);
|
||||||
this._hasteMapError = null;
|
this._hasteMapError = null;
|
||||||
|
|
||||||
// Rebuild the entire map if last change resulted in an error.
|
// Rebuild the entire map if last change resulted in an error.
|
||||||
console.warn('Rebuilding haste map to recover from error');
|
|
||||||
this._loading = this._hasteMap.build();
|
this._loading = this._hasteMap.build();
|
||||||
} else {
|
} else {
|
||||||
this._loading = this._hasteMap.processFileChange(type, absPath);
|
this._loading = this._hasteMap.processFileChange(type, absPath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user