This repository was archived by the owner on Feb 4, 2020. It is now read-only.
Closed
Conversation
added 3 commits
August 24, 2016 12:58
The 'listOfIncludeHashes' list was only used to get a list of the hashes of the contents of all include files. However, we already have this list: the given 'includes' dictionary has the hashes of all include files as the values, and by the time we get to the end of 'listOfIncludeHashes' we already verified that all the include files exist and they still have the same hashes.
This patch moves the code for verifying that the list of includes (and the hash code of the include file contents) is accurate into a separate function. The reason for this is that I think that not all users of ManifestRepository.getIncludesContentHashForFiles() need this functionality...
When creating manifests, we would first compute the list of included files, then commpute the hash code of their contents and then call ManifestRepository.getIncludesContentHashForFiles(). That function would then re-compute the file hash for each file to see whether it's still the same, but there's no point in doing so since we just computed the hash!
a479f44 to
49b0bbf
Compare
Current coverage is 79.35% (diff: 100%)@@ master #216 diff @@
==========================================
Files 1 1
Lines 958 959 +1
Methods 0 0
Messages 0 0
Branches 158 158
==========================================
+ Hits 760 761 +1
Misses 161 161
Partials 37 37
|
Contributor
|
While this change makes sense for the current code base, I think it harms the work towads updating a manifest. For example, the includes map is likely to change from a path->hash map to a path->list_of_hashes map, in order to be able to deal with multiple include contents. Removing the redundant reading of includes when creating a manifest is cool. But I think that part will be generalized and changed a lot. So I would just open an issue pointing out the problem and try to implement it with/after a solution for #212 |
Owner
Author
|
I see, I don't know what you're planning to do with #212 exactly, so I'll just keep this PR around. |
Owner
Author
|
This got obsoleted now that #222 was merged. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.