Skip to content

Commit

Permalink
Compute suggestions first before (possibly) overriding .bindings file
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach committed Feb 7, 2024
1 parent 76f47a7 commit 11776a6
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,21 +517,19 @@ Callable<Boolean> doSerializeLibrary(
new ImportExportCache.CachedBindings(
libraryName, new ImportExportCache.MapToBindings(map), snd);
try {
boolean result;
boolean result =
doSerializeLibrarySuggestions(compiler, libraryName, useGlobalCacheLocations);
try {
var cache = ImportExportCache.create(libraryName);
var file = saveCache(cache, bindingsCache, useGlobalCacheLocations);
result = file.isPresent();
result &= file.isPresent();
} catch (Throwable e) {
logSerializationManager(
Level.SEVERE,
"Serialization of bindings `" + libraryName + "` failed: " + e.getMessage() + "`",
e);
throw e;
}

result &= doSerializeLibrarySuggestions(compiler, libraryName, useGlobalCacheLocations);

return result;
} finally {
pool.finishSerializing(toQualifiedName(libraryName));
Expand Down

0 comments on commit 11776a6

Please sign in to comment.