File tree Expand file tree Collapse file tree 5 files changed +21
-19
lines changed
Cabal/src/Distribution/Simple/GHC
cabal-install/src/Distribution/Client
cabal-testsuite/PackageTests Expand file tree Collapse file tree 5 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -578,7 +578,7 @@ componentGhcOptions verbosity implInfo lbi bi clbi odir =
578
578
, ghcOptFfiIncludes = toNubListR $ includes bi
579
579
, ghcOptObjDir = toFlag odir
580
580
, ghcOptHiDir = toFlag odir
581
- , ghcOptHieDir = bool NoFlag (toFlag $ odir </> extraCompilationArtifacts) $ flagHie implInfo
581
+ , ghcOptHieDir = bool NoFlag (toFlag $ odir </> extraCompilationArtifacts </> " hie " ) $ flagHie implInfo
582
582
, ghcOptStubDir = toFlag odir
583
583
, ghcOptOutputDir = toFlag odir
584
584
, ghcOptOptimisation = toGhcOptimisation (withOptimization lbi)
Original file line number Diff line number Diff line change @@ -731,17 +731,19 @@ initialSavedConfig = do
731
731
warnOnTwoConfigs :: Verbosity -> IO ()
732
732
warnOnTwoConfigs verbosity = do
733
733
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)."
745
747
746
748
-- | If @CABAL\_DIR@ is set, return @Just@ its value. Otherwise, if
747
749
-- @~/.cabal@ exists and @$XDG_CONFIG_HOME/cabal/config@ does not
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ main = withShorterPathForNewBuildStore $ \storeDir -> cabalTest $ withRepo "repo
5
5
cabalG [" --store-dir=" ++ storeDir] " v2-build" [" hie" ]
6
6
liftIO $ do
7
7
installedDependencyLibDir <- findDependencyInStore storeDir " hie-dependency"
8
- shouldExist $ installedDependencyLibDir </> " lib" </> " extra-compilation-artifacts" </> " HieDependency.hie"
8
+ shouldExist $ installedDependencyLibDir </> " lib" </> " extra-compilation-artifacts" </> " hie " </> " HieDependency.hie"
Original file line number Diff line number Diff line change @@ -4,4 +4,4 @@ main = setupAndCabalTest $ withPackageDb $ do
4
4
skipUnlessGhcVersion " >= 8.8"
5
5
setup_install [" hie-local" ]
6
6
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"
You can’t perform that action at this time.
0 commit comments