[JS IR] Build stdlib using compiler from repo
Previously JS IR versions of stdlib and kotlin-test were build
by default using compiler previously built on a buildserver.
It had some issues:
- This required us to advance bootstrap every time we made any
incompatible IR changes. This happens often since IR ABI is
not quite stable yet.
- We never tested the exact combination of compiler and stdlib we publish
We tested:
- new compiler with new stdlib build by new compiler (in box tests)
- old compiler with new stdlib build by old compiler (in stdlib tests)
We published:
- new compiler with new stdlib build by old compiler
After this change JS IR compiler tests, builds and publishes
single configuration:
new compiler with new stdlib build by new compiler
JS IR stdlib and kotlin-test are now built using JavaExec of CLI instead
of Gradle plugin to avoid troubles of loading a freshly built plugin.
This also allows to have a granular dependencies: we don't rebuild klib
if we changed a lowering in a compiler backend, but we do rebuild it if
we changed IR serialization algorithm.
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ import kotlin.script.experimental.jvm.JsDependency
|
||||
fun loadScriptConfiguration(configuration: CompilerConfiguration) {
|
||||
val scriptConfiguration = ScriptCompilationConfiguration {
|
||||
baseClass("kotlin.Any")
|
||||
dependencies.append(JsDependency("compiler/ir/serialization.js/build/fullRuntime/klib"))
|
||||
dependencies.append(JsDependency("libraries/stdlib/js-ir/build/fullRuntime/klib"))
|
||||
platform.put("JS")
|
||||
}
|
||||
configuration.add(
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ fun createCompileResult(lineId: LineId, code: String): ReplCompileResult.Compile
|
||||
|
||||
class DependencyLoader {
|
||||
// TODO: this should be taken from CompilerConfiguration
|
||||
private val commonPath = "compiler/ir/serialization.js/build/fullRuntime/klib"
|
||||
private val commonPath = "libraries/stdlib/js-ir/build/fullRuntime/klib"
|
||||
private val mappedNamesPath = "$commonPath/mappedNames.txt"
|
||||
private val scriptDependencyBinaryPath = "$commonPath/scriptDependencyBinary.js"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user