Skip to content

Commit

Permalink
chore: lake: add build log file path to warning (#4356)
Browse files Browse the repository at this point in the history
Adds the path to build log to the warning for a missing/invalid build
log to help with debugging.
  • Loading branch information
tydeu authored Jun 5, 2024
1 parent 9d47377 commit 9c079a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lake/Lake/Build/Common.lean
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c079a4

Please sign in to comment.