Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information