Skip to content

fix(sqlx-postgres): Make IpNetwork serde compatible again#4229

Closed
michaelvanstraten wants to merge 1 commit intolaunchbadge:mainfrom
michaelvanstraten:make-ipnetwork-serde-again
Closed

fix(sqlx-postgres): Make IpNetwork serde compatible again#4229
michaelvanstraten wants to merge 1 commit intolaunchbadge:mainfrom
michaelvanstraten:make-ipnetwork-serde-again

Conversation

@michaelvanstraten
Copy link
Copy Markdown
Contributor

In c79ccb7 we bumped the ipnetwork crate from 0.20.0 to 0.21.1 which made serde a non default feature.

This patch re-enables this feature in the ipnetwork crate.

Does your PR solve an issue?

No

Is this a breaking change?

No

In c79ccb7 we bumped the `ipnetwork` crate from
`0.20.0` to `0.21.1` which made `serde` a non default feature.

This patch re-enables this feature in the `ipnetwork` crate.
@abonander
Copy link
Copy Markdown
Collaborator

This is actually a good thing. It means users who don't need the Serde integration of ipnetwork aren't forced to pay for it. You can always re-enable it yourself.

The only thing that needs to be done here is maybe adding a note to the CHANGELOG entry:

* [[#3670]]: Bump ipnetwork to v0.21.1 [[@BeauGieskens]]

@abonander abonander closed this Apr 10, 2026
@michaelvanstraten
Copy link
Copy Markdown
Contributor Author

I was stupid, I have sqlx as a workspace dependency and added

ipnetwork = { version = "*", features = ["serde"] }

to the virtual manifest and forgot it in the crates manifest.

Thanks

@michaelvanstraten michaelvanstraten deleted the make-ipnetwork-serde-again branch April 10, 2026 16:22
@abonander
Copy link
Copy Markdown
Collaborator

I don't recommend using * for a dependency specification. Cargo will not always unify that correctly as it's not forbidden from compiling multiple versions of ipnetwork in the same graph. It only appears to work because ipnetwork = "0.21.1" is the latest version. One cargo update at any time after a new release could potentially break your build.

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.

2 participants