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

Fix Psych 4 compatibility and add caching for YAML.unsafe_load_file #368

Merged
merged 1 commit into from Aug 26, 2021

Conversation

casperisfine
Copy link
Contributor

Psych 4 now load in safe mode by default, which means many
features such as aliases are disabled by default.

This makes it complicated for Bootsnap to cache, and pretty
much impossible to precompile.

So until we figure out a better solution, we're better to
entirely disable that cache for Psych 4+. However it
can stay active for YAML.unsafe_load_file.

Psych 4 now load in safe mode by default, which means many
features such as aliases are disabled by default.

This makes it complicated for Bootsnap to cache, and pretty
much impossible to precompile.

So until we figure out a better solution, we're better to
entirely disable that cache for Psych 4+. However it
can stay active for `YAML.unsafe_load_file`.
@casperisfine casperisfine merged commit f7bacf0 into master Aug 26, 2021
@casperisfine casperisfine deleted the yaml-unsafe-load-file branch August 26, 2021 12:37
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems August 26, 2021 12:40 Inactive
@ahorek ahorek mentioned this pull request Aug 27, 2021
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems January 12, 2022 21:42 Inactive
jrafanie added a commit to jrafanie/manageiq that referenced this pull request Jun 28, 2022
Psych unsafe_load was added for psych 4 / 3 compatibility but was only available
in 3.3.2 and newer.

Prior to this change, bootsnap 1.8.0 would be break on psych 3.3.1 and older.

Bootsnap added psych 4 compatibility in 1.8.0 by using unsafe_load but this
doesn't work with 3.3.1 or older:
Shopify/bootsnap#368

Bootnap 1.8.1 allows older versions of psych to be compatible via:
Shopify/bootsnap#369
GilbertCherrie pushed a commit to GilbertCherrie/manageiq that referenced this pull request Jul 7, 2023
Psych unsafe_load was added for psych 4 / 3 compatibility but was only available
in 3.3.2 and newer.

Prior to this change, bootsnap 1.8.0 would be break on psych 3.3.1 and older.

Bootsnap added psych 4 compatibility in 1.8.0 by using unsafe_load but this
doesn't work with 3.3.1 or older:
Shopify/bootsnap#368

Bootnap 1.8.1 allows older versions of psych to be compatible via:
Shopify/bootsnap#369
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.

None yet

2 participants