Change policy with legacy compiler backend
[JS] Remove incremental js jps test [JS] Remove test of maven js archetype [JS] Fix another one test [JS] Fix tests for jps [JS] Try to fix maven test data [JS] Fix test data [JS] Fix test data for ant [JS] Fix jsExtraHelp test [JS] Fix test run from not-Gradle build tools [JS] Set flag without compiler error [JS] Disable warnings and errors in legacy compiler called from Gradle [JS] Proofread messages [JS] Not proofread messages KT-42326
This commit is contained in:
committed by
Space Team
parent
a3ad0a6e88
commit
c726360ad2
@@ -70,6 +70,11 @@
|
||||
<goals>
|
||||
<goal>js</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-compile</id>
|
||||
|
||||
@@ -65,6 +65,11 @@
|
||||
<goals>
|
||||
<goal>js</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>test-compile</id>
|
||||
|
||||
@@ -52,6 +52,11 @@
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
||||
@@ -57,6 +57,9 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputFile>${project.build.outputDirectory}/${project.artifactId}.js</outputFile>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
+29
-16
@@ -11,7 +11,6 @@ import org.gradle.api.Named
|
||||
import org.gradle.api.NamedDomainObjectContainer
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.internal.plugins.DslObject
|
||||
import org.gradle.api.logging.Logger
|
||||
import org.gradle.jvm.toolchain.JavaLanguageVersion
|
||||
import org.gradle.jvm.toolchain.JavaToolchainSpec
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
@@ -227,31 +226,45 @@ abstract class KotlinJsProjectExtension(project: Project) :
|
||||
KotlinJsCompilerType.LEGACY -> logger.warn(LEGACY_DEPRECATED)
|
||||
KotlinJsCompilerType.IR -> {}
|
||||
KotlinJsCompilerType.BOTH -> logger.warn(BOTH_DEPRECATED)
|
||||
null -> throw GradleException(DEFAULT_WARN)
|
||||
null -> throw GradleException(DEFAULT_COMPILER_ERROR)
|
||||
}
|
||||
}
|
||||
|
||||
private val LEGACY_DEPRECATED =
|
||||
"""
|
||||
The Kotlin/JS Legacy compiler backend is deprecated and will be removed in a future release.
|
||||
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir)
|
||||
""".trimIndent()
|
||||
|
|
||||
|==========
|
||||
|This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
|
||||
|
|
||||
|Please migrate the project to the new IR-based compiler (https://kotl.in/jsir).
|
||||
|==========
|
||||
|
|
||||
""".trimMargin()
|
||||
|
||||
private val BOTH_DEPRECATED =
|
||||
"""
|
||||
Both mode is using the Kotlin/JS Legacy compiler backend, which is deprecated and will be removed in a future release.
|
||||
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir)
|
||||
""".trimIndent()
|
||||
|
|
||||
|==========
|
||||
|This project currently uses Both mode, which requires the Kotlin/JS Legacy compiler backend.
|
||||
|This backend has been deprecated and will be removed in a future release.
|
||||
|
|
||||
|Please migrate the project to the new IR-based compiler (https://kotl.in/jsir).
|
||||
|==========
|
||||
|
|
||||
""".trimMargin()
|
||||
|
||||
private val DEFAULT_WARN =
|
||||
private val DEFAULT_COMPILER_ERROR =
|
||||
"""
|
||||
The Kotlin/JS legacy compiler is no longer default. Please specify a compiler explicitly, via:
|
||||
- kotlin.js.compiler=ir|legacy in your gradle.properties
|
||||
- js(IR|LEGACY) { ... } in your build file.
|
||||
|
||||
Note, that the legacy compiler backend is deprecated and will be removed in a future release.
|
||||
Using the new IR-based compiler is recommended (https://kotl.in/jsir)
|
||||
""".trimIndent()
|
||||
|
|
||||
|==========
|
||||
|This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
|
||||
|Please migrate the project to the new IR-based compiler (https://kotl.in/jsir) by adding:
|
||||
|- kotlin.js.compiler=ir to your gradle.properties file.
|
||||
|- js(IR) { ... } to your build file.
|
||||
|You can continue to use the deprecated legacy compiler in the current version of the toolchain by specifying it explicitly.
|
||||
|==========
|
||||
|
|
||||
""".trimMargin()
|
||||
}
|
||||
|
||||
@Deprecated("Use js() instead", ReplaceWith("js()"))
|
||||
|
||||
+2
-1
@@ -1151,7 +1151,8 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
||||
}
|
||||
|
||||
args.friendModules = friendDependencies.files.joinToString(File.pathSeparator) { it.absolutePath }
|
||||
args.legacyDeprecatedNoWarn = jsLegacyNoWarn.get()
|
||||
args.legacyDeprecatedNoWarn = true
|
||||
args.useDeprecatedLegacyCompiler = true
|
||||
|
||||
logger.kotlinDebug("compiling with args ${ArgumentUtils.convertArgumentsToStringList(args)}")
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
</goals>
|
||||
<configuration>
|
||||
<output>${project.basedir}/customOutput/</output>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
@@ -39,6 +42,11 @@
|
||||
<goals>
|
||||
<goal>test-js</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
<configuration>
|
||||
<args>
|
||||
<arg>-Xno-inline</arg>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
</executions>
|
||||
<configuration>
|
||||
<moduleKind>umd</moduleKind>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
<configuration>
|
||||
<sourceMap>true</sourceMap>
|
||||
<sourceMapPrefix>prefixprefix/</sourceMapPrefix>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
<configuration>
|
||||
<sourceMap>true</sourceMap>
|
||||
<sourceMapEmbedSources>always</sourceMapEmbedSources>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
</executions>
|
||||
<configuration>
|
||||
<nowarn>true</nowarn>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -51,6 +51,9 @@
|
||||
|
||||
<configuration>
|
||||
<multiPlatform>true</multiPlatform>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
@@ -62,6 +65,9 @@
|
||||
|
||||
<configuration>
|
||||
<multiPlatform>true</multiPlatform>
|
||||
<args>
|
||||
<arg>-Xuse-deprecated-legacy-compiler</arg>
|
||||
</args>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
#Mon Nov 30 19:53:25 MSK 2015
|
||||
package=it.pkg
|
||||
version=0.1-SNAPSHOT
|
||||
groupId=archetype.it
|
||||
artifactId=basic
|
||||
kotlinVersion=${project.version}
|
||||
-1
@@ -1 +0,0 @@
|
||||
package
|
||||
Reference in New Issue
Block a user