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

Cannot inline bytecode due to JVM target version #576

Closed
fbernack opened this issue Dec 1, 2022 · 4 comments
Closed

Cannot inline bytecode due to JVM target version #576

fbernack opened this issue Dec 1, 2022 · 4 comments

Comments

@fbernack
Copy link

fbernack commented Dec 1, 2022

Hi,

first of all: thank you for this amazing & fun project! :-)

I unfortunately ran into some problems using custom dependencies for a Kotlin DSL which is using a lot of inline functions. The error message I keep getting is:

Cannot inline bytecode built with JVM target 11 into bytecode that is being built with JVM target 1.8. Please specify proper '-jvm-target' option

Its true that the dependencies are built with JVM target 11, but I also configured the jvmTarget for the kotlin-compiler-server to be 11:

tasks.withType<KotlinCompile> {
    kotlinOptions {
        freeCompilerArgs = listOf("-Xjsr305=strict", "-Xskip-metadata-version-check")
        jvmTarget = "11"
    }
// ...
}

And I also defined a Java toolchain for the server, executors, common and indexation module:

java {
  toolchain {
    languageVersion.set(JavaLanguageVersion.of(11))
  }
}

The Java versions of the compiled class files are OK (55), but I'm always getting the error message above.

Thanks in advance for your help.
Regards

@AlexanderPrendota
Copy link
Collaborator

AlexanderPrendota commented Dec 1, 2022

Hi, thanks.

I'm going to update the project to java 11+. I hope it helps you, am I right?

@fbernack
Copy link
Author

fbernack commented Dec 1, 2022

Yes, I think that might help! Thanks :-)

@AlexanderPrendota
Copy link
Collaborator

I hope it helps you. Feel free to open the issue again =)

@fbernack
Copy link
Author

Unfortunately the update didn't work for me and I'm still getting the same error.

In my opinion you can leave this issue closed as long as #579 is open, as it should be the same issue.

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

No branches or pull requests

2 participants