Skip to content

Remove the warning about config.cache_classes set to false? #597

@erikaxel

Description

@erikaxel

We currently output a warning if config.cache_classes is set to false, we do that in this line

unless Rails.application.config.cache_classes || defined?(Spring)

Right now there are two issues at least:

  • In Rails 7.1 and onwards it is called config.enable_reloading. So new users might not understand which setting to set.
  • The Spring guard does not seem to work.

I can take a stab at these issues if you would like to, but before I do that, I wanted to ask, do we really need this warning anymore? We have been running Cucumber with config_classes set to false in our test environment for several years and have never ever seen this problem. The initial warning was from 16 years ago from a bug report that no longer exists, for what I think was Rails 2. This was the earliest mention I could find in the repo: https://github.com/cucumber/cucumber-rails/blob/124b298ede48622769230fea29e04105ca899629/lib/cucumber/rails/world.rb

The only similar error we experience is if you actually change code while running a test. But that goes for rspec and minitest as well, and it does not have a similar warning afaik. I think if you change code on the fly while running tests that you reasonably expect things to go wrong.

My hunch is that with all the changes the last 16 years, in particular with Zeitwerk, that this is no longer an issue. Perhaps we could short cut this and just remove it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    💔 breaking changeThis will require a major release✅ acceptedThe core team has agreed that it is a good idea to fix this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions