mirror of
https://github.com/pestphp/pest.git
synced 2026-06-05 02:52:12 +02:00
wip
This commit is contained in:
@ -75,12 +75,22 @@ final readonly class ChangedFiles
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (! $exists) {
|
if (! $exists) {
|
||||||
// Missing now. If the snapshot recorded it as absent too
|
// Missing on disk. We always invalidate here, even when
|
||||||
// (sentinel ''), state is identical to last run — unchanged.
|
// the snapshot also recorded "deleted" (sentinel '').
|
||||||
// Otherwise it was present last run and got deleted since.
|
// The `snapshot=='' && !exists` shortcut would in
|
||||||
if ($snapshot !== '') {
|
// principle say "no change since last run, cached
|
||||||
$remaining[] = $file;
|
// result is still valid" — but it's only safe if the
|
||||||
}
|
// cached result was recorded *during* a run that saw
|
||||||
|
// the file as deleted. A previous run that captured
|
||||||
|
// the deletion in `lastRunTree` but failed to refresh
|
||||||
|
// the cached pass/fail (paratest worker race, an
|
||||||
|
// earlier plugin bug, etc.) would leave the cache
|
||||||
|
// stuck on a stale pass from before the deletion.
|
||||||
|
// Skipping invalidation in that state perpetuates the
|
||||||
|
// wrong result on every subsequent run. Treat any
|
||||||
|
// missing file as a change; cost is one re-run per
|
||||||
|
// `--tia` while the file stays deleted.
|
||||||
|
$remaining[] = $file;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user