Table of Contents
1 Overview
The goal is loading one or more of several systems that make up a project. Two prototypical systems are:
rsb- "main" system, independent of concrete protocol.
rsb-protocolLoads protocol buffer definitions into the image (without writing Lisp code into files), thereby extending the functionality of the "main" system.
Protocol buffer definitions (i.e.
.protofiles) are declared as:componentsusing a suitablecomponentsubclass.
Problems:
- For both systems, the system version should be of the form
MAJOR.MINOR.NUMBER-OF-COMMITS-SINCE-RELEASE. whereMAJORandMINORare maintained manually andNUMBER-OF-COMMITS-SINCE-RELEASEis implied by the containing GIT repository. - For the
rsb-protocolsystem, the.protofiles are installed somwhere in the filesystem by some other project and thus neither contained in the repository (not even as a submodule or subtree) nor located in a subdirectory of the system's directory. Since ASDF does not allow:componentslocated outside the system's directory, the.protofiles have to be copied into the system's directory before thersb-protocolsystem can be loaded. - Of course, any relevant change such as a manual change of the
MAJORorMINORversion components or a commit or a change in a.protofile should cause the appropriate actions when a system is loaded or reloaded.
2 Potential Solution
- Manually maintain
MAJORandMINORversion components in a fileversion.sexp - Introduce auxiliary systems:
rsb-config- Contains code to interact with GIT and utilities for copying files.
rsb-version- When compiled, combines manually specified
MAJORandMINORinformation (read fromversion.sexp) withNUMBER-OF-COMMITS-SINCE-RELEASEwhich is obtained from GIT by running code from thersb-configsystem. rsb-protocol-config- When compiled, copies
.protofiles to the directory of thersb-protocolsystem.
The following diagram summarizes these relations:
defsystem-readsis an abbreviation for(:version (:read-file-form "version-string.sexp"))- solid blue arrows indicate
compile-opinputs and outputs - solid red arrows indicate
load-opinputs