-
Notifications
You must be signed in to change notification settings - Fork 340
Spring uses AS::Dependencies.mechanism= #649
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
Comments
Ah, I just noticed the same thing today when upgrading Rails and worked on a fix: #651 |
@byroot I see there is an additional occurrence in spring/lib/spring/application.rb Line 202 in 53d9e17
I don't discard coming later and replacing all this with documentation. Spring has no business manipulating the configuration of the user at its will. That configuration has to be there before we bootstrap, and nobody is telling you what you can do after it. |
Ah good catch. Sorry I didn't do a great job here, and just directly fixed the error I was seeing. It's also unfortunate that the true acceptance tests don't run against rails edge, which would likely have caught this. I agree spring probably shouldn't deal with that. But maybe it could make sense to do a new major version that requires Rails 7? Since it could assume Zeitwerk it might simplify thing. Just a thought. |
It's not really about Rails 7. In my view, it should just not do anything of this and be compatible with all versions. You document Then, the initializer aborts if the setting is not |
Seems like this is still a problem. @byroot were you planning to have a look at this? |
If I find the time yes, but it might take a while. |
I'll do it! |
The accessor
ActiveSupport::Dependencies.mechanism
is private and deleted in Rails 7.Rails has only one way to enable or disable reloading:
config.cache_classes
. Spring should document it requires that to be false because it reloads, and verify the flag in an initializer for robustness.The text was updated successfully, but these errors were encountered: