Skip to content

doc: use prebuilt container for ruplacer in batch changes

Warren Gifford requested to merge k/batch-ruplacer into main

Created by: keegancsmith

This commit updates the example to use a prebuilt image. Additionally it includes a simplified spec for the common case.

I recently went through this tutorial, and was frustrated with it for two reasons:

  • running cargo was very slow
  • As a standard example, this should be very simple to do.

So I pushed an image which runs ruplacer so you don't have to run cargo. I also included an example where we don't try include/exclude specific files.

Question: Do we want somewhere an example of building a container locally to speed up the batch changes workflow? I'm not sure if this was documented elsewhere, even though here it is a side-effect of reading the old tutorial.

Future:

  • We probably want to publish a ruplacer image under the sourcegraph dockerhub org.
  • It feels like there is scope for a replacer tool which is much easier to use w.r.t file patterns. I suspect something using the sourcegraph query language would be it.

Test Plan: I created a batch change based on the simplified example. Note: I did not test updated spec with find, but keegancsmith/ruplacer container is based on alpine so I suspect it should work.

Merge request reports

Loading