2016-10-06 20:11:38 +03:00
These are commands that will likely be useful during development.
2018-04-17 23:01:37 +03:00
## Scala
Launch `sbt` in `runtime-jvm` directory, then here are various useful commands:
* `main/test:run` - runs all the tests
* `main/test:run compilation` - runs tests prefixed by `"compilation"`
* `main/test:run 102932 compilation.let3` - runs tests prefixed by `"compilation.let3"` with the random seed 102932
* `benchmark/run` - presents menu of benchmarks to run
* `;clean;coverage;main/test:run;coverageReport` followed optionally by `;coverageOff` - generates test coverage report
## Haskell
2016-10-06 20:11:38 +03:00
For doing compilation you can do:
2018-05-17 01:20:27 +03:00
stack repl unison-parser-typechecker
2016-10-06 20:11:38 +03:00
2018-05-17 01:20:27 +03:00
From here, do `Main.main` to run the tests and `:r` for rapid recompile.
2016-10-06 20:11:38 +03:00
2017-04-04 19:31:44 +03:00
You can also do:
2018-05-17 01:20:27 +03:00
stack build unison-parser-typechecker
2017-04-04 19:31:44 +03:00
If you want to run the tests outside the REPL.
2016-10-06 20:11:38 +03:00
What if you want a profiled build? Do:
2018-05-17 01:20:27 +03:00
stack build --executable-profiling --library-profiling --ghc-options="-fprof-auto -rtsopts" unison-parser-typechecker
2016-10-06 20:11:38 +03:00
2018-05-17 01:20:27 +03:00
Again you can leave off the flag. To run an executable with profiling enabled, do:
2016-10-06 20:11:38 +03:00
2018-05-17 01:20:27 +03:00
stack exec -- < executable-name > +RTS -p
2016-10-06 20:11:38 +03:00
2018-05-17 01:20:27 +03:00
That will generate a `<executable-name>.prof` plain text file with profiling data. [More info on profiling ](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html ).