Skip to content

[WIP] Split up lib.rs into files #14

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

Merged
merged 2 commits into from
Feb 18, 2020
Merged

[WIP] Split up lib.rs into files #14

merged 2 commits into from
Feb 18, 2020

Conversation

TimonPost
Copy link
Member

@TimonPost TimonPost commented Feb 8, 2020

Apparently I was able to crate this branch directly. What do you prefer? Do you want me to fork this library or is this oke?

Don't worry about the LoC change count. This has to do with moving files around. You can skip all the added files. And the removed code in lib.rs.

Currently. For all the files and test I get the error:

error[E0603]: trait `SerdeDiff` is private
 --> examples/simple.rs:4:10
  |
4 | #[derive(SerdeDiff, Serialize, Deserialize, PartialEq, Debug)]

This has probably something to do with the proc macro. I am looking into this.

Changes

Fixes: #13

I moved the re-exports like this:

#[doc(hidden)]
pub use apply::ApplyContext;
#[doc(hidden)]
pub use difference::{DiffContext, DiffPathElementValue};

pub use apply::Apply;
pub use config::Config;
pub use difference::Diff;

The usings in public export are used in serde-diff-derive crate. Previously all types were exported. But hidden for documentation. This PR only exposes the nessicarly types and hides the others. By doing this we introduce API breaking changes. Though the impact will be minimal because they were hidden for the documentation and we get better encapsulation. We do need to do a major patch.

@kabergstrom kabergstrom merged commit 9617959 into master Feb 18, 2020
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.

Split up lib.rs
2 participants