v0.21.0 #1004
Xuanwo
started this conversation in
Announcements
v0.21.0
#1004
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Upgrade to v0.21
v0.21 is an internal refactor version of OpenDAL. In this version, we refactored our error handling and our
Accessor
APIs. Thanks to those internal changes, we added an object-level metadata cache, making it nearly zero cost to reuse existing metadata continuously.Let's start with our errors.
Error Handling
As described in RFC-0977: Refactor Error, we refactor opendal error by a new error
called
opendal::Error
.This change will affect all APIs that are used to return
io::Error
.To migrate this, please replace
std::io::Error
withopendal::Error
:And the following error kinds should be updated:
std::io::ErrorKind::NotFound
=>opendal::ErrorKind::ObjectNotFound
std::io::ErrorKind::PermissionDenied
=>opendal::ErrorKind::ObjectPermissionDenied
And since v0.21, we will return errors
ObjectIsADirectory
andObjectNotADirectory
instead ofanyhow::Error
.Accessor API
In v0.21, we refactor the whole
Accessor
's API:Since v0.21, we will return a reply struct for different operations called
RpWrite
instead of an exact type. We can split OpenDAL's public API and raw API with this change.ObjectList and ObjectPage
Since v0.21,
Accessor
will returnObjectPager
forList
:And
Object
will return anObjectLister
which is built uponObjectPage
:ObjectLister
can be used as an object stream as before. It also provides the functionnext_page
to get the underlying pages directly:Code Layout
Since v0.21, we have categorized all APIs into
public
andraw
.Public APIs are exposed under
opendal::Xxx
; they are user-face APIs that are easy to use and understand.Raw APIs are exposed under
opendal::raw::Xxx
; they are implementation details for underlying services and layers.Please replace all usage of
opendal::io_util::*
andopendal::http_util::*
toopendal::raw::*
instead.With this change, new users of OpenDAL maybe be it easier to get started.
Summary
Sorry for introducing too much breaking change in a single version. This version can be a solid version for preparing OpenDAL v1.0.
What's Changed
Full Changelog: v0.20.1...v0.21.0
This discussion was created from the release v0.21.0.
Beta Was this translation helpful? Give feedback.
All reactions