Skip to content

Commit

Permalink
DEBUG ONLY: Add printf() to debug CI test failurew
Browse files Browse the repository at this point in the history
  • Loading branch information
digit-google committed Sep 4, 2024
1 parent 647ac2a commit ebbef6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/deps_log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ LoadStatus DepsLog::Load(const string& path, State* state, string* err) {
int version = 0;
if (!fgets(buf, sizeof(buf), f) || fread(&version, 4, 1, f) < 1)
valid_header = false;

// DEBUG ONLY
fprintf(stderr, "DEPSLOG version=%0xd header=[%s] valid_header=%d\n", version,
buf, valid_header ? 1 : 0);

// Note: For version differences, this should migrate to the new format.
// But the v1 format could sometimes (rarely) end up with invalid data, so
// don't migrate v1 to v3 to force a rebuild. (v2 only existed for a few days,
Expand Down

0 comments on commit ebbef6c

Please sign in to comment.