Skip to content

Commit 39660ca

Browse files
authored
Update byte-unit dependency with breaking changes (#329)
Byte unit 4 broke a lot of interfaces that we depended on. This commit uses the new interfaces: - Byte::from_bytes -> Byte::from_<type> (like Byte::from_u64) - Byte.get_appropriate_unit(bool) -> Byte.get_appropriate_unit(UnitType) - macros such as `n_mib_bytes` are no longer present. This has one (technically) breaking change in the `mib` convenience function provided by commons. However if a literal is being used in the code (which it is in the Ruby main.rs) then it is not affected. Even though lots of things changed internally, the overall interface to AppCache stayed (almost) stable and no code inside of the main buildpack needed to be updated. That indicates a relatively successful encapsulation attempt. Moving forward it would be best to not directly rely on types from external crates but rather to provide new type interfaces for them so we have control over the API and therefore stability.
1 parent ec57995 commit 39660ca

File tree

5 files changed

+297
-33
lines changed

5 files changed

+297
-33
lines changed

0 commit comments

Comments
 (0)