Skip to content
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

Move arrow sub-crate into api crate feature #58

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

rroelke
Copy link
Member

@rroelke rroelke commented Apr 16, 2024

We may to do some heavier work with arrow integrations, such as including implementing some of our traits for arrow structures. Rust forbids implementing a trait on a struct unless the trait is defined in the current crate, or the struct is defined in the current crate. Hence we should move our arrow work into the api crate and hide it behind a feature.

Of note here is that the arrow tests all used our proptest strategies. Cargo does not allow features to specify their own dev dependencies, so instead we change all the strategy modules from
#[cfg(feature = "proptest-strategies")]
to
#[cfg(any(test, feature = "proptest-strategies"))]
so that the strategies can be used whether testing or specifying tiledb as a dependency with the proptest-strategies feature.

@rroelke rroelke requested a review from davisp April 16, 2024 20:11
Copy link
Collaborator

@davisp davisp left a comment

Choose a reason for hiding this comment

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

+1

@@ -520,7 +520,10 @@ impl<'ctx> Factory<'ctx> for AttributeData {
}
}

#[cfg(feature = "proptest-strategies")]
#[cfg(feature = "arrow")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we not add the same any(test, ...) for arrow?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd say the difference is that the proptest strategies we need to do the testing of the other stuff, whereas arrow is just a thing we want to test.

@rroelke rroelke merged commit 9469803 into main Apr 16, 2024
2 checks passed
@rroelke rroelke deleted the rr/sc-45402-arrow-feature branch April 16, 2024 21:52
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.

None yet

2 participants