Repository navigation
feat: minimal stub implementation for kyo-offheap - #1072
Conversation
Adds a minimal stub implementation for `kyo-offheap` to enable support for Scala Native. - `Arena` class manages off-heap memory allocations with automatic deallocation. - `MemorySegment` class provides basic operations for slicing and accessing primitive values in off-heap memory. This implementation forms the basis for integrating off-heap memory management with Scala Native in the `kyo-offheap` module. Signed-off-by: Akhilender Bongirwar <[email protected]>
sideeffffect
left a comment
There was a problem hiding this comment.
Nice! I have a few suggestions for improvement.
|
From my past attempt for this problem, the biggest challenge was how to create a native |
Signed-off-by: Akhilender Bongirwar <[email protected]>
sideeffffect
left a comment
There was a problem hiding this comment.
Thanks for implementing my suggestions. There is still some work that needs to be done.
Signed-off-by: Akhilender Bongirwar <[email protected]>
Signed-off-by: Akhilender Bongirwar <[email protected]>
Signed-off-by: Akhilender Bongirwar <[email protected]>
sideeffffect
left a comment
There was a problem hiding this comment.
We're getting there.
Signed-off-by: Akhilender Bongirwar <[email protected]>
af9a80b to
1f52ae7
Compare
|
Thank you for the contribution! This is looking promising :) I took a look at the build and the new native implementation isn't being tested, we also need changes in the SBT build: diff --git a/build.sbt b/build.sbt
index 2de5dd29..5fa03824 100644
--- a/build.sbt
+++ b/build.sbt
@@ -161,6 +161,7 @@ lazy val kyoNative = project
`kyo-stats-registry`.native,
`kyo-scheduler`.native,
`kyo-core`.native,
+ `kyo-offheap`.native,
`kyo-direct`.native,
`kyo-combinators`.native,
`kyo-sttp`.native
@@ -334,7 +335,7 @@ lazy val `kyo-core` =
)
lazy val `kyo-offheap` =
- crossProject(JVMPlatform)
+ crossProject(JVMPlatform, NativePlatform)
.withoutSuffixFor(JVMPlatform)
.crossType(CrossType.Full)
.in(file("kyo-offheap"))I've added these changes locally and noticed that there are compilation failures. To validate changes, please make sure the tests are passing: |
Signed-off-by: Akhilender Bongirwar <[email protected]>
Signed-off-by: Akhilender Bongirwar <[email protected]>
|
Although I have used the correct imports and syntax as per https://scala-native.org/en/stable/user/interop.html but still I get errors like |
|
I am travelling and currently don't have access to my laptop, I will be back by 21st Feb night. |
Signed-off-by: Akhilender Bongirwar <[email protected]>
sideeffffect
left a comment
There was a problem hiding this comment.
You still need to align the names with the official Java version.
Signed-off-by: Akhilender Bongirwar <[email protected]>
|
Due to the compilation errors, I have modified the Although there are no compilation errors now but there are new errors in |
Signed-off-by: Akhilender Bongirwar <[email protected]>
|
@akhilender-bongirwar if you're having trouble due to the methods being |
- fixed conflicts - removed inline in `Memory.scala` - all compilation errors are suceessfully resolved - Todo: only one test in failing in `MemoryTest.scla` Signed-off-by: Akhilender Bongirwar <[email protected]>
Thx! @fwbrasil. I have modified code accordingly but still trying to figure out one failing test case. |
Signed-off-by: Akhilender Bongirwar <[email protected]>
sideeffffect
left a comment
There was a problem hiding this comment.
happy to see the tests pass, great job! 🎉
sideeffffect
left a comment
There was a problem hiding this comment.
Still needs more checkOpen to ensure correctness.
Signed-off-by: Akhilender Bongirwar <[email protected]>
@sideeffffect done! |
|
congrats on your first contribution @akhilender-bongirwar! I've increased the bounty to $250 |
|
and thank you @sideeffffect for the help with the reviews 🙏 |
Thank you @fwbrasil 🙏 and thank you @sideeffffect 🙏 for reviews and providing relevant official docs links, it truly helped : ) |
|
@fwbrasil @sideeffffect, I've noticed a failing check following the merge of my PR. All checks passed during the PR process, so I'm unsure if this failure is related to my changes. Could you please let me know if it's something I need to address? If so, I'll make the necessary modifications and submit a new PR with your guidance. |
Adds a minimal stub implementation for `kyo-offheap` to enable support for Scala Native. - `Arena` class manages off-heap memory allocations with automatic deallocation. - `MemorySegment` class provides basic operations for slicing and accessing primitive values in off-heap memory. This implementation forms the basis for integrating off-heap memory management with Scala Native in the `kyo-offheap` module. #### Related Issue - #1053 /claim #1053 --------- Signed-off-by: Akhilender Bongirwar <[email protected]>
|
@akhilender-bongirwar sorry for the delay to reply. I haven't been able to reproduce the issue locally. Let's see if it still happens in main as we get new changes merged. |
### Problem The `release` workflow is failing in main since #1072 got merged. The compiler for some reason has trouble to generate scaladocs after the `inline` keywords were removed. ### Solution I've tried to understand why the compiler was having trouble with scaladocs but the error messages don't show any meaningful information. I've decided to reintroduce inlining to check if the scaladoc generation would work but it actually continues failing but I think the change still makes sense.



Adds a minimal stub implementation for
kyo-offheapto enable support for Scala Native.Arenaclass manages off-heap memory allocations with automatic deallocation.MemorySegmentclass provides basic operations for slicing and accessing primitive values in off-heap memory.This implementation forms the basis for integrating off-heap memory management with Scala Native in the
kyo-offheapmodule.Related Issue - #1053
/claim #1053