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

Have project use the new memory model #237

Closed
1 task
twyatt opened this issue Jan 6, 2022 · 4 comments · Fixed by #437
Closed
1 task

Have project use the new memory model #237

twyatt opened this issue Jan 6, 2022 · 4 comments · Fixed by #437
Labels
Milestone

Comments

@twyatt
Copy link
Member

twyatt commented Jan 6, 2022

https://blog.jetbrains.com/kotlin/2021/08/try-the-new-kotlin-native-memory-manager-development-preview/

Evaluate if:

  • any atomics can be replaces with raw types
  • usages of Stately can be replaced by Tuulbox's SynchronizedMap
    • Stately spins up a thread on JVM target for handling isolated operations, we're also not disposing of these when done with them

To do:

@twyatt twyatt added the apple label Jan 6, 2022
@twyatt twyatt changed the title Have project to use the new memory model Have project use the new memory model Jan 14, 2022
@volo-droid
Copy link

There's a new version of Stately available 2.0.0 (so far there's a release candidate 2.0.0-rc2), which uses the new memory model, deprecates stately-iso-collections, and suggests to use stately-concurrent-collections instead.

It would be cool if Kable migrates to that version (or alternatively removes Stately all together) otherwise it's impossible to use Stately concurrent collections together with Kable in one project because of a linking error for iOS/Mac targets:

e: Module "co.touchlab:stately-isolate" has a reference to symbol co.touchlab.stately.concurrency/GuardedStableRef|null[0]. Neither the module itself nor its dependencies contain such declaration.

@twyatt
Copy link
Member Author

twyatt commented Mar 1, 2023

Thanks for the info, I had planned to remove Stately entirely but I was unaware of stately-concurrent-collections. That looks like a good choice. Super helpful that you pointed that out!
It is high up on my to do list to get these changes in.

@twyatt
Copy link
Member Author

twyatt commented Mar 3, 2023

@volo-droid I published a SNAPSHOT version for testing (from #437) that has Stately removed:

repositories {
    maven("https://oss.sonatype.org/content/repositories/snapshots")
}

dependencies {
    implementation("com.juul.kable:core:0.21.0-issue-237-1-SNAPSHOT")
}

@volo-droid
Copy link

Thanks @twyatt . The project can be built with that version, Mac version crashes on consuming scanner.advertisements but I have to figure out if the issue is on our side or caused by the library.

@twyatt twyatt added this to the 0.22.0 milestone Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants