-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adopt CacheDiff (crate) over MetadataDiff (internal) (#370)
* Upgrade Rust version * Add CacheDiff to dependencies * Import and implement CacheDiff derive macro * Use CacheDiff implementation for MetadataDiff The CacheDiff is a public crate while MetadataDiff was a temporary experimentation platform internal to this buildpack * Update magic_migrate Due to schneems/magic_migrate#7 * Introduce metadata v3 The idea is to centralize all OS distribution information into a single attribute. It's not yet used. * Use metadata v3 for bundle_install The coming move to CacheDiff prefers if one attribute relates to one difference reason. V2 introduced a distribution name and distribution value which we later determined looked better if it's combined to look like a single attribute to the user "OS Distribution." This move brings the attributes inline with how they're compared, now both name and value are evaluated and emited as a single unit. * Implement CacheDiff on bundle_install layer (Tests do not compile yet) * Update tests for CacheDiff change * Move OS distribution into a type * Implement v3 metadata with condensed OS distribution The coming move to CacheDiff prefers if one attribute relates to one difference reason. V2 introduced a distribution name and distribution value which we later determined looked better if it's combined to look like a single attribute to the user "OS Distribution." This move brings the attributes inline with how they're compared, now both name and value are evaluated and emitted as a single unit. * Fix tests due to V3 migration * Implement CacheDiff for ruby_install_layer Does not compile yet due to tests * Fix test compilation * Implement CacheDiff for shared tests * Update shared interfaces to use CacheDiff instead of MetadataDiff * Replace qualified path with use * Remove unused internal trait MetadataDiff * Use regex for integration test match * Use diff method directly In the refactor we had two `diff` methods, now there's only one so we can use it instead of having to reference the trait. This shaves off some lines of the total diff. * Format use statements
- Loading branch information
Showing
10 changed files
with
237 additions
and
158 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.