refactor: move checkpoint and errors into separate module #1430
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.
Description
While doing #1409 it became evident, that our errors are somewhat organically grown and could do with some pruning. At the same time we are hoping to reorganize (#1136) delta-rs a bit, to make it easier to reason about.
This PR is a first attempt to introduce a more explicit approach to how we model our errors. Here I'd like to propose we work towards the approach taken in the object store crate - specifically have very specific errors in submodules, but do not surface those errors to the user. Rather collapse them into eventually a single error type.
Since delta-rs does much more things then object store, I believe we will eventually end up with some more top level errors, or have maybe a two level hierarch.
As a first step in this PR:
checkpoints.rs
into actions module (as proposed in Reorganize crate into fewer top-level modules #1136)errors
module - at lest the ones defined indelta.rs
ActionError
andCheckpointError
which are now part of theaction
module.As I needed to touch a bunch of imports anyhow, I took the liberty to organize them according to what to the best of my knowledge is the leading contender for what rust-fmt might do.
@wjones127 @rtyler @Blajda - opening this as a draft to get some feedback, as this is a somewhat intrusive change to the overall crate, in case you want to go another way.
Related Issue(s)
part of: #1136
Documentation