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

Move serde 1.0 support in-crate #304

Closed
brson opened this issue May 4, 2017 · 12 comments
Closed

Move serde 1.0 support in-crate #304

brson opened this issue May 4, 2017 · 12 comments

Comments

@brson
Copy link
Contributor

brson commented May 4, 2017

Today serde 1.0 is supported in its own url_serde crate, so that url can support both old serde and new serde. @dtolnay has some plan to hack support for both in-crate, though presumably serde_url will need to continue on until a major bump.

@SimonSapin
Copy link
Member

Removing support for serde 0.8 would be a breaking change, which I’d rather not make until there are other and strong enough reasons to do so. Therefore this depends on #320.

serde_url will still be on crates.io, available to projects that already use it.

@dtolnay
Copy link
Contributor

dtolnay commented May 12, 2017

#327 adds support in-crate for Serde 1.0. Should I make a separate PR removing url_serde from the repo?

@drusellers
Copy link

Looking forward to serde 1.0 support landing

@opilar
Copy link

opilar commented Sep 22, 2017

Is this still relevant? I would like to help.

@SimonSapin
Copy link
Member

I’d prefer to be able to use derive, which depends at least on serde-rs/serde#953.

autozimu added a commit to autozimu/lsp-types that referenced this issue Jan 1, 2018
Note: the SerdeUrl/Serde<Url> can be replaced by Url once
servo/rust-url#304 is merged in.
autozimu added a commit to autozimu/lsp-types that referenced this issue Jan 1, 2018
Note: the SerdeUrl/Serde<Url> can be replaced by Url once
servo/rust-url#304 is merged in.
@silwol
Copy link

silwol commented Oct 17, 2018

Any news on this?
In Debian, we have packaged url, but the serde feature and it's dependency to the pre-1.0 version of serde prevents it's migration from unstable to testing.
We have some options there:

  • Patch out the serde feature from url (preventing any dependencies from packaging that use this feature).
  • Wait until an updated url crate without pre-1.0 serde dependency is released, and get other crates which depend on it to upgrade (most tedious, but probably the most sustainable course of action).
  • Package serde 0.8 (which we don't intend to do).

@SimonSapin
Copy link
Member

No real news for now. As noted above, this presumably requires dropping support for older serde version and so bumping the version number to 2.0.0. I’ve filed #463 about that, but as you can see there’s potentially a bunch of related work that no-one else is actively doing at the moment.

@SimonSapin
Copy link
Member

@silwol Serde is an optional dependency. Does Debian require optional dependencies to be packaged as well even if nothing uses them?

@silwol
Copy link

silwol commented Oct 17, 2018

Debian creates an empty package for each feature which depends on it's prerequisites, in this case the librust-url+serde-dev which depends on librust-serde-0.8+default-dev. This empty package can be built just fine, but due to the missing dependency on serde-0.8, it can't be installed.
The debian piuparts tool checks, among other things, whether all binary packages generated from a source package can be properly installed. A piuparts run without any errors is required to migrate the whole source package and it's binary packages from unstable to testing, which eventually becomes the stable version. So this optional dependency is currently preventing the package from going through this migration. https://tracker.debian.org/pkg/rust-url has the details in the testing migrations section.
By default the feature packages are created, except if we add a patch which removes the feature from Cargo.toml.

@SimonSapin
Copy link
Member

Is there no way to exclude some features from feature package creation, other than patching Cargo.toml? Either way, this is likely your best bet in the short term. As you say this will prevent dependent packages from using that feature, but such packages would also depend on serde 0.8 that you don’t intend to package anyway.

@jimmycuadra
Copy link

Any progress on this?

@nox
Copy link
Contributor

nox commented Jul 18, 2019

Done in master. Will be released in 2.0.

@nox nox closed this as completed Jul 18, 2019
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 a pull request may close this issue.

8 participants