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.
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.
One thing worth considering here: making this change might mean that this is a workaround we'll have to carry around forever, since changing this will change the checksum of some bottles (and hence bottling would not be reproducible).
However, this might be a property of any workaround we try, so I'm not sure what the right thing to do is.
If the above is correct, then the comment will need to be amended accordingly.
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.
How many bottles does this affect in practice? If it's just one or two that's getting (semi-)frequent bottle updates anyway then it's probably ok.
I hope we're not stuck with Ruby 2.6 for that long (Ruby 2.7 has the bugfix) but I guess we'll see come June.
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.
So far that I know of? Only one at Homebrew/homebrew-core#123724. But throwing an error here is relatively new, so there could be more. Presumably @alebcay spotted some others which is what prompted throwing an error here.
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.
@carlocab Does this change the checksum of any existing bottles?
I think we could bump the requirement for CI/dev-cmd before that but probably want to assume end-users may be running it for a while longer.
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 noticed this because my initial sanity testing with
GzipWriter
(inbrew irb
) was withmtime
of 0. That's how I discovered the corner case.I actually didn't know of any actual need we had for setting
mtime
of 0, this is the first I'm hearing of it.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.
If it does, it would be because their checksums were not reproducible. @alebcay also points this out. Making this change will make their checksums reproducible (as long as we never remove the bit that does
mtime = 1 if mtime.zero?
).