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

unpack_strategy/zip: fix extraction issues on macOS without developer mode #16288

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

Bo98
Copy link
Member

@Bo98 Bo98 commented Dec 4, 2023

Before:

> UnpackStrategy::Zip.ancestors
[UnpackStrategy::Zip::MacOSZipExtension, UnpackStrategy, SystemCommand::Mixin, UnpackStrategy::Zip, UnpackStrategy, Object, SystemCommand::Mixin, JSON::Ext::Generator::GeneratorMethods::Object, Kernel, BasicObject]

After:

> UnpackStrategy::Zip.ancestors
[UnpackStrategy::Zip::MacOSZipExtension, UnpackStrategy::Zip, UnpackStrategy, Object, SystemCommand::Mixin, JSON::Ext::Generator::GeneratorMethods::Object, Kernel, BasicObject]

We were skipping the generic OS extract_to_dir and directly going to the unpack strategy baseclass.

For some reason, this didn't happen with Sorbet Runtime enabled as it seems to break the ancestor rules (coincidentally to our favour on this occasion).

Fixes #16287.

@Bo98 Bo98 added the critical Critical change which should be shipped as soon as possible. label Dec 4, 2023
@Bo98 Bo98 enabled auto-merge December 4, 2023 16:13
@Bo98 Bo98 changed the title unpack_strategy/zip: fix super ancestor on macOS without Sorbet Runtime unpack_strategy/zip: fix extraction issues on macOS without Sorbet Runtime Dec 4, 2023
@Bo98 Bo98 changed the title unpack_strategy/zip: fix extraction issues on macOS without Sorbet Runtime unpack_strategy/zip: fix extraction issues on macOS without developer mode Dec 4, 2023
@Bo98 Bo98 force-pushed the macos-zip-fix branch 2 times, most recently from 3a9f660 to 13891e0 Compare December 4, 2023 16:33
@Bo98 Bo98 merged commit 4889e10 into Homebrew:master Dec 4, 2023
26 checks passed
Copy link
Member

@reitermarkus reitermarkus left a comment

Choose a reason for hiding this comment

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

Makes sense, since MacOSZipExtension is prepended and not a full override.

@Bo98 Bo98 deleted the macos-zip-fix branch December 4, 2023 16:50
@MikeMcQuaid
Copy link
Member

Thanks @Bo98!

@github-actions github-actions bot added the outdated PR was locked due to age label Jan 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zip extraction can fail on macOS
4 participants