Skip to content

Commit 13fb1a3

Browse files
authored
Merge pull request #648 from bjornbm/docs
README and CONTRIBUTING updates
2 parents 22883b0 + 5ef9d4d commit 13fb1a3

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,20 @@ You can do so using LuaRocks; for full instructions see our [`.luacheckrc`](.lua
2121

2222
### Running the test suite
2323

24-
We use [Busted](http://olivinelabs.com/busted/) to run our test suite.
25-
It can be installed using LuaRocks:
24+
We use [Busted](http://olivinelabs.com/busted/) to run our test suite
25+
and [Luacheck](https://github.com/lunarmodules/luacheck) for linting.
26+
They can both be installed using LuaRocks:
2627

2728
```sh
28-
$ luarocks install busted
29+
luarocks install busted
30+
luarocks install luacheck
2931
```
3032

3133
To run the test suite, run the `./run-tests` script in this project's root directory.
3234

3335
```sh
34-
$ ./run-tests # Run all tests
35-
$ ./run-tests spec/parser_spec.lua # Run just one of the test suite files
36+
./run-tests # Run all tests
37+
./run-tests spec/parser_spec.lua # Run just one of the test suite files
3638
```
3739

3840
**Tip:** We recommend having [GNU parallel](https://www.gnu.org/software/parallel/) installed.
@@ -57,7 +59,7 @@ environment variable to "-DHARDMEMTESTS" for the `run-tests` script. For
5759
example:
5860

5961
```sh
60-
$ EXTRACFLAGS="-DHARDMEMTESTS" ./run-tests
62+
EXTRACFLAGS="-DHARDMEMTESTS" ./run-tests
6163
```
6264

6365
### Running the benchmarks suite

README.md

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ git clone https://www.github.com/pallene-lang/lua-internals/
2424
cd lua-internals
2525
make guess -j4
2626
sudo make install
27+
cd -
2728
```
2829

2930
If you are on Linux and would like the up arrow to work in the Lua REPL,
@@ -42,12 +43,13 @@ To build Luarocks, unpack the sources and run `configure`, `make`, and `make ins
4243
In the configure step, use `--with-lua` to point to our special Lua.
4344

4445
```sh
45-
wget https://luarocks.org/releases/luarocks-3.9.1.tar.gz
46-
tar xf luarocks-3.9.1.tar.gz
47-
cd luarocks-3.9.1
46+
wget https://luarocks.org/releases/luarocks-3.11.1.tar.gz
47+
tar xf luarocks-3.11.1.tar.gz
48+
cd luarocks-3.11.1
4849
./configure --with-lua=/usr/local
4950
make
5051
sudo make install
52+
cd -
5153
```
5254

5355
By default, Luarocks installs packages into /usr/local, which requires sudo.
@@ -64,6 +66,10 @@ Remember that in order for the local rocks tree to work, you must to set the PAT
6466
eval "$(luarocks path)"
6567
```
6668

69+
### Install the Pallene Tracer
70+
71+
Refer to the README at https://github.com/pallene-lang/pallene-tracer
72+
6773
### Install Pallene
6874

6975
Finally, we can use Luarocks to build and install the Pallene compiler.
@@ -73,6 +79,20 @@ This will also download and install the necessary Lua libraries.
7379
luarocks make pallene-dev-1.rockspec
7480
```
7581

82+
If you used non-standard install locations in the previous steps, you may have to specify them.
83+
84+
```sh
85+
export CPATH=/usr/local/include
86+
luarocks make pallene-dev-1.rockspec PTRACER_DIR=/usr/local
87+
```
88+
89+
To avoid specifying PTRACER_DIR every time you run Luarocks, you can add it to the config.
90+
91+
```
92+
luarocks config PTRACER_DIR /usr/local
93+
luarocks make pallene-dev-1.rockspec
94+
```
95+
7696
## Using Pallene
7797

7898
To compile a `foo.pln` file to a `foo.so` module, call `pallenec` as follows.

0 commit comments

Comments
 (0)