Skip to content

Commit 62e878c

Browse files
committed
Updated Ghc.hs for the hashing logic as the hashing logic was moved to Ghc.hs after rebase ,also updated the getDirsDefault to handel the Maybe B.ByteString in Session.hs
1 parent c0a1062 commit 62e878c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • ghcide/session-loader/Development/IDE/Session

ghcide/session-loader/Development/IDE/Session/Ghc.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ data RawComponentInfo = RawComponentInfo
101101
-- | Maps cradle dependencies, such as `stack.yaml`, or `.cabal` file
102102
-- to last modification time. See Note [Multi Cradle Dependency Info].
103103
, rawComponentDependencyInfo :: DependencyInfo
104-
-- | the
104+
-- | The raw ByteString for the hash generated in setoptions for the uid "main"
105105
, rawComponentHash :: Maybe B.ByteString
106106
}
107107

@@ -307,7 +307,7 @@ addComponentInfo recorder getCacheDirs dep_info newDynFlags (hieYaml, cfp, opts)
307307
-- We will modify the unitId and DynFlags used for
308308
-- compilation but these are the true source of
309309
-- information.
310-
new_deps = fmap (\(HomeUnitConfig df targets mHash) -> RawComponentInfo (homeUnitId_ df) df targets cfp opts dep_info mHash) newDynFlags
310+
new_deps = fmap (\(HomeUnitConfig df targets mHash) -> RawComponentInfo (homeUnitId_ df) df targets cfp opts dep_info mHash) newDynFlags
311311
all_deps = new_deps `NE.appendList` fromMaybe [] oldDeps
312312
-- Get all the unit-ids for things in this component
313313

@@ -440,7 +440,7 @@ getCacheDirsDefault prefix mFirstHash opts = do
440440
-- GHC options will create incompatible interface files.
441441
prefix' = if isJust mFirstHash then "main" else prefix
442442
basectx = case mFirstHash of
443-
Just h -> H.updates H.init [h]
443+
Just h -> H.updates H.init [h]
444444
Nothing -> H.init
445445
opts_hash = B.unpack $ B16.encode $ H.finalize $ H.updates basectx (map B.pack opts)
446446

0 commit comments

Comments
 (0)