Skip to content

Remove spring #605

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

Merged
merged 2 commits into from
Aug 25, 2021
Merged

Remove spring #605

merged 2 commits into from
Aug 25, 2021

Conversation

mattbrictson
Copy link
Contributor

Problem

Spring seems to be on the way out. The repo doesn't get much attention (very few PRs are accepted and there are many open issues), and new gem versions have been published rarely (3 releases in the last 4 years).

And recently spring was just removed from rails itself: in the next version of rails, spring is no longer included in apps generated via rails new and there is not even an option for it. The argument is that computers have gotten fast enough that spring is no longer worth the occasional debugging headaches. ("Why isn't this working? Oh I guess I needed to restart spring.")

rails/rails#42997

Solution

Spring might still have value for very large apps that have long boot times. But since raygun is used for greenfield projects, we should remove it, considering it probably will become more and more of a niche gem going forward.

Spring seems to be on the way out. The repo doesn't get much attention
(very few PRs are accepted and there are many open issues), and new gem
versions have been published rarely (3 releases in the last 4 years).

And recently spring was just removed from rails itself: in the next
version of rails, spring is no longer included in apps generated via
`rails new` and there is not even an option for it. The argument is that
computers have gotten fast enough that spring is no longer worth the
occasional debugging headaches. ("Why isn't this working? Oh I guess I
needed to restart spring.")

rails/rails#42997

Spring might still have value for very large apps that have long boot
times. But since raygun is used for greenfield projects, we should
remove it, considering it probably will become more and more of a niche
gem going forward.
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
# frozen_string_literal: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I regenerated this binstub using bundle binstub rspec-core --force to get the non-springified version.

@@ -24,8 +24,7 @@ FileUtils.chdir APP_ROOT do
FileUtils.cp ".env.sample", ".env" unless File.exist?(".env")

puts "\n== Preparing database =="
system! "bin/rails db:prepare"
system! "bin/rails db:sample_data"
system! "bin/rails db:prepare db:sample_data"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Micro-optimization: make these two tasks a single bin/rails call to save on boot time.

Copy link
Contributor

@bunnymatic bunnymatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

Copy link
Contributor

@eskfung eskfung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@mattbrictson mattbrictson merged commit 53177a3 into main Aug 25, 2021
@mattbrictson mattbrictson deleted the chores/remove-spring branch August 25, 2021 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants