Closed omus closed 11 months ago
Merging #203 (cb0539e) into main (204dff1) will increase coverage by
0.50%
. Report is 2 commits behind head on main. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #203 +/- ##
==========================================
+ Coverage 95.82% 96.33% +0.50%
==========================================
Files 12 13 +1
Lines 623 627 +4
==========================================
+ Hits 597 604 +7
+ Misses 26 23 -3
Flag | Coverage Δ | |
---|---|---|
Ray.jl | 96.33% <100.00%> (+0.50%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files | Coverage Δ | |
---|---|---|
src/Ray.jl | 100.00% <ø> (ø) |
|
src/object_ref.jl | 100.00% <100.00%> (+3.19%) |
:arrow_up: |
src/ray_julia_jll/common.jl | 90.99% <100.00%> (+1.51%) |
:arrow_up: |
src/ray_julia_jll/ray_julia_jll.jl | 100.00% <ø> (ø) |
|
src/ray_julia_jll/upstream_fixes.jl | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
While investigating #177 it was becoming evident that the flaw had something do with our worker addresses once again. As I so far have been unable to reproduce this problem locally I decided to look into audit our object reference ownership code to see if anything popped out. In doing so I recalled that in #140 we utilized JSON serialization for the owner address as we were having problems with CxxWrap
StdString
which would interpret the null-character as the end of the string instead of looking at the length of the string. The JSON approach doesn't actually fix anything except that it works around the issue. I decided to try to switch back to usingSerializeAsString
and apply our new CxxWrap knowledge to see if we could really fix the issue. In doing so I discovered that CxxWrap doesn't handle non-ASCII characters well:The flaw in CxxWrap is that the
iterate
/isvalid
implementation doesn't skip invalid code points (thanks @iamed2). I'll file an issue for that later today.This PR implements a
safe_convert
function to ensure that C++ string data can be round-tripped as a JuliaString
and back. Doing this allows us to useSerializeAsString
successfully. In iterating on this design I found that implementing serialization support forAddress
allowed us to clean up the interface for this resulting some cleaner code.Fixes #177.