[K/JS] Remove an internal system property and replace it with the new compiler flag

This commit is contained in:
Artem Kobzar
2023-03-17 12:38:34 +00:00
committed by Space Team
parent ca2492e1f8
commit 4da81b2b6e
164 changed files with 100 additions and 566 deletions
@@ -55,8 +55,7 @@ enum class CompilerSystemProperties(val property: String, val alwaysDirectAccess
USER_HOME("user.home", alwaysDirectAccess = true), USER_HOME("user.home", alwaysDirectAccess = true),
JAVA_VERSION("java.specification.version", alwaysDirectAccess = true), JAVA_VERSION("java.specification.version", alwaysDirectAccess = true),
JAVA_HOME("java.home", alwaysDirectAccess = true), JAVA_HOME("java.home", alwaysDirectAccess = true),
JAVA_CLASS_PATH("java.class.path", alwaysDirectAccess = true), JAVA_CLASS_PATH("java.class.path", alwaysDirectAccess = true)
KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED("kotlin.js.compiler.legacy.force_enabled", alwaysDirectAccess = true)
; ;
private fun <T> getProperFunction(custom: T?, default: T): T { private fun <T> getProperFunction(custom: T?, default: T): T {
@@ -590,20 +590,10 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
} }
@Argument( @Argument(
value = "-Xuse-deprecated-legacy-compiler", value = "-Xforce-deprecated-legacy-compiler-usage",
description = "Use deprecated legacy compiler without error" description = "The flag is used only for our inner infrastructure. It will be removed soon, so it's unsafe to use it nowadays."
) )
var useDeprecatedLegacyCompiler = false var forceDeprecatedLegacyCompilerUsage = false
set(value) {
checkFrozen()
field = value
}
@Argument(
value = "-Xlegacy-deprecated-no-warn",
description = "Disable warnings of deprecation of legacy compiler"
)
var legacyDeprecatedNoWarn = false
set(value) { set(value) {
checkFrozen() checkFrozen()
field = value field = value
@@ -623,11 +613,6 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
collector.deprecationWarn(irBaseClassInMetadata, false, "-Xir-base-class-in-metadata") collector.deprecationWarn(irBaseClassInMetadata, false, "-Xir-base-class-in-metadata")
collector.deprecationWarn(irNewIr2Js, true, "-Xir-new-ir2js") collector.deprecationWarn(irNewIr2Js, true, "-Xir-new-ir2js")
if (languageVersion >= LanguageVersion.KOTLIN_1_9 && CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value != "true") {
collector.deprecationWarn(legacyDeprecatedNoWarn, false, "-Xlegacy-deprecated-no-warn")
collector.deprecationWarn(useDeprecatedLegacyCompiler, false, "-Xuse-deprecated-legacy-compiler")
}
return super.configureAnalysisFlags(collector, languageVersion).also { return super.configureAnalysisFlags(collector, languageVersion).also {
it[allowFullyQualifiedNameInKClass] = wasm && wasmKClassFqn //Only enabled WASM BE supports this flag it[allowFullyQualifiedNameInKClass] = wasm && wasmKClassFqn //Only enabled WASM BE supports this flag
} }
@@ -185,29 +185,12 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
} }
LanguageVersionSettings languageVersionSettings = CommonConfigurationKeysKt.getLanguageVersionSettings(configuration); LanguageVersionSettings languageVersionSettings = CommonConfigurationKeysKt.getLanguageVersionSettings(configuration);
if (!Objects.equals(CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.getValue(), "true") && languageVersionSettings.getLanguageVersion().compareTo(LanguageVersion.KOTLIN_1_9) >= 0) {
if (!arguments.getForceDeprecatedLegacyCompilerUsage() && languageVersionSettings.getLanguageVersion().compareTo(LanguageVersion.KOTLIN_1_9) >= 0) {
messageCollector.report(ERROR, "Old Kotlin/JS compiler is no longer supported. Please migrate to the new JS IR backend", null); messageCollector.report(ERROR, "Old Kotlin/JS compiler is no longer supported. Please migrate to the new JS IR backend", null);
return COMPILATION_ERROR; return COMPILATION_ERROR;
} }
String deprecatedMessage = "==========\n" +
"This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.\n" +
"\n" +
"Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).\n" +
"Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.\n" +
"\n" +
"You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.\n" +
"==========";
if (!arguments.getUseDeprecatedLegacyCompiler()) {
messageCollector.report(ERROR, deprecatedMessage, null);
return COMPILATION_ERROR;
}
if (!arguments.getLegacyDeprecatedNoWarn()) {
messageCollector.report(STRONG_WARNING, deprecatedMessage, null);
}
if (arguments.getFreeArgs().isEmpty() && (!incrementalCompilationIsEnabledForJs(arguments))) { if (arguments.getFreeArgs().isEmpty() && (!incrementalCompilationIsEnabledForJs(arguments))) {
if (arguments.getVersion()) { if (arguments.getVersion()) {
return OK; return OK;
@@ -43,9 +43,7 @@ abstract class AbstractIncrementalJsCompilerRunnerTest : AbstractIncrementalComp
outputFile = File(destinationDir, "${testDir.name}.js").path outputFile = File(destinationDir, "${testDir.name}.js").path
sourceMap = true sourceMap = true
metaInfo = true metaInfo = true
useDeprecatedLegacyCompiler = true forceDeprecatedLegacyCompilerUsage = true
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
} }
protected open val scopeExpansionMode = CompileScopeExpansionMode.NEVER protected open val scopeExpansionMode = CompileScopeExpansionMode.NEVER
@@ -29,9 +29,7 @@ abstract class AbstractIncrementalMultiModuleJsCompilerRunnerTest :
K2JSCompilerArguments().apply { K2JSCompilerArguments().apply {
sourceMap = true sourceMap = true
metaInfo = true metaInfo = true
useDeprecatedLegacyCompiler = true forceDeprecatedLegacyCompilerUsage = true
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
} }
override fun makeForSingleModule( override fun makeForSingleModule(
+1 -2
View File
@@ -1,6 +1,5 @@
compiler/testData/integration/ant/js/simpleWithoutStdlibAndFolderAsAnotherLib/jslib-example/LibraryExample.kt compiler/testData/integration/ant/js/simpleWithoutStdlibAndFolderAsAnotherLib/jslib-example/LibraryExample.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-meta-info -meta-info
-output -output
$TEMP_DIR$/jslib-example.js $TEMP_DIR$/jslib-example.js
+1 -2
View File
@@ -1,6 +1,5 @@
$TEMP_DIR$ $TEMP_DIR$
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-no-stdlib -no-stdlib
-output -output
$TESTDATA_DIR$ $TESTDATA_DIR$
+1 -2
View File
@@ -1,5 +1,4 @@
$TESTDATA_DIR$/inlineCycle.kt $TESTDATA_DIR$/inlineCycle.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-output -output
$TEMP_DIR$ $TEMP_DIR$
+2 -3
View File
@@ -6,6 +6,8 @@ where advanced options include:
-Xenable-extension-functions-in-externals -Xenable-extension-functions-in-externals
Enable extensions functions members in external interfaces Enable extensions functions members in external interfaces
-Xfake-override-validator Enable IR fake override validator -Xfake-override-validator Enable IR fake override validator
-Xforce-deprecated-legacy-compiler-usage
The flag is used only for our inner infrastructure. It will be removed soon, so it's unsafe to use it nowadays.
-Xfriend-modules=<path> Paths to friend modules -Xfriend-modules=<path> Paths to friend modules
-Xfriend-modules-disabled Disable internal declaration export -Xfriend-modules-disabled Disable internal declaration export
-Xgenerate-dts Generate TypeScript declarations .d.ts file alongside JS file. Available in IR backend only. -Xgenerate-dts Generate TypeScript declarations .d.ts file alongside JS file. Available in IR backend only.
@@ -37,13 +39,10 @@ where advanced options include:
-Xir-safe-external-boolean Safe access via Boolean() to Boolean properties in externals to safely cast falsy values. -Xir-safe-external-boolean Safe access via Boolean() to Boolean properties in externals to safely cast falsy values.
-Xir-safe-external-boolean-diagnostic={log|exception} -Xir-safe-external-boolean-diagnostic={log|exception}
Enable runtime diagnostics when access safely to boolean in external declarations Enable runtime diagnostics when access safely to boolean in external declarations
-Xlegacy-deprecated-no-warn Disable warnings of deprecation of legacy compiler
-Xmetadata-only Generate *.meta.js and *.kjsm files only -Xmetadata-only Generate *.meta.js and *.kjsm files only
-Xpartial-linkage Allow unlinked symbols -Xpartial-linkage Allow unlinked symbols
-Xstrict-implicit-export-types Generate strict types for implicitly exported entities inside d.ts files. Available in IR backend only. -Xstrict-implicit-export-types Generate strict types for implicitly exported entities inside d.ts files. Available in IR backend only.
-Xtyped-arrays Translate primitive arrays to JS typed arrays -Xtyped-arrays Translate primitive arrays to JS typed arrays
-Xuse-deprecated-legacy-compiler
Use deprecated legacy compiler without error
-Xes-classes Generated JavaScript will use ES2015 classes. -Xes-classes Generated JavaScript will use ES2015 classes.
-Xwasm Use experimental WebAssembly compiler backend -Xwasm Use experimental WebAssembly compiler backend
-Xwasm-debug-info Add debug info to WebAssembly compiled module -Xwasm-debug-info Add debug info to WebAssembly compiled module
-7
View File
@@ -1,7 +0,0 @@
$TESTDATA_DIR$/languageVersion.kt
-Xlegacy-deprecated-no-warn
-Xuse-deprecated-legacy-compiler
-output
$TEMP_DIR$/out.js
-language-version
1.9
-2
View File
@@ -1,2 +0,0 @@
error: old Kotlin/JS compiler is no longer supported. Please migrate to the new JS IR backend
COMPILATION_ERROR
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/simple2js.kt $TESTDATA_DIR$/simple2js.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-kotlin-home -kotlin-home
$TESTDATA_DIR$ $TESTDATA_DIR$
-output -output
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/../kotlinPackage.kt $TESTDATA_DIR$/../kotlinPackage.kt
-no-stdlib -no-stdlib
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-output -output
$TEMP_DIR$/out.js $TEMP_DIR$/out.js
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/languageVersion.kt $TESTDATA_DIR$/languageVersion.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-output -output
$TEMP_DIR$/out.js $TEMP_DIR$/out.js
-language-version -language-version
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/withLib.kt $TESTDATA_DIR$/withLib.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-libraries -libraries
not/existing/path not/existing/path
-output -output
@@ -1,14 +1,12 @@
$TESTDATA_DIR$/separateModules/sepModule1.kt $TESTDATA_DIR$/separateModules/sepModule1.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-meta-info -meta-info
-Xmetadata-only -Xmetadata-only
-output -output
$TEMP_DIR$/m1/m1.js $TEMP_DIR$/m1/m1.js
--- ---
$TESTDATA_DIR$/separateModules/sepModule2.kt $TESTDATA_DIR$/separateModules/sepModule2.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-libraries -libraries
$TEMP_DIR$/m1 $TEMP_DIR$/m1
-output -output
+2 -4
View File
@@ -1,13 +1,11 @@
$TESTDATA_DIR$/separateModules/sepModule1.kt $TESTDATA_DIR$/separateModules/sepModule1.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-meta-info -meta-info
-output -output
$TEMP_DIR$/m1/m.js $TEMP_DIR$/m1/m.js
--- ---
$TESTDATA_DIR$/separateModules/sepModule2.kt $TESTDATA_DIR$/separateModules/sepModule2.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-libraries -libraries
$TEMP_DIR$/m1 $TEMP_DIR$/m1
-output -output
+2 -4
View File
@@ -1,13 +1,11 @@
$TESTDATA_DIR$/separateModules/sepModule3.kt $TESTDATA_DIR$/separateModules/sepModule3.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-meta-info -meta-info
-output -output
$TEMP_DIR$/m3/m.js $TEMP_DIR$/m3/m.js
--- ---
$TESTDATA_DIR$/separateModules/sepModule4.kt $TESTDATA_DIR$/separateModules/sepModule4.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-libraries -libraries
$TEMP_DIR$/m3 $TEMP_DIR$/m3
-output -output
+1 -2
View File
@@ -1,6 +1,5 @@
not/existing/path not/existing/path
-no-stdlib -no-stdlib
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-output -output
$TESTDATA_DIR$ $TESTDATA_DIR$
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/withLib.kt $TESTDATA_DIR$/withLib.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-libraries -libraries
compiler/testData/integration/ant/js/simpleWithJsFileAsAnotherLib compiler/testData/integration/ant/js/simpleWithJsFileAsAnotherLib
-output -output
+1 -2
View File
@@ -1,5 +1,4 @@
$TESTDATA_DIR$/simple2js.kt $TESTDATA_DIR$/simple2js.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-output -output
$TESTDATA_DIR$ $TESTDATA_DIR$
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/simple2js.kt $TESTDATA_DIR$/simple2js.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-output -output
$TEMP_DIR$/out.js $TEMP_DIR$/out.js
-output-postfix -output-postfix
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/simple2js.kt $TESTDATA_DIR$/simple2js.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-output -output
$TEMP_DIR$/out.js $TEMP_DIR$/out.js
-output-prefix -output-prefix
+1 -2
View File
@@ -1,5 +1,4 @@
$TESTDATA_DIR$/reifiedIntersectionType.kt $TESTDATA_DIR$/reifiedIntersectionType.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-output -output
$TEMP_DIR$/out.js $TEMP_DIR$/out.js
+1 -2
View File
@@ -1,5 +1,4 @@
$TESTDATA_DIR$/simple2js.kt $TESTDATA_DIR$/simple2js.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-output -output
$TEMP_DIR$/out.js $TEMP_DIR$/out.js
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/sourceMap.kt $TESTDATA_DIR$/sourceMap.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-source-map-prefix -source-map-prefix
./ ./
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/sourceMapCharEscape.kt $TESTDATA_DIR$/sourceMapCharEscape.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-source-map-embed-sources -source-map-embed-sources
always always
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/sourceMapDuplicatePath/ $TESTDATA_DIR$/sourceMapDuplicatePath/
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-source-map-base-dirs -source-map-base-dirs
$TESTDATA_DIR$/sourceMapDuplicatePath/foo:$TESTDATA_DIR$/sourceMapDuplicatePath/bar $TESTDATA_DIR$/sourceMapDuplicatePath/foo:$TESTDATA_DIR$/sourceMapDuplicatePath/bar
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/sourceMap.kt $TESTDATA_DIR$/sourceMap.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-source-map-prefix -source-map-prefix
./ ./
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/sourceMap.kt $TESTDATA_DIR$/sourceMap.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-source-map-prefix -source-map-prefix
/localhost/src/ /localhost/src/
+2 -4
View File
@@ -1,14 +1,12 @@
$TESTDATA_DIR$/sourceMapRelativeRoot/lib/src/lib.kt $TESTDATA_DIR$/sourceMapRelativeRoot/lib/src/lib.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-meta-info -meta-info
-output -output
$TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/lib.js $TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/lib.js
--- ---
$TESTDATA_DIR$/sourceMapRelativeRoot/main/src/main.kt $TESTDATA_DIR$/sourceMapRelativeRoot/main/src/main.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-libraries -libraries
$TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/ $TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/
-source-map -source-map
+1 -2
View File
@@ -1,7 +1,6 @@
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt $TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt $TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-source-map-prefix -source-map-prefix
./ ./
+1 -2
View File
@@ -1,7 +1,6 @@
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt $TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt $TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-source-map-base-dirs -source-map-base-dirs
$TESTDATA_DIR$/ $TESTDATA_DIR$/
+1 -2
View File
@@ -2,8 +2,7 @@ $TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt $TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
$TESTDATA_DIR$/sourceMapRoot/bar/baz/file3.kt $TESTDATA_DIR$/sourceMapRoot/bar/baz/file3.kt
$TESTDATA_DIR$/sourceMapRoot/foo/baz/file4.kt $TESTDATA_DIR$/sourceMapRoot/foo/baz/file4.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-source-map-base-dirs -source-map-base-dirs
$TESTDATA_DIR$/sourceMapRoot/foo $TESTDATA_DIR$/sourceMapRoot/foo
+1 -2
View File
@@ -1,7 +1,6 @@
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt $TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt $TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-source-map -source-map
-source-map-base-dirs -source-map-base-dirs
$TESTDATA_DIR$/foo:$TESTDATA_DIR$/bar $TESTDATA_DIR$/foo:$TESTDATA_DIR$/bar
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/../warnings.kt $TESTDATA_DIR$/../warnings.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-nowarn -nowarn
-output -output
$TEMP_DIR$/out.js $TEMP_DIR$/out.js
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/withLib.kt $TESTDATA_DIR$/withLib.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-libraries -libraries
$TESTDATA_DIR$/folderAsLib $TESTDATA_DIR$/folderAsLib
-output -output
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/withLib.kt $TESTDATA_DIR$/withLib.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-libraries -libraries
$TESTDATA_DIR$/lib/LibraryExample.jar $TESTDATA_DIR$/lib/LibraryExample.jar
-output -output
+1 -2
View File
@@ -1,6 +1,5 @@
$TESTDATA_DIR$/simple2js.kt $TESTDATA_DIR$/simple2js.kt
-Xlegacy-deprecated-no-warn -Xforce-deprecated-legacy-compiler-usage
-Xuse-deprecated-legacy-compiler
-no-stdlib -no-stdlib
-libraries -libraries
$TESTDATA_DIR$/wrongAbiVersionLib/wrongAbiLib.meta.js $TESTDATA_DIR$/wrongAbiVersionLib/wrongAbiLib.meta.js
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/hello.kt] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/hello.kt] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -4,7 +4,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/hello.kt" output="${temp}/out.js"> <kotlin2js src="${test.data}/hello.kt" output="${temp}/out.js">
<compilerarg value="-Xno-inline"/> <compilerarg value="-Xno-inline"/>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -6,7 +6,7 @@
output="${temp}/out.js" output="${temp}/out.js"
outputPrefix="${test.data}/prefix" outputPrefix="${test.data}/prefix"
outputPostfix="${test.data}/postfix"> outputPostfix="${test.data}/postfix">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1, [TestData]/bar.kt, [TestData]/root2/Foo.kt] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1, [TestData]/bar.kt, [TestData]/root2/Foo.kt] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
+1 -1
View File
@@ -9,7 +9,7 @@
<include name="**/*.kt"/> <include name="**/*.kt"/>
</fileset> </fileset>
</src> </src>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" outputPostfix="${test.data}/postfix"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" outputPostfix="${test.data}/postfix">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" outputPrefix="${test.data}/prefix"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" outputPrefix="${test.data}/prefix">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -2,14 +2,6 @@ OUT:
Buildfile: [TestData]/build.xml Buildfile: [TestData]/build.xml
build: build:
[java] warning: ==========
[java] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[java]
[java] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[java] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[java]
[java] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[java] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -6,10 +6,9 @@
<pathelement location="${kotlin.lib}/kotlin-stdlib.jar"/> <pathelement location="${kotlin.lib}/kotlin-stdlib.jar"/>
</classpath> </classpath>
<arg value="${test.data}/root1/foo.kt"/> <arg value="${test.data}/root1/foo.kt"/>
<arg value="-Xuse-deprecated-legacy-compiler"/> <arg value="-Xforce-deprecated-legacy-compiler-usage"/>
<arg value="-output"/> <arg value="-output"/>
<arg value="out.js"/> <arg value="out.js"/>
<sysproperty key="kotlin.js.compiler.legacy.force_enabled" value="true"/>
<jvmarg value="-noverify"/> <jvmarg value="-noverify"/>
</java> </java>
</target> </target>
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
+1 -1
View File
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -4,23 +4,7 @@ Buildfile: [TestData]/build.xml
build: build:
[mkdir] Created dir: [Temp]/lib [mkdir] Created dir: [Temp]/lib
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js] [kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[copy] Copying 2 files to [Temp] [copy] Copying 2 files to [Temp]
BUILD SUCCESSFUL BUILD SUCCESSFUL
@@ -6,14 +6,14 @@
<mkdir dir="${temp.library.path}"/> <mkdir dir="${temp.library.path}"/>
<kotlin2js src="${library.path}" output="${temp.library.path}/jslib-example.js" metaInfo="true"> <kotlin2js src="${library.path}" output="${temp.library.path}/jslib-example.js" metaInfo="true">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
<libraries> <libraries>
<pathelement path="${temp.library.path}/jslib-example.meta.js"/> <pathelement path="${temp.library.path}/jslib-example.meta.js"/>
</libraries> </libraries>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<copy todir="${temp}"> <copy todir="${temp}">
<fileset dir="${temp.library.path}"> <fileset dir="${temp.library.path}">
@@ -4,23 +4,7 @@ Buildfile: [TestData]/build.xml
build: build:
[mkdir] Created dir: [Temp]/lib [mkdir] Created dir: [Temp]/lib
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js] [kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[copy] Copying 2 files to [Temp] [copy] Copying 2 files to [Temp]
[copy] Copying 1 file to [Temp] [copy] Copying 1 file to [Temp]
@@ -6,14 +6,14 @@
<mkdir dir="${temp.library.path}"/> <mkdir dir="${temp.library.path}"/>
<kotlin2js src="${library.path}" output="${temp.library.path}/jslib-example.js" metaInfo="true" moduleKind="umd"> <kotlin2js src="${library.path}" output="${temp.library.path}/jslib-example.js" metaInfo="true" moduleKind="umd">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call" moduleKind="amd"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call" moduleKind="amd">
<libraries> <libraries>
<pathelement path="${temp.library.path}/jslib-example.meta.js"/> <pathelement path="${temp.library.path}/jslib-example.meta.js"/>
</libraries> </libraries>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<copy todir="${temp}"> <copy todir="${temp}">
<fileset dir="${temp.library.path}"> <fileset dir="${temp.library.path}">
@@ -4,36 +4,12 @@ Buildfile: [TestData]/build.xml
build: build:
[mkdir] Created dir: [Temp]/lib [mkdir] Created dir: [Temp]/lib
[kotlin2js] Compiling [[TestData]/jslib-example1] => [[Temp]/lib/jslib-example1.js] [kotlin2js] Compiling [[TestData]/jslib-example1] => [[Temp]/lib/jslib-example1.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[kotlin2js] Compiling [[TestData]/jslib-example2] => [[Temp]/lib/jslib-example2.js] [kotlin2js] Compiling [[TestData]/jslib-example2] => [[Temp]/lib/jslib-example2.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[delete] Deleting: [Temp]/lib/jslib-example1.js [delete] Deleting: [Temp]/lib/jslib-example1.js
[delete] Deleting: [Temp]/lib/jslib-example2.js [delete] Deleting: [Temp]/lib/jslib-example2.js
[delete] Deleting: [Temp]/lib/jslib-example1.meta.js [delete] Deleting: [Temp]/lib/jslib-example1.meta.js
[delete] Deleting: [Temp]/lib/jslib-example2.meta.js [delete] Deleting: [Temp]/lib/jslib-example2.meta.js
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[copy] Copying 1 file to [Temp] [copy] Copying 1 file to [Temp]
BUILD SUCCESSFUL BUILD SUCCESSFUL
@@ -7,13 +7,13 @@
<mkdir dir="${temp.library.path}"/> <mkdir dir="${temp.library.path}"/>
<kotlin2js src="${library.path1}" output="${temp.library.path}/jslib-example1.js" metaInfo="true"> <kotlin2js src="${library.path1}" output="${temp.library.path}/jslib-example1.js" metaInfo="true">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<kotlin2js src="${library.path2}" output="${temp.library.path}/jslib-example2.js" metaInfo="true"> <kotlin2js src="${library.path2}" output="${temp.library.path}/jslib-example2.js" metaInfo="true">
<libraries> <libraries>
<pathelement path="${temp.library.path}/jslib-example1.meta.js"/> <pathelement path="${temp.library.path}/jslib-example1.meta.js"/>
</libraries> </libraries>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<concat destfile="${temp.library.path}/jslib-example.js"> <concat destfile="${temp.library.path}/jslib-example.js">
@@ -32,7 +32,7 @@
<libraries> <libraries>
<pathelement path="${temp.library.path}/jslib-example.js"/> <pathelement path="${temp.library.path}/jslib-example.js"/>
</libraries> </libraries>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<copy todir="${temp}"> <copy todir="${temp}">
<fileset dir="${temp.library.path}"> <fileset dir="${temp.library.path}">
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -4,32 +4,8 @@ Buildfile: [TestData]/build.xml
build: build:
[mkdir] Created dir: [Temp]/lib [mkdir] Created dir: [Temp]/lib
[kotlin2js] Compiling [[TestData]/jslib-example1] => [[Temp]/lib/jslib-example1.js] [kotlin2js] Compiling [[TestData]/jslib-example1] => [[Temp]/lib/jslib-example1.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[kotlin2js] Compiling [[TestData]/jslib-example2] => [[Temp]/lib/jslib-example2.js] [kotlin2js] Compiling [[TestData]/jslib-example2] => [[Temp]/lib/jslib-example2.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[copy] Copying 4 files to [Temp] [copy] Copying 4 files to [Temp]
BUILD SUCCESSFUL BUILD SUCCESSFUL
@@ -7,13 +7,13 @@
<mkdir dir="${temp.library.path}"/> <mkdir dir="${temp.library.path}"/>
<kotlin2js src="${library.path1}" output="${temp.library.path}/jslib-example1.js" metaInfo="true"> <kotlin2js src="${library.path1}" output="${temp.library.path}/jslib-example1.js" metaInfo="true">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<kotlin2js src="${library.path2}" output="${temp.library.path}/jslib-example2.js" metaInfo="true"> <kotlin2js src="${library.path2}" output="${temp.library.path}/jslib-example2.js" metaInfo="true">
<libraries> <libraries>
<pathelement path="${temp.library.path}/jslib-example1.meta.js"/> <pathelement path="${temp.library.path}/jslib-example1.meta.js"/>
</libraries> </libraries>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
@@ -21,7 +21,7 @@
<pathelement path="${temp.library.path}/jslib-example1.meta.js"/> <pathelement path="${temp.library.path}/jslib-example1.meta.js"/>
<pathelement path="${temp.library.path}/jslib-example2.meta.js"/> <pathelement path="${temp.library.path}/jslib-example2.meta.js"/>
</libraries> </libraries>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<copy todir="${temp}"> <copy todir="${temp}">
<fileset dir="${temp.library.path}"> <fileset dir="${temp.library.path}">
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" main="call">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js"> <kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -4,23 +4,7 @@ Buildfile: [TestData]/build.xml
build: build:
[mkdir] Created dir: [Temp]/lib [mkdir] Created dir: [Temp]/lib
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js] [kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[copy] Copying 2 files to [Temp] [copy] Copying 2 files to [Temp]
BUILD SUCCESSFUL BUILD SUCCESSFUL
@@ -6,14 +6,14 @@
<mkdir dir="${temp.library.path}"/> <mkdir dir="${temp.library.path}"/>
<kotlin2js src="${library.path}" noStdlib="true" output="${temp.library.path}/jslib-example.js" metaInfo="true"> <kotlin2js src="${library.path}" noStdlib="true" output="${temp.library.path}/jslib-example.js" metaInfo="true">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" main="call"> <kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" main="call">
<libraries> <libraries>
<pathelement path="${temp.library.path}"/> <pathelement path="${temp.library.path}"/>
</libraries> </libraries>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<copy todir="${temp}"> <copy todir="${temp}">
<fileset dir="${temp.library.path}"> <fileset dir="${temp.library.path}">
@@ -4,23 +4,7 @@ Buildfile: [TestData]/build.xml
build: build:
[mkdir] Created dir: [Temp]/lib [mkdir] Created dir: [Temp]/lib
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js] [kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
[copy] Copying 2 files to [Temp] [copy] Copying 2 files to [Temp]
BUILD SUCCESSFUL BUILD SUCCESSFUL
@@ -6,14 +6,14 @@
<mkdir dir="${temp.library.path}"/> <mkdir dir="${temp.library.path}"/>
<kotlin2js src="${library.path}" noStdlib="true" output="${temp.library.path}/jslib-example.js" metaInfo="true"> <kotlin2js src="${library.path}" noStdlib="true" output="${temp.library.path}/jslib-example.js" metaInfo="true">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" main="call"> <kotlin2js src="${test.data}/root1" noStdlib="true" output="${temp}/out.js" main="call">
<libraries> <libraries>
<pathelement path="${temp.library.path}/jslib-example.meta.js"/> <pathelement path="${temp.library.path}/jslib-example.meta.js"/>
</libraries> </libraries>
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
<copy todir="${temp}"> <copy todir="${temp}">
<fileset dir="${temp.library.path}"> <fileset dir="${temp.library.path}">
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
+1 -1
View File
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" sourcemap="true"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" sourcemap="true">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -3,14 +3,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" nowarn="true"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" nowarn="true">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -6,14 +6,6 @@ build:
[kotlin2js] logging: using Kotlin home directory [KotlinProjectHome]/dist/kotlinc [kotlin2js] logging: using Kotlin home directory [KotlinProjectHome]/dist/kotlinc
[kotlin2js] logging: exception on loading scripting plugin: java.lang.ClassNotFoundException: org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar [kotlin2js] logging: exception on loading scripting plugin: java.lang.ClassNotFoundException: org.jetbrains.kotlin.scripting.compiler.plugin.ScriptingCompilerConfigurationComponentRegistrar
[kotlin2js] logging: compiling source files: [TestData]/root1/foo.kt [kotlin2js] logging: compiling source files: [TestData]/root1/foo.kt
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
+1 -1
View File
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" verbose="true"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" verbose="true">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
@@ -4,14 +4,6 @@ Buildfile: [TestData]/build.xml
build: build:
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js] [kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
[kotlin2js] info: kotlinc-js [KotlinVersion] (JRE [JREVersion]) [kotlin2js] info: kotlinc-js [KotlinVersion] (JRE [JREVersion])
[kotlin2js] warning: ==========
[kotlin2js] This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
[kotlin2js]
[kotlin2js] Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
[kotlin2js] Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
[kotlin2js]
[kotlin2js] You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
[kotlin2js] ==========
BUILD SUCCESSFUL BUILD SUCCESSFUL
Total time: [time] Total time: [time]
+1 -1
View File
@@ -3,7 +3,7 @@
<target name="build"> <target name="build">
<kotlin2js src="${test.data}/root1" output="${temp}/out.js" printVersion="true"> <kotlin2js src="${test.data}/root1" output="${temp}/out.js" printVersion="true">
<compilerarg value="-Xuse-deprecated-legacy-compiler"/> <compilerarg value="-Xforce-deprecated-legacy-compiler-usage"/>
</kotlin2js> </kotlin2js>
</target> </target>
</project> </project>
-8
View File
@@ -9,11 +9,3 @@ Output:
-- JS -- -- JS --
Exit code: OK Exit code: OK
Output: Output:
warning: ==========
This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
==========
@@ -9,11 +9,3 @@ Output:
-- JS -- -- JS --
Exit code: OK Exit code: OK
Output: Output:
warning: ==========
This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
==========
@@ -21,14 +21,6 @@ actual class Foo2 actual constructor(actual val y: String)
-- JS -- -- JS --
Exit code: COMPILATION_ERROR Exit code: COMPILATION_ERROR
Output: Output:
warning: ==========
This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
==========
compiler/testData/multiplatform/inlineClasses/js.kt:5:1: error: actual class 'Foo2' has no corresponding expected declaration compiler/testData/multiplatform/inlineClasses/js.kt:5:1: error: actual class 'Foo2' has no corresponding expected declaration
The following declaration is incompatible because modifiers are different (companion, inner, inline): The following declaration is incompatible because modifiers are different (companion, inner, inline):
public final expect inline class Foo2 public final expect inline class Foo2
@@ -5,11 +5,3 @@ Output:
-- JS -- -- JS --
Exit code: OK Exit code: OK
Output: Output:
warning: ==========
This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
==========
@@ -9,11 +9,3 @@ Output:
-- JS -- -- JS --
Exit code: OK Exit code: OK
Output: Output:
warning: ==========
This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
==========
-8
View File
@@ -9,11 +9,3 @@ Output:
-- JS -- -- JS --
Exit code: OK Exit code: OK
Output: Output:
warning: ==========
This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
==========
@@ -293,20 +293,13 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
} }
protected void doJsTest(@NotNull String fileName) { protected void doJsTest(@NotNull String fileName) {
setupOldJsCompiler(fileName);
doTest(fileName, new K2JSCompiler()); doTest(fileName, new K2JSCompiler());
} }
protected void doJsDceTest(@NotNull String fileName) { protected void doJsDceTest(@NotNull String fileName) {
setupOldJsCompiler(fileName);
doTest(fileName, new K2JSDce()); doTest(fileName, new K2JSDce());
} }
private void setupOldJsCompiler(String fileName) {
if (fileName == null) return;
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.setValue(Boolean.toString(!fileName.contains("_strict")));
}
protected void doMetadataTest(@NotNull String fileName) { protected void doMetadataTest(@NotNull String fileName) {
doTest(fileName, new K2MetadataCompiler()); doTest(fileName, new K2MetadataCompiler());
} }
@@ -40,7 +40,6 @@ public abstract class AbstractAntTaskTest extends KotlinIntegrationTestBase {
testDataDir, testDataDir,
"build.log", "build.log",
"-Xmx256m", "-Xmx256m",
"-D" + CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.getProperty() + "=true",
"-Dkotlin.lib=" + KotlinIntegrationTestBase.getCompilerLib(), "-Dkotlin.lib=" + KotlinIntegrationTestBase.getCompilerLib(),
"-Dkotlin.runtime.jar=" + ForTestCompileRuntime.runtimeJarForTests().getAbsolutePath(), "-Dkotlin.runtime.jar=" + ForTestCompileRuntime.runtimeJarForTests().getAbsolutePath(),
"-Dkotlin.reflect.jar=" + ForTestCompileRuntime.reflectJarForTests().getAbsolutePath(), "-Dkotlin.reflect.jar=" + ForTestCompileRuntime.reflectJarForTests().getAbsolutePath(),
@@ -163,13 +163,10 @@ abstract class AbstractKotlinCompilerIntegrationTest : TestCaseWithTmpdir() {
args.add("-libraries") args.add("-libraries")
args.add(classpath.joinToString(File.pathSeparator)) args.add(classpath.joinToString(File.pathSeparator))
} }
args.add("-Xlegacy-deprecated-no-warn") args.add("-Xforce-deprecated-legacy-compiler-usage")
args.add("-Xuse-deprecated-legacy-compiler")
args.add("-output") args.add("-output")
args.add(output.path) args.add(output.path)
args.add("-meta-info") args.add("-meta-info")
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
} else if (compiler is K2JVMCompiler || compiler is K2MetadataCompiler) { } else if (compiler is K2JVMCompiler || compiler is K2MetadataCompiler) {
if (classpath.isNotEmpty()) { if (classpath.isNotEmpty()) {
args.add("-classpath") args.add("-classpath")
@@ -1338,11 +1338,6 @@ public class CliTestGenerated extends AbstractCliTest {
runTest("compiler/testData/cli/js/jsHelp.args"); runTest("compiler/testData/cli/js/jsHelp.args");
} }
@TestMetadata("jsOldBackend_strict.args")
public void testJsOldBackend_strict() throws Exception {
runTest("compiler/testData/cli/js/jsOldBackend_strict.args");
}
@TestMetadata("kotlinHomeWithoutStdlib.args") @TestMetadata("kotlinHomeWithoutStdlib.args")
public void testKotlinHomeWithoutStdlib() throws Exception { public void testKotlinHomeWithoutStdlib() throws Exception {
runTest("compiler/testData/cli/js/kotlinHomeWithoutStdlib.args"); runTest("compiler/testData/cli/js/kotlinHomeWithoutStdlib.args");
@@ -68,15 +68,10 @@ class AnalysisHandlerExtensionTest : TestCaseWithTmpdir() {
val plugin = writePlugin(klass) val plugin = writePlugin(klass)
val args = listOf("-Xplugin=$plugin", mainKt.absolutePath) val args = listOf("-Xplugin=$plugin", mainKt.absolutePath)
val outputPath = if (compiler is K2JSCompiler) val outputPath = if (compiler is K2JSCompiler)
listOf("-Xuse-deprecated-legacy-compiler", "-output", tmpdir.resolve("out.js").absolutePath) listOf("-Xforce-deprecated-legacy-compiler-usage", "-output", tmpdir.resolve("out.js").absolutePath)
else else
listOf("-d", tmpdir.resolve("out").absolutePath) listOf("-d", tmpdir.resolve("out").absolutePath)
if (compiler is K2JSCompiler) {
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
}
val (output, exitCode) = CompilerTestUtil.executeCompiler(compiler, args + outputPath + extras) val (output, exitCode) = CompilerTestUtil.executeCompiler(compiler, args + outputPath + extras)
assertEquals(expectedExitCode, exitCode, output) assertEquals(expectedExitCode, exitCode, output)
} }
@@ -144,10 +144,7 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
"kotlinc-js", "kotlinc-js",
"$testDataDirectory/emptyMain.kt", "$testDataDirectory/emptyMain.kt",
"-nowarn", "-nowarn",
"-Xlegacy-deprecated-no-warn", "-Xforce-deprecated-legacy-compiler-usage",
"-Xuse-deprecated-legacy-compiler",
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
"-D${CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.property}=true",
"-output", "-output",
File(tmpdir, "out.js").path, File(tmpdir, "out.js").path,
environment = mapOf("JAVA_HOME" to KtTestUtil.getJdk8Home().absolutePath) environment = mapOf("JAVA_HOME" to KtTestUtil.getJdk8Home().absolutePath)
@@ -132,17 +132,12 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
when (compiler) { when (compiler) {
is K2JSCompiler -> compileJsLibrary( is K2JSCompiler -> compileJsLibrary(
libraryName, libraryName,
additionalOptions = libraryOptions + "-Xlegacy-deprecated-no-warn" + "-Xuse-deprecated-legacy-compiler" additionalOptions = libraryOptions + "-Xforce-deprecated-legacy-compiler-usage"
) )
is K2JVMCompiler -> compileLibrary(libraryName, additionalOptions = libraryOptions) is K2JVMCompiler -> compileLibrary(libraryName, additionalOptions = libraryOptions)
else -> throw UnsupportedOperationException(compiler.toString()) else -> throw UnsupportedOperationException(compiler.toString())
} }
if (compiler is K2JSCompiler) {
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
}
compileKotlin( compileKotlin(
"source.kt", usageDestination, listOf(result), compiler, "source.kt", usageDestination, listOf(result), compiler,
additionalOptions.toList() + listOf("-language-version", LanguageVersion.LATEST_STABLE.versionString) additionalOptions.toList() + listOf("-language-version", LanguageVersion.LATEST_STABLE.versionString)
@@ -66,9 +66,7 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
if (jsSrc != null) { if (jsSrc != null) {
appendLine() appendLine()
appendLine("-- JS --") appendLine("-- JS --")
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler appendLine(K2JSCompiler().compile(jsSrc, commonSrc, "-Xforce-deprecated-legacy-compiler-usage", "-output", jsDest!!))
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
appendLine(K2JSCompiler().compile(jsSrc, commonSrc, "-Xuse-deprecated-legacy-compiler", "-output", jsDest!!))
} }
if (common2Src != null) { if (common2Src != null) {
@@ -168,9 +168,7 @@ abstract class AbstractJsLookupTrackerTest : AbstractLookupTrackerTest() {
libraries = libPaths.joinToString(File.pathSeparator) libraries = libPaths.joinToString(File.pathSeparator)
reportOutputFiles = true reportOutputFiles = true
freeArgs = filesToCompile.map { it.canonicalPath } freeArgs = filesToCompile.map { it.canonicalPath }
useDeprecatedLegacyCompiler = true forceDeprecatedLegacyCompilerUsage = true
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
} }
configureAdditionalArgs(args) configureAdditionalArgs(args)
return runJSCompiler(args, env) return runJSCompiler(args, env)
@@ -37,7 +37,6 @@ abstract class BaseKotlinJpsBuildTestCase : JpsBuildTestCase() {
override fun setUp() { override fun setUp() {
super.setUp() super.setUp()
System.setProperty("kotlin.jps.tests", "true") System.setProperty("kotlin.jps.tests", "true")
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
} }
override fun shouldRunTest(): Boolean { override fun shouldRunTest(): Boolean {
@@ -91,9 +91,7 @@ abstract class KotlinJpsBuildTestBase : AbstractKotlinJpsBuildTestCase() {
myProject.modules.forEach { myProject.modules.forEach {
val facet = KotlinFacetSettings() val facet = KotlinFacetSettings()
facet.compilerArguments = K2JSCompilerArguments().apply { facet.compilerArguments = K2JSCompilerArguments().apply {
useDeprecatedLegacyCompiler = true forceDeprecatedLegacyCompilerUsage = true
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
} }
facet.targetPlatform = JsPlatforms.defaultJsPlatform facet.targetPlatform = JsPlatforms.defaultJsPlatform
@@ -264,7 +264,7 @@ class ModulesTxtBuilder {
"js" -> settings.compilerArguments = "js" -> settings.compilerArguments =
K2JSCompilerArguments().also { K2JSCompilerArguments().also {
settings.targetPlatform = JsPlatforms.defaultJsPlatform settings.targetPlatform = JsPlatforms.defaultJsPlatform
it.useDeprecatedLegacyCompiler = true it.forceDeprecatedLegacyCompilerUsage = true
} }
"native" -> settings.compilerArguments = "native" -> settings.compilerArguments =
FakeK2NativeCompilerArguments().also { settings.targetPlatform = NativePlatforms.unspecifiedNativePlatform } FakeK2NativeCompilerArguments().also { settings.targetPlatform = NativePlatforms.unspecifiedNativePlatform }
@@ -51,9 +51,7 @@ abstract class AbstractJsProtoComparisonTest : AbstractProtoComparisonTest<Proto
metaInfo = true metaInfo = true
main = K2JsArgumentConstants.NO_CALL main = K2JsArgumentConstants.NO_CALL
freeArgs = ktFiles freeArgs = ktFiles
useDeprecatedLegacyCompiler = true forceDeprecatedLegacyCompilerUsage = true
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
} }
val env = createTestingCompilerEnvironment(messageCollector, outputItemsCollector, services) val env = createTestingCompilerEnvironment(messageCollector, outputItemsCollector, services)

Some files were not shown because too many files have changed in this diff Show More