fastruby / next_rails

A toolkit to upgrade your next Rails application
https://www.fastruby.io/blog/upgrade-rails/dual-boot/dual-boot-with-rails-6-0-beta.html?utm_source=github&utm_medium=description&utm_campaign=github&utm_term=next-rails
MIT License
489 stars 31 forks source link

[REQUEST] A command to `promote` the next rails version #88

Closed arielj closed 10 months ago

arielj commented 1 year ago

Description

When we are ready to move to the next version after some time of dual booting, we have to do some manual steps:

It would be nice to have something like next promote or something like that to automate these steps or at least facilitate them. Maybe with some arguments to decide if we want to re-add the new dual booting or just remove it, if we want to do something with conditionals in the code, etc (though we would need to define some conventions for this to make sense)

Possible Implementation

I don't have an implementation idea, I imagine some simple file renaming, file parsing with search/replace can work for the basics.

Resources:

I don't have any resource to link to either.

I will abide by the code of conduct

fbuys commented 1 year ago

This seems like a fairly complex change, especially:

Do any part of this feature can be implemented and still add value? I am wondering if it would make sense to implement most of what is described but leave the conditionals in the code until we have time to discuss it a bit more.

etagwerker commented 1 year ago

I like this idea, but search and replace could be quite error prone. What if we used an AST-based solution? Something like https://github.com/seattlerb/ruby2ruby for finding an idiom and replacing it with the "promoted idiom"

etagwerker commented 10 months ago

On second thought, I think this falls outside the scope of this gem and it is not that easy to implement, so I think we won't be implementing this feature. Thanks for taking the time to suggest it! 💯