This is for now going to be a grab bag of complaints I have for developing restraint. In time I'd like to tackle these in order to improve the development experience.
- No debug build in the Makefiles
Restraint only builds with optimisations enabled. This is bad for debugging. There should be a make variable to build in debug mode. EG: 'make DEBUG=1' or similar.
- Hard coded paths in the source.
Restraint has expectations that there will be scripts in /usr/share/restraint. When developing on a machine without restraint installed normally, stuff breaks because these files are not installed. During a development build these should be pointing to the local source tree that restraint was built from.
- Support for VS Code.
I'm currently using VS Code to develop restraint. It's a step up from Vim, Make and GDB. Adding some VSCode project files with sensible defaults will make it easier for the next person to come along.
- Change build system to CMake.
This is more of a what-if at the moment. CMake is pretty powerful and flexible and integrates well with VSCode (from what I remember). It might give us better build options for debug/devel mode and be easier to maintain. I'll need to investigate this in more detail. Our build machines need cmake anyway for other third party dependencies.
The build system is a bikeshed of infinite size. But for what it's worth, Peter H recently told me that a lot of things (at least in the Freedesktop.org world where he does all his work) are switching to Meson. It seems to be winning the popularity wars, even amongst more conservative projects, so it might be worth trying instead of CMake.
Interesting, I wasn't aware of Meson. It appears to require Python 3 which could be an issue for the old RHEL builders, but not insurmountable.
> - No debug build in the Makefiles
I've added this feature now. make DEVEL=1 to build without optimizations.
This is an ongoing effort track elsewhere, and we alaready have some improvments in this area, for example, https://bugzilla.redhat.com/show_bug.cgi?id=1801333
Regarding VSCode, is up to the developers using certain IDE to share their config if, but is not something that the project will support.
Hardcoded paths will be addressed improving testing, and regarding CMake, the main goal for the build system is to be able to build on all distros that we need to support, minimizing the maintenance effort.