You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to make sure that super_diff works with as many versions of Ruby, Rails, and RSpec versions as possible. To this end, within the test suite for super_diff, we use the Appraisal gem to maintain a set of gemfiles crafted to represent particular combinations of Rails and RSpec versions.
The best way to run these tests is in CI, where we can easily specify multiple Ruby versions to complete the picture. Running the same tests locally is very difficult, however. On top of this, maintaining these appraisals in the first place is also very difficult. Because more recent of Rails and RSpec have dropped support for earlier versions of Ruby, in order to generate all of the appraisals, you must switch to Ruby 2.7.7. This is somewhat impossible to do on recent versions of macOS, as there is something with the new ARM CPUs that broke compilation. I can somehow do this on my work laptop, but my personal laptop will not compile Ruby 2.7.7 (specifically the RBS gem).
All this to say, I think all of this pain could be solved by using Docker for development. We could eliminate a couple of variables (Ruby version manager and operating system), and we wouldn't have to maintain a setup script. We could even employ act, which uses Docker as well, run the GitHub Action workflow locally as well. Further down the road, we may not even need Appraisal, but that's a decision for another day.
The text was updated successfully, but these errors were encountered:
We want to make sure that
super_diff
works with as many versions of Ruby, Rails, and RSpec versions as possible. To this end, within the test suite forsuper_diff
, we use the Appraisal gem to maintain a set of gemfiles crafted to represent particular combinations of Rails and RSpec versions.The best way to run these tests is in CI, where we can easily specify multiple Ruby versions to complete the picture. Running the same tests locally is very difficult, however. On top of this, maintaining these appraisals in the first place is also very difficult. Because more recent of Rails and RSpec have dropped support for earlier versions of Ruby, in order to generate all of the appraisals, you must switch to Ruby 2.7.7. This is somewhat impossible to do on recent versions of macOS, as there is something with the new ARM CPUs that broke compilation. I can somehow do this on my work laptop, but my personal laptop will not compile Ruby 2.7.7 (specifically the RBS gem).
All this to say, I think all of this pain could be solved by using Docker for development. We could eliminate a couple of variables (Ruby version manager and operating system), and we wouldn't have to maintain a setup script. We could even employ
act
, which uses Docker as well, run the GitHub Action workflow locally as well. Further down the road, we may not even need Appraisal, but that's a decision for another day.The text was updated successfully, but these errors were encountered: