Refactor the mechanism how script configurations are updated

Introduce file attributes cache, which is only applicable when no dependencies are cached in memory cache
Refactor ScriptDependenciesCache to memory cache that is able to get configuration from cache and checks if it is up to date
Move all public methods to ScriptDependenciesManager
Introduce ScriptClassRootsManager that checks if root change event should be called after script configuration update
This commit is contained in:
Natalia Selezneva
2019-08-22 11:59:32 +03:00
parent dc46f73ecf
commit 961e8c2c74
37 changed files with 1025 additions and 898 deletions
@@ -431,7 +431,7 @@ public abstract class CodegenTestCase extends KtUsefulTestCase {
if (externalImportsProvider != null) {
myEnvironment.getSourceFiles().forEach(
file -> {
ScriptCompilationConfigurationWrapper refinedConfiguration = ErrorHandlingKt.valueOrNull(externalImportsProvider.getScriptConfigurationResult(file));
ScriptCompilationConfigurationWrapper refinedConfiguration = externalImportsProvider.getScriptConfiguration(file);
if (refinedConfiguration != null) {
files.addAll(refinedConfiguration.getDependenciesClassPath());
}