Zeitwerk: A new code loader
summary
Zeitwerk is a standalone gem that becomes Rails 6’s default loader and claims to eliminate most hand-written requires by registering Module#autoload for files, using TracePoint to solve circular namespace ordering, and exposing a registry with eager_load_all for cross-project eager loading. Reloading is opt-in, it preserves Ruby semantics, targets CRuby initially, and removes the need to keep app directories on $LOAD_PATH; the implementation ships and is already used by real projects.
AI-written summary · about
chapters (37)
- 0:00Intro
- 0:48What is Zeitwerk
- 1:42Project structure
- 3:36Implicit Syntax
- 4:18Basic Usage
- 4:39Gems
- 7:47Reloading
- 10:50Why requires
- 11:22Global effects
- 12:28NanoC
- 13:57Constant Refresher
- 14:17What are constants
- 16:40Module constants
- 18:23Alternative syntax
- 18:59Nesting
- 21:12Ancestors
- 21:27Relative Constants
- 23:00Qualified Constants
- 23:51Outlaw Paths
- 25:09Limitations
- 27:17Missing
- 28:28Model Autoload
- 29:12The new approach
- 29:55Technical difficulties
- 31:25Explicit namespaces
- 32:41implicit namespaces
- 34:47chicken and egg
- 35:23trace point
- 35:47call it
- 36:15publish
- 37:11remove required dependencies
- 37:33flexure
- 38:51flexure check
- 39:28forbidden
- 40:11zippy controllers
- 41:09opt out
- 41:27upgrade guide
related talks
57mZeitwerk Internals
01h 02mOpening Keynote: The Journey to Zeitwerk
34mZeitwerk Internals
45mClass Reloading in Ruby on Rails: The Whole Story
47mConstant autoloading in ruby on rails
32mWebpacking for the Journey Ahead
27mUnboxing Rails 7What's new in the latest major version
37mWebpacker, It-Just-Works, But How?
