Giter Club home page Giter Club logo

Comments (7)

maik-mursall avatar maik-mursall commented on June 3, 2024 1

Thank you @mipastgt for the info :)

I can confirm, that the IntelliJ Update indeed fixes this Issue 🎉
Now the common Modules are configured properly to target the same & correct JVM-Version as the other Modules 🎉

from korge.

maik-mursall avatar maik-mursall commented on June 3, 2024

So I think this bug is because either:

  • The commonMain (& maybe android as well) modules is configured to the wrong target (JVM 1.8)
  • Or the jvmTarget module is configured to the wrong target (JVM 11)

from korge.

maik-mursall avatar maik-mursall commented on June 3, 2024

I fear this might be not possible to solve according to this issue.

I tried around a lot and was only able to lower the target of jvmMain to "1.8" but I'm not sure if that breaks something :/

So I think always including targetJs() or prepending @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") to every file using Korge Methods is our only solution for now :/
(At least if we cannot make jvmMain.target = "JVM 1.8" work)

from korge.

Kietyo avatar Kietyo commented on June 3, 2024

I too am running into this issue on the hello world example when I configured it to only enable jvm.

E.g:

korge {
	id = "com.sample.demo"
	targetJvm()
	serializationJson()
}

What the error looks like:

image

After some browsing I found that JVM target 11 comes from here:

val DEFAULT_JVM_TARGET = GRADLE_JAVA_VERSION_STR

from korge.

maik-mursall avatar maik-mursall commented on June 3, 2024

@Kietyo I had that suspicion as well, but I was only able to change the JVM Target of the Platform Modules, not the common Module itself :/

This issue might be rooted into Kotlin-Multiplatform itself 😅

from korge.

maik-mursall avatar maik-mursall commented on June 3, 2024

And for lowering the JVM-Target for all Modules to 1.8:
We really need to test if Korge is able to run entirely on 1.8. Because I think there was some kind of assert somewhere, that it needs to run on JVM 11.

I might check later if I find that.

from korge.

mipastgt avatar mipastgt commented on June 3, 2024

I have been suffering from this issue independently of korge for quite some time too but in the latest version of IntelliJ this seems to be fixed now.

IntelliJ IDEA 2023.3 (Community Edition)
Build #IC-233.11799.241, built on December 2, 2023

I removed all the lines with @file:Suppress("INLINE_FROM_HIGHER_PLATFORM") in my code yesterday and don't see any issues anymore.

from korge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.