Skip to content

[ffi] Option object missing definition in .hpp #720

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

Open
samansmink opened this issue Feb 28, 2025 · 1 comment
Open

[ffi] Option object missing definition in .hpp #720

samansmink opened this issue Feb 28, 2025 · 1 comment

Comments

@samansmink
Copy link

samansmink commented Feb 28, 2025

Describe the bug

The current (v0.7.0) release of kernel will produce an ffi header (.hpp) like:

...
template<typename T = void>
struct Option;
...
Option<Handle<SharedExpression>> get_transform_for_row(uintptr_t row,
                                                       const CTransforms *transforms);
...

This means that I can't use the result returned form the get_transform_for_row but it also leads to a compile issue because I can't use the struct trick thing to workaround from #451

Workaround for now is really simple though: i just comment out the get_transform_for_row function

To Reproduce

build with cargo build --package delta_kernel_ffi --workspace --all-features

Expected behavior

The get_transform_for_row function should return an object that has a definition to be able to use it and allow for me to use the hacky workaround for #451

@samansmink samansmink added the bug label Feb 28, 2025
@scovich
Copy link
Collaborator

scovich commented Feb 28, 2025

Ugh, this is that old cbindgen gap again -- it's not smart enough to collapse Option<T> when T is a transparent struct wrapping NonNull. The fix I contributed way back in November has unfortunately languished without reviews: mozilla/cbindgen#1029

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants