-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
checksum: simplify, use only sha256 #10247
Conversation
Review period will end on 2021-01-08 at 07:54:12 UTC. |
There are still a few places that call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, nice cleanup @iMichka!
brew/Library/Homebrew/exceptions.rb
Lines 627 to 643 in db0b69a
# Raised by {Pathname#verify_checksum} when verification fails. | |
class ChecksumMismatchError < RuntimeError | |
attr_reader :expected, :hash_type | |
def initialize(path, expected, actual) | |
@expected = expected | |
@hash_type = expected.hash_type.to_s.upcase | |
super <<~EOS | |
#{@hash_type} mismatch | |
Expected: #{Formatter.success(expected.to_s)} | |
Actual: #{Formatter.error(actual.to_s)} | |
File: #{path} | |
To retry an incomplete download, remove the file above. | |
EOS | |
end | |
end |
3f1f501
to
b04f500
Compare
All green for me, except the |
I would recommend this: def sha256(val)
stable.sha256(val)
end Or otherwise using |
Probably should try to add as few Currently looking into |
Done |
(You missed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also recommend SeekingMeaning@c01b1cc80 but I'm not familiar with all uses of BottleSpecification#checksums
so 👍 from me
The checksums are coming from https://github.com/Homebrew/brew/pull/10247/files#diff-bb40db554b6955f972e80737c5883dafef80ffe19b09e0ad1ceeea1cb776f694L425-L439 for this part of the code. This should be fine. This is a part of code I will rework with my follow up PRs as the logic is going to change there. |
We use only one sha type right now. Needed for Homebrew#10186
Review period ended. |
Thanks for the cleanup @iMichka! |
We use only one sha type right now.
Needed for #10186
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?brew man
locally and committed any changes?