Skip to content

Search backend: remove `PartialJob.Partial()` and extend utility functions

Warren Gifford requested to merge cc/remove-partial into main

Created by: camdencheek

This removes PartialJob.Partial() by replacing its uses with visitors. It also adds some utility functions like MapType, Visit, VisitType, and HasDescendents, which are used to simplify the code that was previously using Partial().

Stacked on https://github.com/sourcegraph/sourcegraph/pull/38364

Test plan

Tested implicitly by current uses of map. It's exercised quite well by NewPlanJob tests. Testing explicitly is a little annoying because it turns out I can't import mockjob from job. I'll have to figure that one out.

Merge request reports

Loading