Skip to content

Latest commit

 

History

History
84 lines (58 loc) · 2.18 KB

CONTRIBUTING.md

File metadata and controls

84 lines (58 loc) · 2.18 KB

Contirubtion guide

Build

In the same way to other Haskell softwares, Nirum compiler can be built using Haskell Stack. If you didn't install it yet see also its installation guide.

If it's your first build of Nirum compiler you need to setup a proper version of GHC:

stack setup

The following command builds an executable binary of Nirum compiler:

stack build

A built executable binary aren't installed to PATH until stack install command is run. Without installation a built executable binary can be invoked using stack exec command:

stack exec -- nirum -t python -o out/ examples/

Note that -- indicates options after it belong to the nirum executable, not stack exec command.

Testing scopes

Since it is a compiler which generate source codes, there are two scopes we should test:

  1. the compiler itself, and
  2. codes that the compiler generates.

The former is unit testing and the latter one is integration testing. We have two commands/scripts to run corresponding testing:

  1. stack test :spec
  2. stack test :targets

If you've changed things related to a target backend you should test everything:

stack test

If you've changed pure internals of the compiler probably it's okay to run only the former command. Anyway both testings are run by CI so that changes breaking either testing cannot be merged.

Build Status (Travis CI) Build Status (AppVeyor)

External dependencies

Each target test suite has its external dependencies (i.e. non-library program dependencies):

  • Python
    • All Python versions that Nirum should support: Python 2.7, and 3.4 and above all
    • tox