Skip to content

Commit

Permalink
Adds doc with suggestions for stdlib dev.
Browse files Browse the repository at this point in the history
  • Loading branch information
chiefnoah committed Oct 28, 2023
1 parent 2d75e50 commit 2c9ef82
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions doc/guide/hacking-on-the-stdlib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Hacking on the Standard Library

Gerbil is a growing project and your contributions are welcome!

When working on modifications to the standard library, it's common to encountere errors
such as:

```
*** ERROR IN gx#core-expand-import%__% --
*** ERROR IN "file.ss"@1.9
--- Syntax Error: Cannot find library module
... form: :std/my/module
```
This typically because the `gxi` or `gxc` being used is looking at the installed
standard library which will not contain your changes. To address this, run your
environment with the `build.sh` script after building.

Example build:

```shell
./build.sh
```

To test your local changes rebuild the stdlib and then use the locally built `gxi` with
the following commands:

```shell
./build.sh stdlib
./build.sh env gxi ../your-test-file.ss
```
**NOTE:** the execution environment when using `./build.sh env` is in the `src/` folder
in the root of the Gerbil repo. Absolute paths work as normal, but relative paths must
be adjusted for `PWD` change.

0 comments on commit 2c9ef82

Please sign in to comment.