forked from soveran/cuba
-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify reloading section of README
Drop references to shotgun and Rack::Reloader. shotgun is no longer maintened, and Rack::Reloader's approach of just loading a modified file without removing constants defined in the existing file is not something Roda should be encouraging. Also recommend that people start with Zeitwerk, since that is the most popular reloading option these days.
- Loading branch information
1 parent
4b514f7
commit a0b8d4f
Showing
1 changed file
with
6 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1006,25 +1006,16 @@ constants and removing them when any of the reloadable loaded files changes. It | |
+require+ and +require_relative+ when activated (usually in the development environment). No | ||
configurations other than +reloadable_paths+ are required. | ||
|
||
Both {rerun}[https://github.com/alexch/rerun] and | ||
{shotgun}[https://github.com/rtomayko/shotgun] use a fork/exec approach for loading new | ||
versions of your app. rerun is faster as it only reloads the app on changes, whereas | ||
shotgun reloads the app on every request. Both work without any changes to application | ||
{rerun}[https://github.com/alexch/rerun] uses a fork/exec approach for loading new | ||
versions of your app. It work without any changes to application | ||
code, but may be slower as they have to reload the entire application on every change. | ||
However, for small apps that load quickly, either may be a good approach. | ||
|
||
{Rack::Reloader}[https://github.com/rack/rack/blob/master/lib/rack/reloader.rb] ships | ||
with rack and just reloads monitored files when they change, without unloading constants. | ||
It's fast but may cause issues in cases where you remove classes, constants, or methods, | ||
or when you are not clearing out cached data manually when files are reloaded. | ||
However, for small apps that load quickly, it may be a good approach. | ||
|
||
There is no one reloading solution that is the best for all applications and development | ||
approaches. Consider your needs and the tradeoffs of each of the reloading approaches, | ||
and pick the one you think will work best. | ||
|
||
If you are unsure where to start, it may be best to start with rerun or shotgun | ||
(unless you're running on JRuby or Windows), and only consider other options if rerun or | ||
shotgun are not fast enough. | ||
and pick the one you think will work best. If you are unsure where to start, | ||
it may be best to start with Zeitwerk, and only consider other options if it does not | ||
work well for you. | ||
|
||
== Plugins | ||
|
||
|
@@ -1143,4 +1134,3 @@ MIT | |
== Maintainer | ||
|
||
Jeremy Evans <[email protected]> | ||
|