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 serde dependency to 1.0 #297

Closed
wants to merge 1 commit into from

Conversation

@DenisKolodin
Copy link

DenisKolodin commented Apr 30, 2017

These changes updates serde dependency from 0.9 to 1.0 line.
Only root sources updated (no updates in sub-crates).
I added lifetimes to Deserialize trait implementations and use ownership instead of mutable reference.
Also I used associated types for results.

I see that there is #296, but that PR updates url_serde only (that's why I haven't updated sub-crates).

I've runned/passed all tests and checked it as dependency for my own project.


This change is Reviewable

This changes updates serde dependency from 0.9 to 1.0 line.
Only root sources update (no updates in sub-crates).
Added lifetimes to Deserialize trait implementations.
Use ownership instead of mutable reference and return results
with associated types.
@SimonSapin
Copy link
Member

SimonSapin commented Apr 30, 2017

Thanks for you work, but I won’t be taking this pull request.

serde is a public dependency, so changing it to an incompatible version is a breaking change that must be reflected in the crate’s own version number. For the url crate, that would make it version 2.0.0. This in turn would require every library that depends on url (such as Hyper for example) to make a breaking-numbered version of their own in order to update url.

Because the disruption to the Rust ecosystem would be significant, I want to avoid making any breaking change to url until it becomes really necessary. This is why the url_serde crate exist: so that this separate crate can be updated independently of url.

@SimonSapin SimonSapin closed this Apr 30, 2017
@SimonSapin
Copy link
Member

SimonSapin commented Apr 30, 2017

url_serde is now published with serde 1.0 support. See https://docs.rs/url_serde/0.2.0/url_serde/

@DenisKolodin
Copy link
Author

DenisKolodin commented Apr 30, 2017

@SimonSapin Sending a PR is a best way to understand something )
I've tried url_serde, it works fine. Thanks!
Could you explain me more about:

  • If I understand correctly: it's better to have a separate crate for actively improving features than using feature dependency in crates, especially for popular crates. Is it right?
  • Do you have any plan to release url:2.0.0? If so will it support serde:1.0.0 directly or through url_serde crate and dependency to serde will be removed from the root crate?
@SimonSapin
Copy link
Member

SimonSapin commented May 4, 2017

The only reason for the separation is that adding support for serde 1.0 in url itself is difficult without removing support for older versions. Removing support for anything is a breaking change, which I’d rather avoid until there’s a stronger reason to justify it.

url 2.0 will probably happen some day. I’m still somewhat undecided on what will be the best approach then.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.