authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2019-04-21 21:53:35-07:00
committergravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2019-04-21 21:53:35-07:00
logaf7daae26b874a40319041cce784645b03aa8fb3
treeeda6eb661a9705bd20eaca234ae6b22506bebe6e
parente64c0dee35a6da1f9e538cc822f52e800a4cef99

readme: Simplify instructions for making changes to the standard library


1 files changed, 10 insertions(+), 27 deletions(-)

README.md+10-27
......@@ -229,37 +229,20 @@ use stage 1.
229229### Standard Library
230230
231231First, build the Stage 1 compiler as described in [the Building section](#building).
232Then, 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
234from the build directory:
232235
233Then, 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
236well as the relevant tests using `bin/zig test <file>`.
2361. Run `make install` (on POSIX) or `msbuild -p:Configuration=Release INSTALL.vcxproj`
237 (on Windows).
2382. Test your changes with `bin/zig test <changed file>` (e.g. `bin/zig test std/heap.zig`).
237239
238Once your changes are finished, run all the zig tests (while skipping the longer
239test process for all possible platforms) by running the following (also from the
240build directory you used to build the compiler):
240Once your changes are finished, run all the zig tests from the build directory:
241241
242242```
243243bin/zig build --build-file ../build.zig test -Dskip-release
244244```
245245
246For example, when making changes to `std/heap.zig` on POSIX:
247
248```sh
249# build and install compiler in 'build' directory
250mkdir build
251cd build
252...
253# make changes to std/heap.zig
254nano ../std/heap.zig
255# install and test changes
256make install
257bin/zig test std/heap.zig
258# more changes to std/heap.zig
259nano ../std/heap.zig
260# install and test changes
261make install
262bin/zig test std/heap.zig
263# run all the tests
264bin/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
247all possible build configurations. This shorter test process is good enough when
248submitting pull requests*