Fixes after review

This commit is contained in:
Ilya Chernikov
2018-01-15 12:49:50 +01:00
committed by Vyacheslav Gerasimov
parent 14e586d5a5
commit 058ef31d7a
15 changed files with 41 additions and 51 deletions
@@ -527,7 +527,9 @@ class KotlinCoreEnvironment private constructor(
?: PathUtil.getResourcePathForClass(this::class.java).takeIf { it.hasConfigFile(configFilePath) }
// hack for load extensions when compiler run directly from project directory (e.g. in tests)
?: File("compiler/cli/src").takeIf { it.hasConfigFile(configFilePath) }
?: throw IllegalStateException("Unable to find extension point configuration $configFilePath (cp:\n ${(Thread.currentThread().contextClassLoader as? UrlClassLoader)?.urls?.joinToString("\n ") { it.file }})")
?: throw IllegalStateException(
"Unable to find extension point configuration $configFilePath " +
"(cp:\n ${(Thread.currentThread().contextClassLoader as? UrlClassLoader)?.urls?.joinToString("\n ") { it.file }})")
CoreApplicationEnvironment.registerExtensionPointAndExtensions(pluginRoot, configFilePath, Extensions.getRootArea())
}