Skip to content

partiql/partiql-lang

PartiQL Language Specification

This is the AsciiDoc source for the PartiQL specification.

Editing

How to Build the Spec

Docker

The easiest way to build the specification is to use the Dockerfile to build an image that you can use to containerize the build. This can be done as follows assuming you have docker in your path:

./build-docker.sh

The above command will build the specification and is a short-hand for building the image, and running bundle exec rake inside of it. Cleanup and other targets are available:

# the default target builds an optimized PDF/HTML to ./build
./build-docker.sh spec:build

# build, watch the sources, and re-build on changes
./build-docker.sh spec:watch

# clean the build
./build-docker.sh spec:clean

Potential Issues

If you run the instructions for non-Docker building and run into this message or something like it:

rbenv: version `3.1.2' is not installed (set by /workspace/.ruby-version)

The Docker version of the build does not use local environment versions for rbenv because it is not portable and the container controls the "global" Ruby installation so you can work around this by removing the .ruby-version file.

Pre-requisites

  1. Install rbenv

    terminal
    brew install rbenv
    rbenv init
  2. Install the latest version of ruby

    terminal
    rbenv install $(rbenv install -l | grep -v - | tail -1)
  3. Install rbenv shell integration (replace .zshrc with .bash_profile if you use bash)

    terminal
    echo "\n# rbenv integration" >> ~/.zshrc
    echo "eval \"\$(rbenv init -)\"" >> ~/.zshrc
    source ~/.zshrc
  4. Install Vollkorn & Iosevka fonts (Open Font License)

    terminal
    mkdir fonts
    curl -L -o fonts/vollkorn.zip http://vollkorn-typeface.com/download/vollkorn-4-105.zip
    unzip fonts/vollkorn.zip -d fonts/vollkorn
    curl -L -o fonts/iosevka.zip https://github.com/be5invis/Iosevka/releases/download/v16.0.2/ttf-iosevka-term-slab-16.0.2.zip
    unzip fonts/iosevka.zip -d fonts/iosevka
  5. Install fonts and such needed by AsciiMath

    terminal
    brew tap homebrew/cask-fonts
    brew install glib gdk-pixbuf cairo pango cmake font-computer-modern
    
    cd ~/Library/Fonts
    curl -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmex10.ttf \
         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmmi10.ttf \
         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmr10.ttf \
         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/cmsy10.ttf \
         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/esint10.ttf \
         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/eufm10.ttf \
         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msam10.ttf \
         -LO http://mirrors.ctan.org/fonts/cm/ps-type1/bakoma/ttf/msbm10.ttf

Setup

Set the spec to use the latest ruby, and install required gems

terminal
cd <spec>
rbenv local $(rbenv install -l | grep -v - | tail -1)
bundle install

Building

Output will be built to - build/PartiQL-Specification.html - build/PartiQL-Specification.pdf

To watch sources for changes and auto-rebuild HTML and quick PDF

terminal
bundle exec rake spec:watch

To build HTML and optimized PDF

terminal
bundle exec rake

Releasing

To perform a release, update revnumber and remove revremark in src/main.adoc in a single commit. Once updated, tag the commit. Then, update the revnumber and re-add revremark accordingly.

License

This library is licensed under the PartiQL Specification License.