One tool I would like to have available is a tool to automatically rewrite large codebases to apply API updates to libraries that are being used, using semantic patches à la Coccinelle. I think it could change the way we consider compatibility for libraries: instead of being afraid to break compatibility in principle, library authors could provide semantic patches to reduce upgrade cost for users.
(I have discussed this in the past with various people. In theory it’s not too hard to do. One of the issues is that I think the action of the tool should be easy to review in standard version-control systems, and that requires either:
- writing the tool carefully to preserve user formatting (I think this is the easiest route)
- or assuming that users already use some automatic formatter and we rerun it
- or that they use reformatting-resilient diff tools in their version-control system, for example difftastic
)