The Return of the Scala Rule Tutorial: The Execution

This builds on the first part of the tutorial. In this post, we will make the the rule actually produce an executable. Capturing the output from scalac At the end of the tutorial last time, we were calling scalac, but ignoring the result: (cd /private/var/tmp/_bazel_kchodorow/92df5f72e3c78c053575a1a42537d8c3/blerg && exec env – /bin/bash -c ‘external/scala/bin/scalac HelloWorld.scala; echo ”’blah”’Continue reading “The Return of the Scala Rule Tutorial: The Execution”

Tutorial: how to write Scala rules for Bazel

Bazel comes with built-in support for several languages and allows you to write your own support for any other languages in Python. Although you could probably get more abstract, let’s define a rule as something that takes some files, does something to them, and then gives you some output files. Specifically, for this example, weContinue reading “Tutorial: how to write Scala rules for Bazel”

API changes with extra cheese, hold the fear

When you make a change, how do you know what tests to run? If you’re lucky, no one else depends on your code so you can just run your own tests and you’re done. However, if you’re writing useful code, other people are probably going to start depending on it. Once that happens, it becomesContinue reading “API changes with extra cheese, hold the fear”