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

Don't require a serde dependency in consuming crates #12

Merged
merged 1 commit into from
May 16, 2019

Conversation

sgrif
Copy link
Owner

@sgrif sgrif commented May 14, 2019

Prior to serde_derive 1.0.90, there was no way for us to re-export
everything required for this derive to function without requiring that
all users of swirl have serde in their Cargo.toml. While it's probably
likely that anyone using this library is already using Serde, it's still
an arbitrary restriction.

Now we can re-export everything required from swirl directly. I've
specifically depended on serde_derive instead of serde = { features = ["derive"] }, since we will only work with version 1.0.90 or later of
the derive crate, and serde does not have a strict version requirement
on the derive crate when the feature is enabled.

Fixes #9

Prior to serde_derive 1.0.90, there was no way for us to re-export
everything required for this derive to function without requiring that
all users of swirl have serde in their `Cargo.toml`. While it's probably
likely that anyone using this library is already using Serde, it's still
an arbitrary restriction.

Now we can re-export everything required from swirl directly. I've
specifically depended on `serde_derive` instead of `serde = { features
= ["derive"] }`, since we will only work with version 1.0.90 or later of
the derive crate, and serde does not have a strict version requirement
on the derive crate when the feature is enabled.
Copy link

@tessgriffin tessgriffin left a comment

Choose a reason for hiding this comment

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

This looks good 👍

@sgrif sgrif merged commit 2b27758 into master May 16, 2019
@sgrif sgrif deleted the sg-private-serde-dependency branch May 16, 2019 21:03
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.

#[swirl::background_job] assumes serde::{Deserialize, Serialize} available
2 participants