igl
igl is one program knowing six commands. It works the way
phreeqc does: you give it a file, and it follows the specified command with it.
usage: igl <command> [options] <file>... --version print the version and exit --help print this text, or a command's own commands: check <file>... report problems parse <file> show how the file was read build <file> prepare it for an engine run <model> run a prepared model fmt <file>... tidy the layout, or check it explain <code> say what a message means
igl <command> --help lists just that command's options.
check
It reads your model and reports anything wrong, with the line and the column.
It writes nothing. Use --profile core,
identification or extended to say which part of the
language you expect to be available. Core is always included.
build
It prepares the model for an engine and writes a .iglir.json
beside it, or wherever you point -o. That file records where your
model came from, its fingerprint, and the same for every database it used.
run
It runs a prepared model and writes the results. This is the step somebody else's engine can replace, so the test suite treats it as a separate program and drives it from outside rather than calling into it.
fmt
It rewrites your file with consistent spacing and indentation.
--check tells you how the file would change, without changing it,
which is the one you want in an automated check. Your comments stay exactly
where you put them.
explain
It prints what a message code means. The text comes from the same source as the messages page, so the two cannot end up saying different things.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Nothing wrong. |
| 1 | Your model has errors, or fmt --check found a difference. |
| 2 | The command was wrong, or a file could not be read. |
| 3 | The program itself has a bug and what it produced cannot be trusted. |
Three is kept apart from two on purpose. A mistyped command is something you
can easily correct yourself, and there is no point telling us about it. A bug in
igl is ours, and that one we do want to hear about. in this case,
please send us an email at colin.ferrari@igl-lang.org
with the IGL and language version as well as your .igl file and a short exmplanation for us to reproduce the bug.
Settings taken from the environment
| Variable | What it does |
|---|---|
| IGL_DATABASES | Where to look for a database named without a path. |
| IGL_PHREEQC | Where PHREEQC is, if it is not on your PATH. |
| IGL_PHREEQC_DATABASE | Which thermodynamic database PHREEQC should use by default. |
| IGL_ENGINE | Which engine the test suite should measure. If you leave it unset, the suite tells you it measured nothing instead of just passing. |