-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: add ipnet support #3710
base: main
Are you sure you want to change the base?
feat: add ipnet support #3710
Conversation
Forgive me, it's my first time making a serious pull request to this project. I'll find some time later to recreate the failing tests locally and fix what I can. |
That actually makes it a breaking change, which would mean waiting until 0.9.0. |
I see that it's breaking, but I figure it's only if someone is already trying to use the currently non-existent Either way, it's fine with me if this waits until 0.9.0 :) |
Because of Cargo's feature unification, if any crate that depends on SQLx in the dependency tree turns on a feature, it is forced on for all crates that depend on it. This has caused issues before: #3412 (comment) Thus it's probably best that it doesn't take precedent unless it needs to. I'm working on a way around this in #3383 but it's better if the user doesn't need to do this in the first place. If it's the other way around and they want to use |
Thanks for the helpful explanation, I learned something new today and I agree with your preference. I've swapped it around so |
I'm just looking to confirm that this is ready for another review, for clarity's sake. As far as I understand it, after my last commit, this PR no longer consitutes a breaking change. |
@@ -77,6 +77,9 @@ impl_type_checking!( | |||
#[cfg(feature = "rust_decimal")] | |||
sqlx::types::Decimal, | |||
|
|||
#[cfg(all(feature = "ipnet", not(feature = "ipnetwork")))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't necessary, just order these after the types from ipnetwork
.
Fixes #2150.
I chose to favour
ipnet
overipnetwork
if both features are used, because it seems more widely used and actually has a stable release.