Skip to content

LSIF: only store one LSIF dump for all commits

Administrator requested to merge lsif-one-dump-per-repo into master

Created by: chrismwendt

Prior to this change, an LSIF dump was associated with specific repo@commit. That means you would only get code intel powered by LSIF when you were on an exact commit that had LSIF data, but it was always correct.

After this change, an LSIF dump is only associated with a repo. That means you'll get LSIF code intel on any commit on the repo, but it will be incorrect when there's a diff between your current commit and the commit at which the LSIF data was generated. The failure mode is pretty confusing:

2019-09-13 23 25 07

There's no indicator that I've "fallen off a cliff", so to speak, where the rest of the document's lines are out of sync with the LSIF dump.

There are several ways to mitigate that problem down the road:

  • Keep track of which commit the LSIF dump was generated on and indicate to the user when the current file has been modified since the LSIF dump
  • Set a threshold number of commits after which the LSIF data is considered "stale" and don't show it at all
  • Support multiple LSIF dumps per repo and pick the nearest (see the nearest commit RFC)

Test plan: already covered

Merge request reports

Loading