Related: A side gig for RuboCop, the Bookworm code crawler for code analysis, Writing Good Documentation for deprecation notices
-
Static analysis: Rubocop
-
Learning from other leanguages
-
Warning module
-
Documentation
-
@deprecated tag and annotation
-
#[deprecated], #[obsolete]
Documentation ONly Runtime Warnings IDE Integrations Auto fix ⇐ rust
Deprewriter
Logger << log
- Annotation
- Execution
- Exception Handling
- Caller Rewriting
- Execution Continues
Author
- Legacy Class
YARD
Gem::Deprecate
extend Deprewriter
Deprewriter Ruby Implementation Details
Challenges
- How to write transformation rules
- HOw to transform code
- is rewriting code at runtime safe
- will the ruby ecosystem adopt it
Synvert
- AST Based Ruby Code Transforemation tool
- parser included for prism
NodeMutation::PrismAddapter Gem::DEprecate
presever original method behaviour to resume later
send old, *args, &blocks
filepath, line = Gem.location+of+caller