Skip to content

compute: match-only command uses chunk matches

Administrator requested to merge main-dry-run/rvt-compute-chunks-2 into main

Created by: rvantonder

This makes compute with match-only command efficiently support multiline matches on capture groups. With this update, I'm taking a shortcut to replace range information on matches/capture groups to be offsets only, where it previously was line/column only. This because I think no consumer relies on this info yet, and computing it is annoying (main reason I'm punting) but also requires additional overhead.

@coury-clark Code Insights is the primary consumer of this command. Can you confirm insights do not currently use line/column information here? Also I'm running against main-dry-run in the hopes that this triggers some code insights sets that rely on capture group content to ensure correctness. Overall this should be a pretty big win for Code Insights because newlines in patterns/capture groups should work now (please feel free to validate or lmk if you run into issues).

For reference: https://github.com/sourcegraph/sourcegraph/issues/31028

Test plan

Adds and updates tests.

Merge request reports

Loading