-
Notifications
You must be signed in to change notification settings - Fork 71
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
Refactor rustic_core
API & add more documentation to rustic_core
#787
Conversation
12783d0
to
91b8c8d
Compare
Can you tag me, when I should review? Force-pushing makes it relatively hard to follow changes between each read. |
1578dd3
to
19e5f01
Compare
@simonsan It is far from perfect, but I think it is a good start which would enable us to publish a first version of the rustic_core crate. |
Will take some time today/the next days to go through it! |
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.
First part (please don't force push from now on, otherwise my progress will be lost for the rest of the files).
I just force-pushed the last commit to correct compile problems from the suggestions ( |
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.
Second review batch, came until /src/repofile/indexfile.rs
👍🏽
Maybe you can go through the imports again, because in most files these are wrong (see some comments).
Note: Still three open issues from last review.
Gave this a |
Fixed all or most of the issue I could spot. Some traits need further documentation: pub trait IndexedTree
pub trait IndexedIds: IndexedTree {}
pub trait IndexedFull: IndexedIds {} Also, a good search string: |
rustic_core
API & add more documentation to rustic_core
5c9d85c
to
7ede0a9
Compare
Factored out: PR #820:
PR #821:
PR #822:
|
Co-authored-by: Alexander Weiss <[email protected]>
This PR unfortunately got a bit messy. I started several times to work on it but always ran out of time (or motivation, to be honest) to further continue.. This is something we have to improve - make smaller PRs which stay reviewable! So, today another approach.. I removed quite some commits from you @simonsan - the ones which you have factored out and I hope I didn't accidentially remove something important. |
ca23ed9
to
ea46283
Compare
I also fixed some non-running tests and squashed the commits... |
ea46283
to
50248e7
Compare
I won't say that this PR is finishing all attempts to define&document the rustic_core API, but it improves it a lot and is a big PR which always stands in the way if we don't merge it. As it looks very good from my side, I'll merge it to make the way open for (hopefully much smaller/ more local) further PRs which even more improve it. |
I agree, though for lacking documentation it's pretty reasonable I think. In the end, it was technical debt that we had to work on which (IMHO, as expected) turned out to be quite a huge PR. We should keep that in mind for future PRs regarding the scope |
closes rustic-rs/rustic_core#8
TODO
rustic_core/Readme.md
(factored out into docs: Update Readmes #820)lib.rs
errors
in fallible functions and methods# Type Parameters
forRepository
and othersMoved to umbrella issue
unwraps
out of public API (e.g./commands/copy::copy()
) and in general out of the core libraryerror!
anywhere in the API of the library, they should be actual errors