-
Notifications
You must be signed in to change notification settings - Fork 31
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
Workaround API break on private API in Serde 1.0.119 #135
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Richard Whitehouse <[email protected]>
Signed-off-by: Richard Whitehouse <[email protected]>
Signed-off-by: Richard Whitehouse <[email protected]>
Signed-off-by: Richard Whitehouse <[email protected]>
richardwhiuk
force-pushed
the
serde-breakage
branch
3 times, most recently
from
January 12, 2021 10:02
a8d6f4b
to
4a35df8
Compare
RUSTFMT=1 changes the binary used by cargo fmt - see rust-lang/rustfmt#4419 Signed-off-by: Richard Whitehouse <[email protected]>
richardwhiuk
force-pushed
the
serde-breakage
branch
from
January 12, 2021 10:17
d606f34
to
496585e
Compare
Signed-off-by: Richard Whitehouse <[email protected]>
richardwhiuk
force-pushed
the
serde-breakage
branch
from
January 12, 2021 11:27
6055269
to
16ca4fb
Compare
bors r+ |
Build succeeded: |
richardwhiuk
added a commit
that referenced
this pull request
Jan 18, 2021
135: Workaround API break on private API in Serde 1.0.119 r=richardwhiuk a=richardwhiuk We are using a private API in serde, and they've changed the API in a patch release to remind us this is wrong: serde-rs/serde@dd1f4b4 That's annoying, but there's no easy viable alternative. This API is used by serde_derive on an untagged enum ( see https://github.com/serde-rs/serde/blob/b0c99ed761d638f2ca2f0437522e6c35ad254d93/serde_derive/src/de.rs#L1627-L1645 ), which is basically what we have. We can't use serde_derive, because we want specific semantics. The only alternative is re-implementing the `ContentRefDeserializer` and `Content` objects, which is clearly worse than depending on this private API. I've asked in Discord and raised serde-rs/serde#1947 to query the serde devs. Signed-off-by: Richard Whitehouse <[email protected]> Co-authored-by: Richard Whitehouse <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are using a private API in serde, and they've changed the API in a patch release to remind us this is wrong:
serde-rs/serde@dd1f4b4
That's annoying, but there's no easy viable alternative. This API is used by serde_derive on an untagged enum ( see https://github.com/serde-rs/serde/blob/b0c99ed761d638f2ca2f0437522e6c35ad254d93/serde_derive/src/de.rs#L1627-L1645 ), which is basically what we have.
We can't use serde_derive, because we want specific semantics. The only alternative is re-implementing the
ContentRefDeserializer
andContent
objects, which is clearly worse than depending on this private API.I've asked in Discord and raised serde-rs/serde#1947 to query the serde devs.
Signed-off-by: Richard Whitehouse [email protected]