Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Kotlin 1.9.0 #388

Merged
merged 4 commits into from
May 26, 2024
Merged

Support Kotlin 1.9.0 #388

merged 4 commits into from
May 26, 2024

Conversation

BoD
Copy link
Contributor

@BoD BoD commented Aug 8, 2023

A follow-up to #380 (and closes #379).

Let's see if I have better luck with Windows tests.

@@ -36,8 +36,9 @@ abstract class AbstractKotlinCompilation<A : CommonCompilerArguments> internal c
/** Working directory for the compilation */
var workingDir: File by default {
val path = Files.createTempDirectory("Kotlin-Compilation")
log("Created temporary working directory at ${path.toAbsolutePath()}")
return@default path.toFile()
val canonicalFile = path.toFile().canonicalFile
Copy link
Contributor Author

@BoD BoD Aug 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JS compiler calls .canonicalFile internally - at least on MacOS that may be different to the absolute path (/private/var/… vs /var/…), which made the tests fail.

@@ -91,7 +95,7 @@ class KotlinJsCompilation : AbstractKotlinCompilation<K2JSCompilerArguments>() {
args.irOnly = irOnly
args.irModuleName = irModuleName
args.generateDts = generateDts
args.useDeprecatedLegacyCompiler = useDeprecatedLegacyCompiler
args.forceDeprecatedLegacyCompilerUsage = useDeprecatedLegacyCompiler
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useDeprecatedLegacyCompiler was removed here

@@ -78,27 +78,6 @@ class KotlinJsCompilationTests {
assertThat(jsFile.readText()).contains("function KSource_0() {")
}

@Test
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I’m not sure why this no longer works, it fails with kotlinx.browser not being resolved. Maybe this is no longer supported? But the KDoc seems to indicate it should still work 🤔 The source is still there. Any idea?

@apatrida
Copy link

apatrida commented Sep 26, 2023

In this PR can we remove the call in KotlinCompilation for setting useIR as it is defaulted to true and is removed by Kotlin 1.9.20-Beta2 so this would just be another breaking change coming soon.

@BoD
Copy link
Contributor Author

BoD commented Sep 26, 2023

@apatrida I've just pushed a commit to remove useIR. I've also updated to Kotlin 1.9.10.

@@ -71,6 +71,7 @@ class KotlinCompilation : AbstractKotlinCompilation<K2JVMCompilerArguments>() {
var javaParameters: Boolean = false

/** Use the IR backend */
@Deprecated("Since Kotlin 1.9.20 this option is no longer supported by the compiler. It has no effect.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in this commit.

@3flex 3flex mentioned this pull request Oct 4, 2023
@tschuchortdev tschuchortdev merged commit b411502 into tschuchortdev:master May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Kotlin 1.8.21
3 participants