Skip to content

Commit 621255b

Browse files
committed
fix one more fingerprint
1 parent 065fce7 commit 621255b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ghcide/src/Development/IDE/Core/RuleTypes.hs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ import HscTypes (HomeModInfo,
3636
hm_iface,
3737
hm_linkable)
3838

39+
import qualified Data.Binary as B
3940
import Data.ByteString (ByteString)
40-
import qualified Data.ByteString.Char8 as BS
41+
import qualified Data.ByteString.Lazy as LBS
4142
import Data.Int (Int64)
4243
import Data.Text (Text)
44+
import Data.Time
4345
import Development.IDE.Import.FindImports (ArtifactsLocation)
4446
import Development.IDE.Spans.Common
4547
import Development.IDE.Spans.LocalBindings
@@ -168,11 +170,11 @@ hiFileFingerPrint HiFileResult{..} = hirIfaceFp <> hirLinkableFp
168170
mkHiFileResult :: ModSummary -> HomeModInfo -> HiFileResult
169171
mkHiFileResult hirModSummary hirHomeMod = HiFileResult{..}
170172
where
171-
hirIfaceFp =
172-
fingerprintToBS . getModuleHash . hm_iface $ hirHomeMod -- will always be two bytes
173+
hirIfaceFp = fingerprintToBS . getModuleHash . hm_iface $ hirHomeMod -- will always be two bytes
173174
hirLinkableFp = case hm_linkable hirHomeMod of
174175
Nothing -> ""
175-
Just l -> BS.pack $ show $ linkableTime l
176+
Just LM{linkableTime} -> LBS.toStrict $
177+
B.encode (fromEnum $ utctDay linkableTime, fromEnum $ utctDayTime linkableTime)
176178

177179
hirModIface :: HiFileResult -> ModIface
178180
hirModIface = hm_iface . hirHomeMod

0 commit comments

Comments
 (0)