Skip to content

Commit e1f9530

Browse files
authored
Merge branch 'master' into simplify-choose-solver
2 parents 3eac77f + b639bfa commit e1f9530

File tree

5 files changed

+21
-19
lines changed

5 files changed

+21
-19
lines changed

Cabal/src/Distribution/Simple/GHC/Internal.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ componentGhcOptions verbosity implInfo lbi bi clbi odir =
578578
, ghcOptFfiIncludes = toNubListR $ includes bi
579579
, ghcOptObjDir = toFlag odir
580580
, ghcOptHiDir = toFlag odir
581-
, ghcOptHieDir = bool NoFlag (toFlag $ odir </> extraCompilationArtifacts) $ flagHie implInfo
581+
, ghcOptHieDir = bool NoFlag (toFlag $ odir </> extraCompilationArtifacts </> "hie") $ flagHie implInfo
582582
, ghcOptStubDir = toFlag odir
583583
, ghcOptOutputDir = toFlag odir
584584
, ghcOptOptimisation = toGhcOptimisation (withOptimization lbi)

cabal-install/src/Distribution/Client/Config.hs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -731,17 +731,19 @@ initialSavedConfig = do
731731
warnOnTwoConfigs :: Verbosity -> IO ()
732732
warnOnTwoConfigs verbosity = do
733733
defaultDir <- getAppUserDataDirectory "cabal"
734-
dotCabalExists <- doesDirectoryExist defaultDir
735-
xdgCfg <- getXdgDirectory XdgConfig ("cabal" </> "config")
736-
xdgCfgExists <- doesFileExist xdgCfg
737-
when (dotCabalExists && xdgCfgExists) $
738-
warn verbosity $
739-
"Both "
740-
<> defaultDir
741-
<> " and "
742-
<> xdgCfg
743-
<> " exist - ignoring the former.\n"
744-
<> "It is advisable to remove one of them. In that case, we will use the remaining one by default (unless '$CABAL_DIR' is explicitly set)."
734+
xdgCfgDir <- getXdgDirectory XdgConfig "cabal"
735+
when (defaultDir /= xdgCfgDir) $ do
736+
dotCabalExists <- doesDirectoryExist defaultDir
737+
let xdgCfg = xdgCfgDir </> "config"
738+
xdgCfgExists <- doesFileExist xdgCfg
739+
when (dotCabalExists && xdgCfgExists) $
740+
warn verbosity $
741+
"Both "
742+
<> defaultDir
743+
<> " and "
744+
<> xdgCfg
745+
<> " exist - ignoring the former.\n"
746+
<> "It is advisable to remove one of them. In that case, we will use the remaining one by default (unless '$CABAL_DIR' is explicitly set)."
745747

746748
-- | If @CABAL\_DIR@ is set, return @Just@ its value. Otherwise, if
747749
-- @~/.cabal@ exists and @$XDG_CONFIG_HOME/cabal/config@ does not

cabal-testsuite/PackageTests/CopyHie/cabal.test.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ main = withShorterPathForNewBuildStore $ \storeDir -> cabalTest $ withRepo "repo
55
cabalG ["--store-dir=" ++ storeDir] "v2-build" ["hie"]
66
liftIO $ do
77
installedDependencyLibDir <- findDependencyInStore storeDir "hie-dependency"
8-
shouldExist $ installedDependencyLibDir </> "lib" </> "extra-compilation-artifacts" </> "HieDependency.hie"
8+
shouldExist $ installedDependencyLibDir </> "lib" </> "extra-compilation-artifacts" </> "hie" </> "HieDependency.hie"

cabal-testsuite/PackageTests/CopyHie/setup.test.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ main = setupAndCabalTest $ withPackageDb $ do
44
skipUnlessGhcVersion ">= 8.8"
55
setup_install ["hie-local"]
66
env <- getTestEnv
7-
shouldExist $ testLibInstallDir env </> "hie-local-0.1.0.0" </> "extra-compilation-artifacts" </> "HieLocal.hie"
7+
shouldExist $ testLibInstallDir env </> "hie-local-0.1.0.0" </> "extra-compilation-artifacts" </> "hie" </> "HieLocal.hie"

0 commit comments

Comments
 (0)