You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix filepath identity in cradle dependencies (#2106)
When doing reactive change tracking we track the set of dirty keys as opposed to conservative change tracking where we check every key on every build.
Filepath identity becomes even more important in this setting, opening a new type of bug where the filepath used in the dirty key is equivalent but not structurally equal to the filepath used in the dependency graph.
This can happen e.g. with cradle dependencies where hie-bios gives us a set of relative paths and we create GetFileModification keys for them as dependencies of the GhcSession, but the LSP client raises FileWatched notifications using absolute paths that we use to create dirty keys.
To prevent this class of bugs, we would need to strengthen the notion of NormalizedFilePath to make it always absolute/relative. In practice, since 99% of the paths are introduced by the LSP client, we just need to make sure that the other 1% (introduced by e.g. hie-bios) follow the same convention.
This commit fixes the hie-bios paths to make them absolute before creating rule keys, following the LSP convention
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
0 commit comments