Date: 2025-02-23
Deprecated: 2025-03-10
Status
Deprecated, superseded by ADR-0029
Context
We need a robust scripting language for our build tooling that can handle:
- Text processing and manipulation
- System command execution
- Cross-platform compatibility (primarily macOS)
- Package and dependency management
- Testing infrastructure
Decision
Historical We initially chose Ruby as our primary build tooling language because:
-
Strong text processing capabilities
- Built-in string manipulation
- Regular expression support
- Stream processing capabilities
-
Rich gem ecosystem
- Extensive package management options
- Well-maintained testing frameworks (RSpec)
- Documentation tools
- CLI utilities
-
System integration
- Strong OS interaction capabilities
- Built-in process management
- Shell command execution support
-
Developer experience
- Clear syntax for build scripts
- Strong testing culture
- Excellent debugging tools
- Built-in logging capabilities
Deprecation Reason
This decision has been deprecated in favor of using Elixir (see ADR-0029) due to:
- Need for better concurrency in the build pipeline
- Desire to leverage OTP for process supervision and fault tolerance
- Better integration with our target deployment environment
- Enhanced parallelization capabilities for format generation
- Stronger type system through pattern matching
- Built-in support for distributed processing
Migration Path
Existing Ruby build tooling will be gradually migrated to Elixir following these steps:
- Identify core build functionality
- Port to equivalent Elixir modules
- Validate feature parity
- Run parallel implementations
- Switch to Elixir implementation
- Remove Ruby code
See ADR-0029 for details on the Elixir implementation strategy.
Historical Consequences
Positive
- Simplified text processing for book content
- Rich ecosystem of gems for extending functionality
- Strong testing capabilities with RSpec
- Clear error handling patterns
- Good macOS integration
Negative
- Requires Ruby installation management (solved via asdf)
- Team needs Ruby proficiency
- Version compatibility management needed