Closed jrochkind closed 3 days ago
I wonder if combustion should just be doing a config.load_defaults #{current_rails_version_loaded}, to always be loading whatever framework defaults are for whatever version of rails is being tested? That is probably what I would want to test with! And then you wouldn't have to manually keep defaults up to date/working/non-deprecated for each version of rails?
Yes, this sounds great to me! I wonder if this approach didn't exist when I first created combustion, but surely it's covered in every supported version of Rails now? 🤞🏻
If you want to take a go at a PR, that'd be brilliant, but otherwise I'll try to get to it soon.
I think you are right that it didn't exist back when Combustion started.
And combustion, at least according to gemspec, still supports Rails back to 3.x! So it might have to be a conditional application.
Not sure what to do with the Rails after config.load_defaults
exists but for which combustion currently does not do load_defaults
. Perhaps for backwards compatibility, combustion would only do the load_defaults trick going forward for rails > 7.1. (Current main branch rails claims to be 7.2.0.alpha1, although I think it's maybe never going to be released as that but as 8.0 instead, not sure).
Not totally sure if I'll have time to work on it; if I do, I'll post here saying I'm working on it, but at the moment, I am not!
Thanks!
Closing this issue as I've just merged @ankane's work in making this the new behaviour for 7.2 onwards. I'm open to have it being the default behaviour for all Rails versions that do allow for config.load_defaults
- but that feels like a breaking change, so we'll (finally) get this current code out in a release and then ponder that.
I use combustion to test under multiple rails versions, and usually use rails edge (current tip of
main
) as one of the versions, to stay ready for the next rails release as soon as it happens. This works out well for me.It also means I notice any time combustion triggers a deprecation on Rails main.
On post-Rails 7.1, rails main @ c402ec78724a
I wonder if combustion should just be doing a
config.load_defaults #{current_rails_version_loaded}
, to always be loading whatever framework defaults are for whatever version of rails is being tested? That is probably what I would want to test with! And then you wouldn't have to manually keep defaults up to date/working/non-deprecated for each version of rails?