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

Handle forward compatibility & JVM target version #23

Closed
3 tasks done
jayasuryat opened this issue Aug 20, 2023 · 3 comments · Fixed by #25
Closed
3 tasks done

Handle forward compatibility & JVM target version #23

jayasuryat opened this issue Aug 20, 2023 · 3 comments · Fixed by #25
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jayasuryat
Copy link
Owner

jayasuryat commented Aug 20, 2023

Concerns:

  • JVM target-version seems to be not pegged properly
  • All of the modules are compiled with Kotlin 1.9.0 & making them not forward-compatible with, let say ~1.6.0
  • The Kotlin-std-lib is getting bundled in into the artifacts
@jayasuryat jayasuryat added the bug Something isn't working label Aug 20, 2023
@jayasuryat jayasuryat added this to the v0.6.1 milestone Aug 20, 2023
@jayasuryat jayasuryat self-assigned this Aug 20, 2023
jayasuryat added a commit that referenced this issue Aug 20, 2023
jayasuryat added a commit that referenced this issue Aug 20, 2023
@jayasuryat jayasuryat linked a pull request Aug 20, 2023 that will close this issue
@jayasuryat
Copy link
Owner Author

Binaries are now compatible with Kotlin-1.5.0

@jayasuryat jayasuryat reopened this Aug 20, 2023
@jayasuryat
Copy link
Owner Author

Turns out, just setting kotlinOptions.apiVersion & kotlinOptions.languageVersion to version-x will not make it (forward) compatible with version-x. And also Kotlin makes no such guarantees about forward-compatibility too.

(Taken from https://kotlinlang.org/docs/kotlin-evolution.html#evolving-the-binary-format)

Preferably (but we can't guarantee it), the binary format is mostly forwards compatible with the next feature release, but not later ones (in the cases when new features are not used, e.g. 1.3 can understand most binaries from 1.4, but not 1.5).

So, even tho if you set kotlinOptions.apiVersion & kotlinOptions.languageVersion to an appropriate version and don't use any new features added to Kotlin after that version, there is no guarantee that it would be compatible with that version (while compiling with a newer version).


With the current setup (compiling with Kotlin 1.9.0, and languageVersion set to 1.5.0), artifacts are compatible upto Kotlin 1.7.0, (came to this conclusion by testing my self, didn't find any source on this).

Which I feel is pretty decent for now.

@jayasuryat
Copy link
Owner Author

With the current situation, we can also relax kotlinOptions.apiVersion & kotlinOptions.languageVersion to Kotlin 1.7.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant