mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-15 04:43:41 +03:00
Cleanup moduleImportPaths now that file paths are normalized (#1980)
This commit is contained in:
parent
27f547fd94
commit
2ba7d08ed6
@ -184,11 +184,7 @@ moduleImportPaths :: GHC.ParsedModule -> Maybe FilePath
|
||||
moduleImportPaths pm
|
||||
| rootModDir == "." = Just rootPathDir
|
||||
| otherwise =
|
||||
-- TODO (MK) stripSuffix (normalise rootModDir) (normalise rootPathDir)
|
||||
-- would be a better choice but at the moment we do not consistently
|
||||
-- normalize file paths in the Shake graph so we can end up with the
|
||||
-- same module being represented twice in the Shake graph.
|
||||
Just $ dropTrailingPathSeparator $ dropEnd (length rootModDir) rootPathDir
|
||||
dropTrailingPathSeparator <$> stripSuffix (normalise rootModDir) (normalise rootPathDir)
|
||||
where
|
||||
ms = GHC.pm_mod_summary pm
|
||||
file = GHC.ms_hspp_file ms
|
||||
|
Loading…
Reference in New Issue
Block a user