Cane

From IokeWiki
Jump to: navigation, search

Cane

Cane is a library/application packaging and sharing system.

Implementation Ideas

First iteration - for sharing libraries between early adopters only.

Let's start assume that Ioke and Ioke-related libraries live in the same directory on developer's desktop, be it ~/projects or ~/Projects/IokeRelated.

Implementation:

  • Ioke should provide method to add load paths (addLoadPath) to current runtime (absolute or relative to file from which was called)
  • Ioke should provide method called cane that accepts name of library
  • when cane() is invoked it tries to find directory with name of library in starting with parent directory and going up
  • when directory is found cane adds it to load path and explicitly use()s library init.ik file
  • init.ik file may add directories from library to load path
  • on installing a new library cane should automatically run the library's specs provide a status report (this should be presented as to encourage good test coverage)
  • on installing a new library cane should run dokgen to generate documentation for that library

From library developer's perspective this means that creating new library is as simple as:

  • creating new directory parallel to Ioke checkout
  • adding library files in structure they like
  • adding init.ik to specify which directories make the library

From library user's perspective using library means:

  • checking out source code in parallel to Ioke directory (and project's directory as well)
  • adding cane('library_name') to main file
  • use()ing any needed files from library

Wish list for future iterations of cane

  • A cane server to serve library documentation