-
Notifications
You must be signed in to change notification settings - Fork 643
Drop rustc-serialize dependency #801
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
Conversation
ordian
commented
Jun 24, 2017
•
edited
Loading
edited
So this is ready to merge. It doesn't drop rustc-serialize in transitive dependencies yet, but this can be done in a separate PR. cc @carols10cents what do you think? |
.travis.yml
Outdated
@@ -49,7 +49,7 @@ matrix: | |||
- cargo build | |||
- cargo test | |||
- yarn test | |||
- rust: nightly-2017-03-04 | |||
- rust: nightly-2017-06-29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unrelated to the other changes in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is related to updating clippy. Old clippy (0.0.118) depended on rustc-serialize (via toml 0.2) and the new one (0.0.141) won't build with nightly-2017-03-04.
Is the rename of |
Good point. I reverted this change. I would prefer to eliminate encodable structs in a separate pr, because currently it is blocked on postgres release with chrono 0.4. |
Yes, I agree that the elimination should not be part of this PR> |
Err(..) => { | ||
let value = de::Unexpected::Str(&s); | ||
let expected = "a valid semver"; | ||
Err(de::Error::invalid_value(value, &expected)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The semver crate has a serde
feature. Should we just use that instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to at first, but failed. Because of conduit, we must use semver 0.5, which doesn't have serde feature.
I'm a little worried about whether this changes our response structure in subtle ways that will break the front-end and won't be caught by our tests, but overall this seems good. |
This PR doesn't change json structure, only the encoder/decoder is changed. Assuming serde_json is correct, it won't break the front-end. |
Nice!! Thank you for this!!! Love how it gets rid of things like the
Bumping the versions of anything out of date sounds great-- I'd rather do that than switch to another web app framework right now. I'm not opposed to switching from conduit to something else, it'd just be a bigger project, a larger change that can't easily be made incrementally, and that kind of thing makes me nervous :) If switching frameworks makes the code easier to understand and possibly more familiar for contributors, I'm up for being convinced that it's worth the tradeoff though :) The error messages printed through cargo when a publish gets rejected are a little bit uglier. Before this change:
after:
Just that extra |
I understand the concern.
It probably would, since conduit is not maintained. But it's better to wait for a framework with a mature http2 and async support (hyper is anync, but not a framework, iron is not async yet).
Does this PR fix the issue? |