Skip to content

Commit b0fae73

Browse files
committed
Changes per PR feedback
1 parent 36deb75 commit b0fae73

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

contribute/hacker-guide.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ You need the following tools:
106106
* `sbt`, an interactive build tool commonly used in Scala projects. Acquiring sbt manually is not necessary -- the recommended approach is to download the [sbt-extras runner script](https://github.com/paulp/sbt-extras/blob/master/sbt) and use it in place of `sbt`. The script will download and run the correct version of sbt when run from the Scala repository's root directory.
107107
* `curl` -- the build uses `curl` in the `pull-binary-libs.sh` script to download bootstrap libs.
108108

109-
The majority of our team works on Linux and OS X, so these operating systems are guaranteed to work. Windows is supported, but it might have issues. Please report to [the issue tracker](https://issues.scala-lang.org/) if you encounter any.
109+
OS X and Linux builds should work. Windows is supported, but it might have issues. Please report to [the issue tracker](https://issues.scala-lang.org/) if you encounter any.
110110

111111
Building Scala is as easy as running `sbt dist/mkPack` in the root of your cloned repository. Be prepared to wait for a while -- a full "clean" build
112-
takes 8+ minutes depending on your machine (and up to 30 minutes on older machines with less memory). Incremental builds are usually within 30-120 seconds range (again, your mileage might vary
112+
takes 5+ minutes depending on your machine (longer on older machines with less memory). Incremental builds are usually within 20-120 seconds range (again, your mileage might vary
113113
with your hardware).
114114

115115
### IDE
@@ -155,12 +155,8 @@ Now, implement your bugfix or new feature!
155155

156156
Here are also some tips & tricks that have proven useful in Scala development:
157157

158-
* If after introducing changes or updating your clone, you get `AbstractMethodError` or other linkage exceptions,
159-
try doing `sbt clean`. Due to the way Scala compiles traits, if a trait changes, then it's sometimes not enough to recompile
160-
just that trait; it might also be necessary to recompile its users. The `sbt` tool is not smart enough to do that, which might lead to
161-
very strange errors. Full rebuilds fix the problem. Fortunately that's rarely necessary, because full rebuilds take a lot of time -- the same 8-30 minutes as mentioned above.
162-
* Even on solid state drives packaging Scala distribution (i.e. creating jars from class files) is a non-trivial task. To save time here,
163-
some people in our team do `sbt compile` instead of `sbt dist/mkPack` and then create custom scripts using `sbt/mkBin` to launch Scala from `./build/quick/bin`. Also see [the Scala README](https://github.com/scala/scala#incremental-compilation) for tips on speeding up compile times.
158+
* Even on solid state drives packaging Scala distribution (i.e. creating jars from class files) is a non-trivial task. To save time here, some people in our team do `sbt compile` instead of `sbt dist/mkPack` and then create custom scripts using `sbt/mkBin` to launch Scala from `./build/quick/bin/`. Also see [the Scala README](https://github.com/scala/scala#incremental-compilation) for tips on speeding up compile times.
159+
* If after introducing changes or updating your clone, you get `AbstractMethodError` or other linkage exceptions, try doing `sbt clean` and building again.
164160
* Don't underestimate the power of `print`. When starting with Scala, I spent a lot of time in the debugger trying to figure out how
165161
things work. However later I found out that print-based debugging is often more effective than jumping around. While it might be obvious
166162
to some, I'd like to explicitly mention that it's also useful to print stack traces to understand the flow of execution. When working with `Trees`, you might want to use the Scala `showRaw` to get the `AST` representation.
@@ -300,9 +296,9 @@ This means your change is backward or forward binary incompatible with the speci
300296

301297
### Verify
302298

303-
Now to make sure that my fix doesn't break anything I need to run the test suite using the `partest` tool we wrote to test Scala.
304-
Read up [the partest guide](partest-guide.html) to learn the details about partest, but in a nutshell you can either
305-
run `sbt test` to go through the entire test suite (30+ minutes) or use wildcards to limit the tests to something manageable:
299+
Now to make sure that my fix doesn't break anything I need to run the test suite. The Scala test suite uses [JUnit](http://junit.org/junit4/) and [partest](partest-guide.html), a tool we wrote for testing Scala.
300+
Run `sbt test` and `sbt partest` to run all of the JUnit and partest tests, respectively.
301+
`partest` (not `sbt partest`) also allows you to run a subset of the tests using wildcards:
306302

307303
18:52 ~/Projects/scala/sandbox (ticket/6725)$ cd ../test
308304
18:56 ~/Projects/scala/test (ticket/6725)$ partest files/run/*interpol*

0 commit comments

Comments
 (0)