-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(fingerprint): Track the intent for each use of
UnitHash
(#…
…14826) ### What does this PR try to resolve? We have - `-C metadata` - `-C extra-filename` - Uniquifying build scripts - Uniquifying scraped documentation Currently, these are all the same value. For #8716, we might want to have `-C metadata` and `-C extra-filename` hash different parts of the `Unit`. I figured that this change helps to clarify intent so that even if we don't change the definitions, this could still be worth it. The last two I'm tracking as a `unit_id`. As we evolve the first two hashes, we can decide which would be a better fit for backing the `unit_id`. For scraping, I could have treated this as `-C extra-filename` but then we'd have a lot of `.expect()`s. I moved the accessors from `CompilationFiles` to `MetaInfo` so we could closely associate the documentation, API, and implementation. Making `CompilationFiles::c_metadata` the main entry point that gets documented would be weird because the hashing is associated with `MetaInfo` (umbrella type, was private, now `Metadata`) or `Metadata` (agnostic of each use, now `UnitHash`) ### How should we test and review this PR? ### Additional information
- Loading branch information
Showing
7 changed files
with
97 additions
and
85 deletions.
There are no files selected for viewing
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
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.