Bug 1564322 - Improve the Restraint developer experience.
Summary: Improve the Restraint developer experience.
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Restraint
Classification: Retired
Component: general
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: beaker-dev-list
QA Contact:
URL:
Whiteboard:
Depends On: 1565927
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-06 00:30 UTC by Matt Tyson 🤬
Modified: 2020-06-04 08:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-04 08:06:46 UTC


Attachments (Terms of Use)

Description Matt Tyson 🤬 2018-04-06 00:30:22 UTC
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.

Comment 1 Dan Callaghan 2018-04-06 00:47:07 UTC
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.

Comment 2 Matt Tyson 🤬 2018-04-06 04:42:13 UTC
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.

Comment 3 Matt Tyson 🤬 2018-04-11 06:16:21 UTC
> - No debug build in the Makefiles

I've added this feature now.  make DEVEL=1 to build without optimizations.

Comment 5 Daniel Rodríguez 2020-06-04 08:06:46 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.