12 ms·
Usually this kind of refactor is something done as the very first task following the last release in a minor series and as the first step in a major new release
by bdamm 8y ago
Usually this kind of refactor is something done as the very first task following the last release in a minor series and as the first step in a major new release. Going from version 7.4.32 to 8.0.0? Refactor that source tree, reformat all the code, and start over on the build toolchain! Best of all, make sure some junior dev does the actual checkin for the reformat.
In all seriousness, I think this is the only way. Yeah you may have forever to deal with it cross patching but let's face it, for big lumbering code bases, perfect backwards compatibility in the source tree is usually the smallest of issues, and the benefit of using standard tools far outweighs the cost of occasionally reinterpreting back-patches (if they are even possible.)
- gpderetta 8y agoSome of these codebases have 10s of millions of lines if not more. Such a refactoring could take years.
- bdamm 8y agoThe benefit of using widely supported tooling is even greater for large codebases. Automated reformatting is easy, and moving code around isn't that hard if it's going hand in hand with a build system that supports it. Staying in the cooking pot of ever larger proprietary and exotic hacks is how organizations grind to a halt.
- geezerjay 8y ago> The benefit of using widely supported tooling is even greater for large codebases. Your assertion really depends on your definition of "widely supported". Jumping from fad to fad, however, is only effective as a way to waste time. >Staying in the cooking pot of ever larger proprietary and exotic hacks is how organizations grind to a halt. Using established build systems for C++, whether autotools or even plain makefiles, ensures that the project doesn't suffer from bit rot and developers can focus om developing code instead of wasting their time trying out every flavor of the month. And do note that the main reason C++ hasn't adopted any official build system is that each and every flavour of the month ends up being very horrible and very hard to maintain. Yes, including CMake. If a build system is known for telling essentially all users that they are doing it wrong, that means the build system is the problem.