-
Notifications
You must be signed in to change notification settings - Fork 64
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
Kotlin 2.1.0 support #1857
Comments
same here :( |
same here! |
Bump, version 3.0.0 has the same issue |
same here with gradle 8.11.1 and agp 8.7.3 |
The same with realm-kotlin 3.0.0 |
same issue here. Any plans to fix this? |
Maybe @nhachicha would give an answer? |
Guys, i have been using room for very small requirements but wanted to try realm is it worth it as it's documentation is very bad and it is not supporting kotlin 2.0 or higher |
Looks like realm is not maintained anymore - #1852 (comment) |
it does support or at least works for me on Kotlin 2.0.21
they say that it is minimum maintenance, maybe there are still some hopes? I'd rather switch to Room than maintain fork of realm |
it doesn't work for me |
Same issue for me. Any word on this? |
Is anyone here maintaining a fork with up to date dependencies? I'm very happy with realm and need no more features but don't want to stuck with an updated kotlin version |
I looked in the code, there is this comment: // This is the K2 equivalent of our PSI hack to determine if a symbol has a RealmObject base class. Tried to check about the link, but it requires an account in slack with an email address: @jetbrains.com
Not sure how to get it yet. |
Kotlin 2.0.20 works for me, just have trouble with Kotlin 2.1.0 |
You can join the slack via this survey https://surveys.jetbrains.com/s3/kotlin-slack-sign-up or you can see the messages here https://slack-chats.kotlinlang.org/t/15702763/hi-i-am-trying-to-update-a-compiler-plugin-with-k2-support-a without registration |
from Comtributing.md:
|
I took a stab at it, but the Realm compiler uses a ton of internal Kotlin compiler functions/classes (not just the public APIs). Many of the internal code's signatures, visibilities, package names, and generic type parameters changed from 2.0.20 -> 2.1.0. The more I tried to change things to match the new signatures, the more things broke, and I don't know nearly enough about the internals of the Kotlin compiler to be able to say it was even done correctly with any level of confidence. Mongo laid off their Realm leads and the devs were either also let go or reassigned, so probably no help from any of them anytime soon. Our only hope might be if someone from JetBrains who knows the Kotlin compiler inside and out decided to give it a try. |
I just got it built on Linux with 2.0.20 but with gradle 8.11 and Java 17. Things appear OK so far. They didn't have Linux build scripts coded in, that's why they mentioned it's not supported? I do see a couple messages like:
I guess the major issue is still with the compiler plugins. I see that there are both frontend and backend plugins implemented. I haven't looked much in detail (and I don't have lots of internal knowledge of Kotlin), I'd suppose the frontends are easier issues than the backends. |
Build with 2.0.21 on Linux appears also OK. Test outputs look the same as with 2.0.20, with the same errors:
Anyone see these differently when building on the Mac, or take these as issues? Next, will build with 2.1.0 and see what happens. |
Build with 2.1.0 got 55 build errors, but the good news is they are only restricted in 7 files. Error log is attached. |
One issue I ran into was with the Gradle version. I got some errors after bumping to 2.1.0 that seemed to stem from the old versions of Gradle not playing well with the new version of Kotlin. When I bumped the Gradle version to the latest, it seemed to address it. I had to make some tweaks to the various build.gradle.kts files as well. The one file in the Realm compiler that gave me particular issues was I wish you luck! |
This comment has been minimized.
This comment has been minimized.
Looks like fundamentally fixed. 2.1.0 builds without problem. Also upped some dependencies. All appears working the same way as the 2.0.x builds.
Will do some cleaning and push to my repository. Welcome any further testing. |
It's pushed to here: https://github.com/XilinJia/realm-kotlin When you download, you need, as originally directed, git clone --recursive https://github.com/XilinJia/realm-kotlin.git . The packages/external/core points to a realm repository. I'm not sure how to make it easy to use (I know it needs more testing now), as it's not on maven or anything, any suggestions. |
So there will not be an official update to support kotlin 2.1.0? I would really like to keep realm instead of sqlite, but its a dealbreaker when you are stuck with kotlin 2.0.21 |
@clementetb |
How frequently does the bug occur?
Always
Description
After update to kotlin 2.1.0, my project doesn't compile.
Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
2.3.0
What Atlas App Services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
Macos Sequoia 15.1
Build environment
Android Studio version: 2024.2.1
Android Build Tools version: ...
Gradle version: 8.10.2
The text was updated successfully, but these errors were encountered: