fastResultLoading sometimes showing unrelated results, missing real ones
Created by: rvantonder
So I thought I was seeing weird highlighting issues before when using search, like, odd things being highlighted that shouldn't be, but this only happened once or twice and when I refreshed the issue disappeared. Turns out I am not crazy and can reproduce this reliably. This issue disappears when I put "enableFastResultLoading": false
in my user settings so it is probably a regression in the changes there. Basically, stale/previously highlighted things show up, try this:
- Run this on Sourcegraph.com:
repo:^github\.com/ethereum/solidity$
- Search for
HAVE_z
in this repository. You will see expected results, there's are hits forHAVE_Z3
- Now change the pattern to
HAVE_c
and search. This will very likely show you a highlighted result forHAVE_Z
which is not what we searched for, and no result forHAVE_C
in that file (but there is aHAVE_C
match in that filelibsmtutil/SMTPortfolio.cpp
). - Refresh, and you will see the expected, but previously missing
HAVE_C
highlighted and theHAVE_Z
disappear.
In that particular file, there is a HAVE_Z and a HAVE_C close to each other, within a couple of lines of each other, so I suspect some calculation is messing up, but not sure why it fixes on refresh.
Trying to reproduce this issue, I also had very wacky stuff happening like entire file contents for results (again, some calculation issue going on) but I can't reproduce it reliably. Basically, I guarantee if you go to the above repo and alternate searching for HAVE_z
and HAVE_c
a couple of times you will see weird things. It disappears if I disable the fast loading flag.
Example: (Edit: the video does HAVE_c
first then HAVE_z
, I don't think this matters, just try alternate searches for these)
https://user-images.githubusercontent.com/888624/104407171-3e727380-551e-11eb-926a-32bfd3f4f56d.mp4