posit-dev / ark

Ark, an R kernel
MIT License
159 stars 9 forks source link

Use lobstr implementation of object_size #488

Closed dfalbel closed 1 month ago

dfalbel commented 1 month ago

Implements object_size as a port of the lobstr implementation, which should be more resilient to ALTREP objects, although it also:

It fixes issues that can be observed in: https://github.com/posit-dev/positron/issues/4512

juliasilge commented 1 month ago

Does this also address https://github.com/posit-dev/positron/issues/478?

dfalbel commented 1 month ago

Yes!

dfalbel commented 1 month ago

It would be nice to use a single source of truth but seemed more work to setup the build system than just porting to rust. The object_size code in lobstr hasn't been changed in 2 years, so I guess it won't be too complicated to maintain the port:

image