Skip to content

Bootsnap.unload_cache! fails due to two issues #421

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

Closed
rlineweaver opened this issue Aug 10, 2022 · 1 comment
Closed

Bootsnap.unload_cache! fails due to two issues #421

rlineweaver opened this issue Aug 10, 2022 · 1 comment

Comments

@rlineweaver
Copy link

rlineweaver commented Aug 10, 2022

I made sure the issue is in bootsnap

Steps to reproduce

Add a call to Bootsnap.unload_cache! at the end of config/application.rb and then boot the application. Or, load a rails console and invoke Bootsnap.unload_cache! directly.

Expected behavior

Bootsnap.unload_cache! completes without error.

Actual behavior

Bootsnap.unload_cache! raises NoMethodError: undefined method 'unload_cache!' for Bootsnap:Module

This method is defined as def self.unload_cache! but it should actually just be def unload_cache!.

Secondary issue: Bootsnap::LoadPathCache.unload! raises:

NameError: undefined method `require_relative_without_bootsnap' for module `Kernel'

        ::Kernel.alias_method(:require_relative, :require_relative_without_bootsnap)
                ^^^^^^^^^^^^^

because this line tries to undo an alias that is no longer present since fb857fe#diff-78b49fe34f2d25dcdd453feb3cb2f6caa094bbf1d3ad96f12f8da7d5183bd854

System configuration

Bootsnap version:

0.13.0

Ruby version:

3.1.2

Rails version:

7.0.3.1

@casperisfine
Copy link
Contributor

🤦 thanks for the report.

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

No branches or pull requests

2 participants