Skip to the content.

The Development Cycle

Basic Dev Cycle Of APL Features

The core development cycle is:

The pometo_docs_to_ct_tests plugin works in the same way as pometo_docs_to_tests and takes the same BUILDWIP environment variable - it generates tests in tests/generated_common_tests and when the tests are run the results are stored under _build/test/log/index.html.

GOTCHA: some of the tests (see the parser notes page for instance) have significant trailing white space - if you get mysterious my test is failing but the output looks the same this is probably it.

Please read Our Testing.

Typically the results look like:

┌───┐ ┌───┐ ┌───┐        
│1 2│ │3 4│ │1 2│   4   5
└───┘ └───┘ └───┘        

The 4 and 5 have ‘hidden’ padding left, right top and bottom.

If you editor clears trailing white space this test will fail.

Code failures in tests are fairly hard to debug because the interpreter and compiler both capture and sanitize runtime errors.

The easiest way to proceed is to copy the input string of the test into the runner module and then invoke it with the run.sh bash command in %ROOT

This runs the same code as a plain Erlang function and you get the full, raw crash report.

There is a pain here - to see debugging output when running test suites you need to use the ?debugFmt macro (it has the same arguments as io:format/2 (there is no equivalent to io:format/1). It is defined in the eunit include file and added to source code with -include_lib("eunit/include/eunit.hrl").

These two output methods don’t work with each other io:formats don’t show when running tests and ?debugFmts don’t show when running code :-(

This can tend to lead to dirty code with extra io:formats and ?debugFmts littering the code. Please check your diffs before submitting a PR.

To make this easier there is a debug function in pometo_stdlib which takes complex nested $ast¯ and other records and prints them nicely. It also has a single macro which can be used to switch printing from io:format to ?debugFmt.

Basic Dev Cycle For Non-Conformant With Dyalog Features

It is the same basic dev cycle with one pre-step.

Please add a section at the end of the design docs page in the docs directory explaining: