Skip to content

Development Workflows

Siddhartha Kasivajhula edited this page Nov 29, 2023 · 5 revisions

Run make help or simply make to see all of the options here. The main ones are summarized below.

Dev Loop

This "loop" could be employed in most cases while making any changes to the code or to the tests.

Rebuilding

  make build

Cleaning

Sometimes, you might end up with stale compilation output (e.g. .zo files). If these are present, Racket will use them in preference to the corresponding source modules (which may happen to be more up to date). A common symptom of this is getting strange errors that don't make any sense, or errors lingering that you thought you had fixed. To address this, you can "clean" all compile output prior to building again, by using:

  make clean

A faster option could be to do:

  racket -y module-you-are-trying-to-run.rkt

This tells Racket, "[y]es, please recompile all dependent modules" before running this file.

Running Tests

Run all tests

  make test

Run tests for a specific module

  make test-flow

This is just an example, but it is the one you'll most commonly want to use, as it runs the fastest and tests the core language (which is contained in the flow.rkt module). You may want to run make test only at later stages in development. For other modules you can test, run make help or simply make to see all the options.

Docs Loop

This loop may be employed while making changes to the documentation. The docs are in Scribble files in qi-doc/. After making any additions or changes:

Rebuilding

  make build-docs

Viewing Docs

  make docs

Performance Loop

You'd typically only use these when you're optimizing performance in general or modifying the implementation of a particular form.

Running Profilers

You will need to install the SDK first before running the profilers. The SDK is just a collection of Racket dependencies (e.g. for command line scripting, coverage reporting, etc.) that are needed in order for the profiling scripts to work. You could install these dependencies manually yourself, but the SDK collects these dependencies into a Racket package (qi-sdk) so that you can use Raco to do it for you, instead.

Run all profilers

  make profile

Run just the competitive benchmarks against Racket

  make profile-competitive

Run just the profilers for forms of the language

  make profile-forms

Run just the profilers for selected forms

  make profile-selected-forms
Clone this wiki locally