Skip to content

Commit

Permalink
Preload all source headers before writing the lib cache
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Oct 3, 2024
1 parent dfc362c commit ca89e26
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ func (lm *LibrariesManager) loadLibrariesFromDir(librariesDir *LibrariesDir) []*
s := status.Newf(codes.FailedPrecondition, "creating lib cache %[1]s: %[2]s", cacheFilePath, err)
return append(statuses, s)
}
// Preload source files and header
for _, lib := range loadedLibs {
lib.SourceHeaders()
}
// Write the cache
err = loadedLibs.MarshalBinary(cache, librariesDir.Path)
cache.Close()
if err != nil {
Expand Down

0 comments on commit ca89e26

Please sign in to comment.