[K/JS] Throw error when a module contains file with the same name and package (ignoring case)
This commit is contained in:
+1
@@ -24,6 +24,7 @@ internal const val MINIMIZED_MEMBER_NAMES = "-Xir-minimized-member-names"
|
||||
|
||||
internal const val KLIB_MODULE_NAME = "-Xir-module-name"
|
||||
|
||||
internal const val PER_FILE = "-Xir-per-file"
|
||||
internal const val PER_MODULE = "-Xir-per-module"
|
||||
internal const val PER_MODULE_OUTPUT_NAME = "-Xir-per-module-output-name"
|
||||
|
||||
|
||||
+7
-3
@@ -7,7 +7,8 @@ package org.jetbrains.kotlin.gradle.targets.js.ir
|
||||
|
||||
enum class KotlinJsIrOutputGranularity {
|
||||
WHOLE_PROGRAM,
|
||||
PER_MODULE;
|
||||
PER_MODULE,
|
||||
PER_FILE;
|
||||
|
||||
companion object {
|
||||
fun byArgument(argument: String): KotlinJsIrOutputGranularity? =
|
||||
@@ -17,6 +18,9 @@ enum class KotlinJsIrOutputGranularity {
|
||||
}
|
||||
|
||||
fun KotlinJsIrOutputGranularity.toCompilerArgument(): String {
|
||||
val perModule = this == KotlinJsIrOutputGranularity.PER_MODULE
|
||||
return "$PER_MODULE=$perModule"
|
||||
return when (this) {
|
||||
KotlinJsIrOutputGranularity.PER_FILE -> PER_FILE
|
||||
KotlinJsIrOutputGranularity.PER_MODULE -> PER_MODULE
|
||||
KotlinJsIrOutputGranularity.WHOLE_PROGRAM -> ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user