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-protocol

Loads 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. .proto files) are declared as :components using a suitable component subclass.

Problems:

  • For both systems, the system version should be of the form MAJOR.MINOR.NUMBER-OF-COMMITS-SINCE-RELEASE. where MAJOR and MINOR are maintained manually and NUMBER-OF-COMMITS-SINCE-RELEASE is implied by the containing GIT repository.
  • For the rsb-protocol system, the .proto files 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 :components located outside the system's directory, the .proto files have to be copied into the system's directory before the rsb-protocol system can be loaded.
  • Of course, any relevant change such as a manual change of the MAJOR or MINOR version components or a commit or a change in a .proto file should cause the appropriate actions when a system is loaded or reloaded.

2 Potential Solution

  • Manually maintain MAJOR and MINOR version components in a file version.sexp
  • Introduce auxiliary systems:
    rsb-config
    Contains code to interact with GIT and utilities for copying files.
    rsb-version
    When compiled, combines manually specified MAJOR and MINOR information (read from version.sexp) with NUMBER-OF-COMMITS-SINCE-RELEASE which is obtained from GIT by running code from the rsb-config system.
    rsb-protocol-config
    When compiled, copies .proto files to the directory of the rsb-protocol system.

The following diagram summarizes these relations:

dependencies.png

  • defsystem-reads is an abbreviation for (:version (:read-file-form "version-string.sexp"))
  • solid blue arrows indicate compile-op inputs and outputs
  • solid red arrows indicate load-op inputs

Created: 2016-06-28 Tue 14:15

Validate