4 ms·
> So, when this raises OSError or FileNotFoundError due to some botched assumption, I guess one just attaches pdb to it and now your job is to be a python exper
by planede 4y ago
> So, when this raises OSError or FileNotFoundError due to some botched assumption, I guess one just attaches pdb to it and now your job is to be a python expert
Well, debugging cmake files is not any better, in my experience. And I can't even attach a debugger. I can rely on printf debugging or pray that cmake with --trace or --trace-source has the relevant information I need (often it doesn't).
edit:
Well, your disgust is justified against ad-hoc imperative build systems that happen to use a general-purpose programming language. It doesn't have to be like this. I liked the idea of scons, for example, unfortunately it had other problems.
- mdaniel 4y agoI hear you about debugging cmake (although in this specific case JetBrains has a CMake debugger: https://blog.jetbrains.com/clion/2022/10/clion-2022-3-eap-cmake-debugger/ https://blog.jetbrains.com/clion/2022/10/clion-2022-3-eap-cm... ) but one can also concede that the magnitude of code one even needs to consider are not in the same universe as each other: $ cd mozilla-central $ find python/mach python/mozbuild/mozbuild -name '*.py' -exec cat '{}' ';' | wc -l 83088 $ find keepassxc -name CMakeLists.txt -o -name '*.cmake' -type f -exec cat '{}' ';' | wc -l 866 I am on-board with something like Starlark, which is allowed to make reasonable build decisions with the information available to it, but is prevented from mutating my system. I try to be very disciplined about reading every .gradle file carefully, because jokers love to do whatever they want when they have a full-blown programming language available to them