| ... | ... | @@ -229,37 +229,20 @@ use stage 1. |
| 229 | 229 | ### Standard Library |
| 230 | 230 | |
| 231 | 231 | First, build the Stage 1 compiler as described in [the Building section](#building). |
| 232 | Then, make your changes to the standard library files in `std` (note: not |
| 233 | `build/lib/zig/std`). To test changes to the standard library, do the following |
| 234 | from the build directory: |
| 232 | 235 | |
| 233 | | Then, make your changes to the standard library files in `std`. After every change, |
| 234 | | (from the build directory you used to build the compiler) run either `make install` |
| 235 | | (on POSIX) or `msbuild -p:Configuration=Release INSTALL.vcxproj` (on Windows) as |
| 236 | | well as the relevant tests using `bin/zig test <file>`. |
| 236 | 1. Run `make install` (on POSIX) or `msbuild -p:Configuration=Release INSTALL.vcxproj` |
| 237 | (on Windows). |
| 238 | 2. Test your changes with `bin/zig test <changed file>` (e.g. `bin/zig test std/heap.zig`). |
| 237 | 239 | |
| 238 | | Once your changes are finished, run all the zig tests (while skipping the longer |
| 239 | | test process for all possible platforms) by running the following (also from the |
| 240 | | build directory you used to build the compiler): |
| 240 | Once your changes are finished, run all the zig tests from the build directory: |
| 241 | 241 | |
| 242 | 242 | ``` |
| 243 | 243 | bin/zig build --build-file ../build.zig test -Dskip-release |
| 244 | 244 | ``` |
| 245 | 245 | |
| 246 | | For example, when making changes to `std/heap.zig` on POSIX: |
| 247 | | |
| 248 | | ```sh |
| 249 | | # build and install compiler in 'build' directory |
| 250 | | mkdir build |
| 251 | | cd build |
| 252 | | ... |
| 253 | | # make changes to std/heap.zig |
| 254 | | nano ../std/heap.zig |
| 255 | | # install and test changes |
| 256 | | make install |
| 257 | | bin/zig test std/heap.zig |
| 258 | | # more changes to std/heap.zig |
| 259 | | nano ../std/heap.zig |
| 260 | | # install and test changes |
| 261 | | make install |
| 262 | | bin/zig test std/heap.zig |
| 263 | | # run all the tests |
| 264 | | bin/zig build --build-file ../build.zig test -Dskip-release |
| 265 | | ``` |
| 246 | *Note: The `-Dskip-release` flag will skip running the longer test process that tests |
| 247 | all possible build configurations. This shorter test process is good enough when |
| 248 | submitting pull requests* |