Schubert

About

Schubert is a project dependency manager for portable R7RS Small Scheme libraries. It is open source released under AGPL license. It is named after Austrian composer Franz Schubert because thats most well known composer with sch in their name.

Dependency management

Schubert makes managing projects dependencies easy and simple. List of dependencies is kept in composition.scm file and they can be downloaded and installed in one command.

Project specific

Dependencies are installed in projects root folder under "schubert". Fixed versions ensure that no rugs are pulled under you.

Can be used locally

Local usage is possible for rapid development. Libraries can be installed to local cache and used by projects directly. This works out of the box.

Add your library to repository easily

Adding your own library to the repository is simple and made with familiar tools. After initial work, following releases of libary are automatically added to the repository.

Portable

Schubert is written in portable R7RS-small Scheme making it possible to run on any standard comforming implementation that supports SRFI 106 (Basic socket interface ) and 170 (POSIX API).

Cross platform

Schubert works on Unix based operation systems and Windows.

Download

See the readme in the code repository: https://codeberg.org/Schubert/schubert

Documentation

Definition of portable

The definition of the world portable when used in this project is code that conforms to R7RS Small and uses only SRFIs which are in final status.

Introduction

Schubert is a project dependency manager. This means that it installs the libraries that project depends on inside your project in the directory called schubert.

The list of dependencies, among other information, is stored inside your project in a file called composition.scm.

The libraries are installed from local library cache. Libraries are put into the cache either by automatically downloading them from remote repository or manually installing them with schubert install

Libraries you handle locally do not have to be portable. But any library added to the remote repository needs to be.

The programs you develop with Schubert do not need to be portable either. And Schubert can be used alongside other package/dependency managers.

System Requirements

Any R7RS Small conforming Scheme implementation with SRFI-106 (Basic socket interface) and SRFI-170 (POSIX API) should be able to run Schubert. However not many implementations currently support these SRFIs so this documentation focuses on Gauche. Gauche supports both needed SRFISs.

Even when Schubert is run with Gauche, any Scheme implementation can be used to develop your programs and libraries.

Installation

See the project readme for up to date installation information: https://codeberg.org/Schubert/schubert

Usage

Note that on Windows the schubert command is schubert.bat.

Init

In your projects root folder run

schubert init

And answer the questions asked after.

Schubert will write given information into file called composition.scm. And set up folder called schubert. If type is "application" folder called src will also be created containing "main.scm" file. If type is "library" a folder packager/name/version containing file called main.scm will be created. The schubert folder and composition.scm are required, the other folders and main.scm's are just for convenience.

Add Dependency

Add dependency into the composition.scm files depdency list. Here is example

((packager . "retropikzel")
  (name . "example-project")
  (version . "v0.1.0")
  (type . "library")
  (license . "LGPL")
  (description . "Remember to change this")
  (dependencies (retropikzel string-util v0.4.1)))
                        

Note that dependencies are lists, but they are not inside a list but on the same "level" with dependencies symbol.

Here is how it would look like if there were 3 dependencies.

((packager . "retropikzel")
  (name . "example-project")
  (version . "v0.1.0")
  (type . "library")
  (license . "LGPL")
  (description . "Remember to change this")
  (dependencies
        (retropikzel string-util v0.4.1)
        (retropikzel something-else v0.1.0)
        (retropikzel third-thing v0.1.0)))
                        

Compose

To install requirements of the project, which is called composing in Schubert, run

schubert compose

Run your code

To run your code add schubert folder into your Scheme implementations load path.

Gauche

gosh -r7 -A ./schubert src/main.scm

Sagittarius

sash -r7 -A ./schubert src/main.scm

Kawa

kawa --r7rs -Dkawa.import.path="./schubert" src/main.scm

Guile

guile --r7rs -L ./schubert src/main.scm

Composition.scm

Typical composition.scm file looks something like this

((packager . "mark")
(name . "marks-awesome-library")
(version . "v1-0-0")
(type . "library")
(license . "LGPL")
(description . "This is Marks awesome library!")
(dependencies
    (retropikzel file-util v0.1.0)))
                    

Local Usage

You can install library locally by running command

schubert install

in the librarys projects root folder. This will install the library into local cache, overwriting files if library already exists there. This way you can use the library in your other local projects without using the repository.

Its quite handy in a situation where you notice that code you are writing should go into its own library, but its still under development alot.

Adding your own library to repository

Libraries are added to the repository trough git pull request in codeberg. So you will need an account there.

Do note that libraries must only use code conforming to R7RS-small and SRFI's in final status!

Before starting you can test your library by using it locally.

  1. Fork the repository from https://codeberg.org/Schubert/schubert-library-repositories.
  2. Clone the just forked repository.
  3. Add your packager name you use in your libraries along with the libary names and information into list.json.
  4. Create pull request back to the original repository
  5. Create a release for your library.

Creating library release

To create release of your library add a git tag with following form into it's repository

vN.N.N

The tag needs to be same version as the library version, which must also follow semver.

Releases are updated to the repository hourly on the hour.