Skip to content
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

Small hash-related improvements #8217

Merged
merged 2 commits into from
Feb 2, 2024
Merged

Small hash-related improvements #8217

merged 2 commits into from
Feb 2, 2024

Conversation

sschuberth
Copy link
Member

Please have a look at the individual commit messages for the details.

@sschuberth sschuberth requested a review from a team as a code owner February 2, 2024 10:01
@sschuberth sschuberth mentioned this pull request Feb 2, 2024
@@ -609,7 +610,7 @@ class Pub(

RemoteArtifact(
url = "$hostUrl/packages/$rawName/versions/$version.tar.gz",
hash = Hash.create(sha256)
hash = Hash(sha256, HashAlgorithm.SHA256)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After my related PR is merged, using constructor instead of create() would by-pass turning the value lowercase. At least it was my intention to make create() ensure the value passed to the constructor is lowercase.

Maybe we can discuss it here in one place: #8214 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, from the linked discussion, I believe this could now just be changed to call the create() function, passing again, but pass the algorithm, right?

@fviernau fviernau changed the title Small hash-retaled improvements Small hash-related improvements Feb 2, 2024
This avoids the guessing logic depending on the value's length to kick
in.

Signed-off-by: Sebastian Schuberth <[email protected]>
@sschuberth sschuberth requested review from fviernau and a team February 2, 2024 13:14
@fviernau fviernau merged commit d602075 into main Feb 2, 2024
19 checks passed
@fviernau fviernau deleted the sha-companions branch February 2, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants