Skip to content

Commit

Permalink
Avoid using cached bindings when the module isn't loaded from cache (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
JaroslavTulach authored Jan 5, 2024
1 parent 41fe87f commit 8396bfa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,12 @@ class Compiler(
)

val requiredModules = modules.flatMap { module =>
val importedModules = runImportsAndExportsResolution(module, generateCode)
val isLoadedFromSource =
(m: Module) => !context.wasLoadedFromCache(m) && !context.isSynthetic(m)
val importedModules = runImportsAndExportsResolution(
module,
generateCode && context.wasLoadedFromCache(module)
)
if (
shouldCompileDependencies &&
context.wasLoadedFromCache(module) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ public final Optional<T> load(EnsoContext context) {
}

logger.log(logLevel, "Unable to load a cache [" + logName + "]");
} catch (IOException e) {
logger.log(
Level.FINE, "Unable to load a cache [" + logName + "]: " + e.getMessage(), e);
} catch (Exception e) {
logger.log(
Level.WARNING,
Expand Down

0 comments on commit 8396bfa

Please sign in to comment.