Skip to content

Commit 650b326

Browse files
authored
Merge pull request #6833 from commercialhaskell/fix6832
Fix #6832 Eliminate duplicate hashing on Windows
2 parents 711d559 + 1ad5765 commit 650b326

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ Major changes:
1010

1111
Behavior changes:
1212

13+
* On Windows, the path segment _platform_\\_hash_\\_ghc version_, under
14+
`.stack-work\install` and `.stack-work\hoogle`, is hashed only once, rather
15+
than twice.
16+
1317
Other enhancements:
1418

1519
Bug fixes:

src/Stack/Types/EnvConfig.hs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,18 @@ snapshotsDir = do
154154
pure $ root </> relDirSnapshots </> platform
155155
{-# DEPRECATED snapshotsDir "Not used by Stack >= 1.0.4. May be removed from a future version of stack." #-}
156156

157-
-- | Installation root for dependencies
157+
-- | Installation root for dependencies.
158158
installationRootDeps :: HasEnvConfig env => RIO env (Path Abs Dir)
159159
installationRootDeps = do
160160
root <- view stackRootL
161-
-- TODO: also useShaPathOnWindows here, once #1173 is resolved.
162161
psc <- platformSnapAndCompilerRel
163162
pure $ root </> relDirSnapshots </> psc
164163

165-
-- | Installation root for locals
164+
-- | Installation root for locals.
166165
installationRootLocal :: HasEnvConfig env => RIO env (Path Abs Dir)
167166
installationRootLocal = do
168167
workDir <- getWorkDir
169-
psc <- useShaPathOnWindows =<< platformSnapAndCompilerRel
168+
psc <- platformSnapAndCompilerRel
170169
pure $ workDir </> relDirInstall </> psc
171170

172171
-- | Get the hoogle database path.
@@ -215,7 +214,7 @@ bindirCompilerTools = do
215214
hoogleRoot :: HasEnvConfig env => RIO env (Path Abs Dir)
216215
hoogleRoot = do
217216
workDir <- getWorkDir
218-
psc <- useShaPathOnWindows =<< platformSnapAndCompilerRel
217+
psc <- platformSnapAndCompilerRel
219218
pure $ workDir </> relDirHoogle </> psc
220219

221220
compilerVersionDir ::

0 commit comments

Comments
 (0)