Open
Description
Instead of scattering the cache system between hls-graph and ghcide. There might be a better idea, we can migrate the cache system to hls-graph. Since the scattering leads to some hard debugging bugs like #4185 #4093, although they've been solved.
But it is hard, It would require us to make a very good abstract of the current handling logic. And reimplement the following in hls-graph:
- garbage collector is in ghcide. There are special treatment for special keys.
- We have two fields in shakeExtra that's in the cache system.
dirtykeys
andstate
. And monitering is happening in ghcide. data Value v
that wrapFileVersion
andPositionDelta
.- specially treatment of special keys in
estimateFileVersionUnsafely
lastValueIO
and it is entangling withPositionMapping
But we can take steps to do it too.
- The dirtiness keeping for instance is relatively easier target. see more at Stabilize the build system by correctly house keeping the dirtykeys and rule values [flaky test #4185 #4093] #4190 (comment)