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

Update to Serde 1.0 #281

Closed
dtolnay opened this issue Apr 23, 2017 · 7 comments
Closed

Update to Serde 1.0 #281

dtolnay opened this issue Apr 23, 2017 · 7 comments

Comments

@dtolnay
Copy link

dtolnay commented Apr 23, 2017

Release notes for 0.9.0: https://github.com/serde-rs/serde/releases/tag/v0.9.0
Release notes for 1.0.0: https://github.com/serde-rs/serde/releases/tag/v1.0.0

@cuviper
Copy link
Member

cuviper commented Apr 23, 2017

I think this is likely a breaking change, but if there's any way to conditionalize our code to cover a wide range of serde versions, maybe we can squeeze by.

@cuviper cuviper added this to the v0.2.0 milestone Apr 23, 2017
@dtolnay
Copy link
Author

dtolnay commented Apr 23, 2017

Technically it's definitely possible but I'm not going to recommend that you do it. 🤣

The way to do it would be make a serde-0-9 crate and a serde-1-0 crate that each depend on the respective version of serde and just contain extern crate serde; pub use serde::*. Then you could provide an impl for serde_0_9::Serialize as well as serde_1_0::Serialize.

@cuviper
Copy link
Member

cuviper commented Apr 23, 2017

Oy. I was thinking more along the lines of detecting the selected serde version in a build script somehow, and just emit a feature name for that. But maybe that's not possible.

We need to do a semver bump. I've been procrastinating that forever. Maybe stable i128 will finally be worth advancing num so we don't have that major lack.

@cuviper
Copy link
Member

cuviper commented May 2, 2017

We could do it as a separate num-serde crate, like url does with url_serde.

@corngood
Copy link

So I've got local changes for serde 1.0, and I was hoping to make a PR.

It seems like the options are:

  1. bump to 0.2 and require serde 1
  2. support both with features (trying to wrap my head around that one)
  3. support both with intermediate crates
  4. wrapper crate (num_serde)

The changes are pretty trivial if we do (1), but I don't see a PR/branch with them. Would you like me to push it so it can be linked to the 0.2 milestone? If not, would you like me to take a look at one of the other options?

@cuviper
Copy link
Member

cuviper commented Jun 10, 2017

We need to just do 0.2. I hate to force an upgrade on the ecosystem, but it's going to happen sometime. We'll do it in a side branch so we can batch as many breaking changes as we can at once.

To that end, there's now a next branch, and #302 to get it going. When that lands, you can send a PR for next instead of master with the breaking change. Serde 1 only, still behind an optional feature, and probably remove rustc-serialize while we're at it. Sound good?

@cuviper
Copy link
Member

cuviper commented Sep 22, 2017

This is done on the next branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants