[Gradle, JS] IR by default and report warnings for using legacy compiler
- just legacy - report warning about deprecation - both - report warning about deprecation of legacy - no compiler explicitly chosen - error about explicit setting compiler warn from cli legacy compiler nowarn flag - kotlin.js.compiler.nowarn KT-42326 KT-53074
This commit is contained in:
+6
@@ -265,6 +265,12 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
|
||||
@Argument(value = "-Xwasm-enable-asserts", description = "Turn on asserts")
|
||||
var wasmEnableAsserts: Boolean by FreezableVar(false)
|
||||
|
||||
@Argument(
|
||||
value = "-Xlegacy-deprecated-no-warn",
|
||||
description = "Disable warnings of deprecation of legacy compiler"
|
||||
)
|
||||
var legacyDeprecatedNoWarn: Boolean by FreezableVar(false)
|
||||
|
||||
override fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> {
|
||||
return super.configureAnalysisFlags(collector, languageVersion).also {
|
||||
it[allowFullyQualifiedNameInKClass] = wasm && wasmKClassFqn //Only enabled WASM BE supports this flag
|
||||
|
||||
@@ -186,6 +186,10 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
|
||||
return exitCode;
|
||||
}
|
||||
|
||||
if (!arguments.getLegacyDeprecatedNoWarn()) {
|
||||
messageCollector.report(STRONG_WARNING, "Legacy compiler is deprecated. Please migrate onto IR.", null);
|
||||
}
|
||||
|
||||
if (arguments.getFreeArgs().isEmpty() && (!incrementalCompilationIsEnabledForJs(arguments))) {
|
||||
if (arguments.getVersion()) {
|
||||
return OK;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
compiler/testData/integration/ant/js/simpleWithoutStdlibAndFolderAsAnotherLib/jslib-example/LibraryExample.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-meta-info
|
||||
-output
|
||||
$TEMP_DIR$/jslib-example.js
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
$TEMP_DIR$
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-no-stdlib
|
||||
-output
|
||||
$TESTDATA_DIR$
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
$TESTDATA_DIR$/inlineCycle.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-output
|
||||
$TEMP_DIR$
|
||||
|
||||
+1
@@ -35,6 +35,7 @@ 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-diagnostic={log|exception}
|
||||
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
|
||||
-Xpartial-linkage Allow unlinked symbols
|
||||
-Xrepositories=<path> Paths to additional places where libraries could be found
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-kotlin-home
|
||||
$TESTDATA_DIR$
|
||||
-output
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/../kotlinPackage.kt
|
||||
-no-stdlib
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/languageVersion.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
-language-version
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/withLib.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-libraries
|
||||
not/existing/path
|
||||
-output
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
$TESTDATA_DIR$/separateModules/sepModule1.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-meta-info
|
||||
-Xmetadata-only
|
||||
-output
|
||||
$TEMP_DIR$/m1/m1.js
|
||||
---
|
||||
$TESTDATA_DIR$/separateModules/sepModule2.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-libraries
|
||||
$TEMP_DIR$/m1
|
||||
-output
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
$TESTDATA_DIR$/separateModules/sepModule1.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-meta-info
|
||||
-output
|
||||
$TEMP_DIR$/m1/m.js
|
||||
---
|
||||
$TESTDATA_DIR$/separateModules/sepModule2.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-libraries
|
||||
$TEMP_DIR$/m1
|
||||
-output
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
$TESTDATA_DIR$/separateModules/sepModule3.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-meta-info
|
||||
-output
|
||||
$TEMP_DIR$/m3/m.js
|
||||
---
|
||||
$TESTDATA_DIR$/separateModules/sepModule4.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-libraries
|
||||
$TEMP_DIR$/m3
|
||||
-output
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
not/existing/path
|
||||
-no-stdlib
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-output
|
||||
$TESTDATA_DIR$
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/withLib.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-libraries
|
||||
compiler/testData/integration/ant/js/simpleWithJsFileAsAnotherLib
|
||||
-output
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-output
|
||||
$TESTDATA_DIR$
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
-output-postfix
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
-output-prefix
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
$TESTDATA_DIR$/reifiedIntersectionType.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/sourceMap.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
./
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/sourceMapCharEscape.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-source-map-embed-sources
|
||||
always
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/sourceMapDuplicatePath/
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/sourceMapDuplicatePath/foo:$TESTDATA_DIR$/sourceMapDuplicatePath/bar
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/sourceMap.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
./
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/sourceMap.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
/localhost/src/
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/lib/src/lib.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-meta-info
|
||||
-output
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/lib.js
|
||||
---
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/main/src/main.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-libraries
|
||||
$TESTDATA_DIR$/sourceMapRelativeRoot/lib/out/
|
||||
-source-map
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-source-map-prefix
|
||||
./
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/
|
||||
|
||||
@@ -2,6 +2,7 @@ $TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/baz/file3.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/baz/file4.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
$TESTDATA_DIR$/sourceMapRoot/foo/file1.kt
|
||||
$TESTDATA_DIR$/sourceMapRoot/bar/file2.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-source-map
|
||||
-source-map-base-dirs
|
||||
$TESTDATA_DIR$/foo:$TESTDATA_DIR$/bar
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/../warnings.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-nowarn
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/withLib.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-libraries
|
||||
$TESTDATA_DIR$/folderAsLib
|
||||
-output
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/withLib.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-libraries
|
||||
$TESTDATA_DIR$/lib/LibraryExample.jar
|
||||
-output
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
$TESTDATA_DIR$/simple2js.kt
|
||||
-Xlegacy-deprecated-no-warn
|
||||
-no-stdlib
|
||||
-libraries
|
||||
$TESTDATA_DIR$/wrongAbiVersionLib/wrongAbiLib.meta.js
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/hello.kt] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1, [TestData]/bar.kt, [TestData]/root2/Foo.kt] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
+1
@@ -2,6 +2,7 @@ OUT:
|
||||
Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[java] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
+2
@@ -4,7 +4,9 @@ Buildfile: [TestData]/build.xml
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[copy] Copying 2 files to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
|
||||
Vendored
+2
@@ -4,7 +4,9 @@ Buildfile: [TestData]/build.xml
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[copy] Copying 2 files to [Temp]
|
||||
[copy] Copying 1 file to [Temp]
|
||||
|
||||
|
||||
Vendored
+3
@@ -4,12 +4,15 @@ Buildfile: [TestData]/build.xml
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example1] => [[Temp]/lib/jslib-example1.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example2] => [[Temp]/lib/jslib-example2.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[delete] Deleting: [Temp]/lib/jslib-example1.js
|
||||
[delete] Deleting: [Temp]/lib/jslib-example2.js
|
||||
[delete] Deleting: [Temp]/lib/jslib-example1.meta.js
|
||||
[delete] Deleting: [Temp]/lib/jslib-example2.meta.js
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[copy] Copying 1 file to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
+3
@@ -4,8 +4,11 @@ Buildfile: [TestData]/build.xml
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example1] => [[Temp]/lib/jslib-example1.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example2] => [[Temp]/lib/jslib-example2.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[copy] Copying 4 files to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
Vendored
+2
@@ -4,7 +4,9 @@ Buildfile: [TestData]/build.xml
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[copy] Copying 2 files to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
|
||||
Vendored
+2
@@ -4,7 +4,9 @@ Buildfile: [TestData]/build.xml
|
||||
build:
|
||||
[mkdir] Created dir: [Temp]/lib
|
||||
[kotlin2js] Compiling [[TestData]/jslib-example] => [[Temp]/lib/jslib-example.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
[copy] Copying 2 files to [Temp]
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -3,6 +3,7 @@ Buildfile: [TestData]/build.xml
|
||||
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -6,6 +6,7 @@ build:
|
||||
[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: compiling source files: [TestData]/root1/foo.kt
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -4,6 +4,7 @@ Buildfile: [TestData]/build.xml
|
||||
build:
|
||||
[kotlin2js] Compiling [[TestData]/root1] => [[Temp]/out.js]
|
||||
[kotlin2js] info: kotlinc-js [KotlinVersion] (JRE [JREVersion])
|
||||
[kotlin2js] warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
BUILD SUCCESSFUL
|
||||
Total time: [time]
|
||||
|
||||
@@ -9,3 +9,4 @@ Output:
|
||||
-- JS --
|
||||
Exit code: OK
|
||||
Output:
|
||||
warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
@@ -9,3 +9,4 @@ Output:
|
||||
-- JS --
|
||||
Exit code: OK
|
||||
Output:
|
||||
warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
@@ -21,6 +21,7 @@ actual class Foo2 actual constructor(actual val y: String)
|
||||
-- JS --
|
||||
Exit code: COMPILATION_ERROR
|
||||
Output:
|
||||
warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
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):
|
||||
public final expect inline class Foo2
|
||||
|
||||
@@ -5,3 +5,4 @@ Output:
|
||||
-- JS --
|
||||
Exit code: OK
|
||||
Output:
|
||||
warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
@@ -9,4 +9,4 @@ Output:
|
||||
-- JS --
|
||||
Exit code: OK
|
||||
Output:
|
||||
|
||||
warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
@@ -9,3 +9,4 @@ Output:
|
||||
-- JS --
|
||||
Exit code: OK
|
||||
Output:
|
||||
warning: legacy compiler is deprecated. Please migrate onto IR.
|
||||
|
||||
+1
@@ -162,6 +162,7 @@ abstract class AbstractKotlinCompilerIntegrationTest : TestCaseWithTmpdir() {
|
||||
args.add("-libraries")
|
||||
args.add(classpath.joinToString(File.pathSeparator))
|
||||
}
|
||||
args.add("-Xlegacy-deprecated-no-warn")
|
||||
args.add("-output")
|
||||
args.add(output.path)
|
||||
args.add("-meta-info")
|
||||
|
||||
@@ -141,7 +141,7 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
|
||||
runProcess(
|
||||
"kotlinc-js",
|
||||
"$testDataDirectory/emptyMain.kt",
|
||||
"-output", File(tmpdir, "out.js").path
|
||||
"-Xlegacy-deprecated-no-warn", "-output", File(tmpdir, "out.js").path
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
|
||||
|
||||
val result =
|
||||
when (compiler) {
|
||||
is K2JSCompiler -> compileJsLibrary(libraryName, additionalOptions = libraryOptions)
|
||||
is K2JSCompiler -> compileJsLibrary(libraryName, additionalOptions = libraryOptions + "-Xlegacy-deprecated-no-warn")
|
||||
is K2JVMCompiler -> compileLibrary(libraryName, additionalOptions = libraryOptions)
|
||||
else -> throw UnsupportedOperationException(compiler.toString())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user