Skip to content

Update to serde 1.0 with tests still passing#29

Merged
s-panferov merged 1 commit intos-panferov:masterfrom
ErichDonGubler:serde-1.0
Mar 7, 2018
Merged

Update to serde 1.0 with tests still passing#29
s-panferov merged 1 commit intos-panferov:masterfrom
ErichDonGubler:serde-1.0

Conversation

@ErichDonGubler
Copy link
Contributor

@ErichDonGubler ErichDonGubler commented Feb 28, 2018

  • BREAKING CHANGE: Force the current doc examples to unwrap their code, since now
    serde_json::to_value returns a Result.
  • BREAKING CHANGE: Make downstream update any custom serializers they may have used to conform to the new serde API. This is expected, and not too big of a deal for people who want to upgrade to the new versions of serde. Basically, one only needs to change the &mut S argument to S, and use S::Ok instead of () for the Result.
  • BREAKING CHANGE: Rename find usages in the docs to its isomorphic successor API get.
  • BREAKING CHANGE: Replace find_path usages in the docs with usages of the new pointer API.

Closes issue #26.


NOTE that this PR is distinct from #27, which has a few broken tests. This PR has ALL tests passing with minimum modifications necessary in order to make tests build again.

This PR depends on the serde 1.0 bump that I've also submitted against jsonway. This PR will break in CI until that PR is merged and a new version of jsonway is accessible via crates.io. It may be interesting to discuss the following for this PR:

  • I would question the necessity of jsonway for this library now that there is a json! macro in serde_json that seems to approach the same problem domain as that library. I probably don't know enough about it, though -- I'm not sure what the breadth of use cases are that jsonway intends to handle.
  • The SemVer version bump that (I think) should accompany this change, since the APIs and docs have changed sufficiently to break most client code.

@ErichDonGubler ErichDonGubler changed the title feat(*): Update to serde 1.0 Update to serde 1.0 Feb 28, 2018
BREAKING CHANGE: Force the current doc examples to `unwrap` their code, since now
    `serde_json::to_value` returns a `Result`.
BREAKING CHANGE: Make downstream update any custom serializers they may have used to conform to the
    new `serde` API. This is expected, and not too big of a deal for people who want to upgrade to
    the new versions of `serde`. Basically, one only needs to change the `&mut S` argument to `S`,
    and use `S::Ok` instead of `()` for the `Result`.
BREAKING CHANGE: Rename `find` usages in the docs to its isomorphic successor API `get`.
BREAKING CHANGE: Replace `find_path` usages in the docs with usages of the new `pointer` API.

Closes issue #26.
@ErichDonGubler ErichDonGubler changed the title Update to serde 1.0 Update to serde 1.0 with test still passing Feb 28, 2018
@ErichDonGubler ErichDonGubler changed the title Update to serde 1.0 with test still passing Update to serde 1.0 with tests still passing Feb 28, 2018
@JordiPolo
Copy link

This is awesome, really interested on this. @s-panferov Any chances of reviewing this?

@adwhit
Copy link

adwhit commented Mar 2, 2018

👍 I hope this PR can revive this project

@s-panferov
Copy link
Owner

I'll try to merge this at weekend

@ErichDonGubler
Copy link
Contributor Author

@s-panferov: Any update on when this can be given some attention? :) I'm available for any questions you may have about these changes, in case the PR doesn't attend to some concern you may have.

@s-panferov s-panferov merged commit f91bfc7 into s-panferov:master Mar 7, 2018
@ErichDonGubler ErichDonGubler deleted the serde-1.0 branch March 7, 2018 03:24
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 this pull request may close these issues.

4 participants