State of Namespace
summary
Namespace isolates classes and modules by giving each class a per-namespace classext so different versions of the same library can coexist in one process, implemented by shallow-copying classexts per namespace and resolving autoload by deep-copying autoload tables when needed. Native extensions load by creating per-namespace .so copies to avoid DLOpen collisions. Debugging found a sigkill/segv caused by overwritten .so names, bug20655 (stack pop on continuations) was fixed, Make Check passed in January while a wider Make Exam still fails, and merge into Ruby 3.5 is targeted with namespace off by default.
AI-written summary · about
chapters (16)
- 0:00Introduction and background
- 1:26What is Namespace in Ruby
- 4:31Debugging and Ruby 3.4 progress
- 6:58Ruby class definition structure
- 9:05Namespace class definition changes
- 10:07Autoload behavior in Namespace
- 13:38Ruby version constant issues
- 16:27Signal kills and crashes
- 17:52Native extension library conflicts
- 20:40Namespace stack management bug
- 21:43Continuation and namespace pop issue
- 22:25CME method cache problem
- 23:28Prism parser system stack errors
- 24:31Method cache and CC table challenges
- 25:13Future plans for Namespace
- 26:58Merging Namespace into Ruby 3.5
related talks
15mCalling Native Code From Ruby
41mLiberating the Smalltalk lurking in C and Unix
15m"Ruby native extensions and what's wrong with them"
47mConstant autoloading in ruby on rails
44mrequire() bombed my multi-threaded app!
47mClassboxes, nested methods, and real private methods
27mBreaking nil to fix bugs: experimental approach
29mRequire Hooks: Filling the Gap in Ruby's Extensibility
