chore: lake: add build log file path to warning (#4356)

Adds the path to build log to the warning for a missing/invalid build
log to help with debugging.
This commit is contained in:
Mac Malone 2024-06-05 11:18:08 -04:00 committed by GitHub
parent 9d47377bda
commit 9c079a42e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -112,9 +112,9 @@ def replayBuildLog (logFile : FilePath) (depTrace : BuildTrace) : LogIO PUnit :=
| .ok {log, depHash : BuildLog} =>
if depTrace.hash == depHash then
log.replay
| .error e => logWarning s!"failed to read cached build log: {e}"
| .error e => logWarning s!"{logFile}: invalid build log: {e}"
| .error (.noFileOrDirectory ..) => pure ()
| .error e => logWarning s!"failed to read cached build log: {e}"
| .error e => logWarning s!"{logFile}: read failed: {e}"
/-- Saves the log produce by `build` as JSON to `logFile`. -/
def cacheBuildLog