Skip to content

FFI Sync Engine changes#223

Merged
nicklan merged 7 commits intodelta-io:mainfrom
abrassel:ffi-sync-engine
May 25, 2024
Merged

FFI Sync Engine changes#223
nicklan merged 7 commits intodelta-io:mainfrom
abrassel:ffi-sync-engine

Conversation

@abrassel
Copy link
Contributor

Change list

Add sync engine cfg option to the ffi. This will allow us to build with local file paths only (mostly useful for testing).

How is this tested?

Changed ffi-test.c to build both a sync and default engine. It should pass both.

Note This is a draft because I can't get the test to build right. For some reason, the codegenned c code isn't defining the SYNC-ENGINE flag. Any ideas @nicklan

Issue

This addresses #199

@abrassel
Copy link
Contributor Author

@scovich do you happen to know why the C define is missing in the codegen for SYNC-ENGINE?

@scovich
Copy link
Collaborator

scovich commented May 24, 2024

@scovich do you happen to know why the C define is missing in the codegen for SYNC-ENGINE?

I believe cbindgen tries to emit a single header that works no matter which features were selected (and uses #if defined checks to strip out unneeded bits of code if a specific feature isn't enabled). But cbindgen has no way to guess which features the downstream user actually enabled, so it's up to the library user to pass an appropriate -D to the compiler. In case of cffi-test, the Makefile currently sets the default engine:

CFLAGS=-c -Wall -DDEFINE_DEFAULT_ENGINE #`pkg-config --cflags arrow-glib`

Most likely you just need to add -DDEFINE_SYNC_ENGINE there and all will be well?

@abrassel abrassel marked this pull request as ready for review May 24, 2024 17:01
@abrassel abrassel requested a review from scovich May 24, 2024 17:05
@abrassel
Copy link
Contributor Author

@scovich ready for re-review!

Copy link
Member

@nicklan nicklan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice thanks. just a couple small things

@abrassel abrassel requested a review from nicklan May 24, 2024 17:42
Copy link
Member

@nicklan nicklan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last small thing please!

@abrassel abrassel requested a review from nicklan May 24, 2024 17:59
@abrassel abrassel requested a review from nicklan May 24, 2024 19:57
Copy link
Member

@nicklan nicklan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for iterating! lgtm!

Copy link
Collaborator

@scovich scovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, thanks!

@abrassel
Copy link
Contributor Author

@nicklan @scovich can one of y'all merge this!

@nicklan
Copy link
Member

nicklan commented May 25, 2024

Merged! Thanks for the contribution!

@abrassel abrassel deleted the ffi-sync-engine branch May 29, 2024 05:47
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

Successfully merging this pull request may close these issues.

3 participants