DEV Community

Discussion on: Future of Ruby – AST Tooling

jonatas profile image
Jônatas Davi Paganini

Great thoughts Brandon! I remember when I did my first talks around AST and how to work with node pattern and submit it as the official guide to develop new cops:

I see a lot of opportunity on building tools like what MarcAndre did with the node pattern playground. I think maybe some reverse engineering tool would be great to understand your refactoring and reapply the concepts.

I documented my static refactoring experiments to try to bring it as inspiration for further development and this is a great way to divide and conquer and apply same principles in different patterns with the chance of testing the scenario and confirming the change is safe.

It's still very naive and needs more advanced algorithms to select what is reasonable to try. The combinatory system can take days to solve a file if it has more than 20 possibilities to combine 👨🏻‍🏫

Thank you very much for putting your thoughts here. I see a lots of opportunity in this ground to create a solid set of tools to really engage developers on large codebases with more tooling to keep it up to date with minimal human intervention.