[Git][ghc/ghc][master] Revert "hadrian: handle findExecutable "" gracefully"
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 485c12b2 by Cheng Shao at 2026-01-21T16:06:54-05:00 Revert "hadrian: handle findExecutable "" gracefully" This reverts commit 1e5752f64a522c4025365856d92f78073a7b3bba. The underlying issue has been fixed in https://github.com/haskell/directory/commit/75828696e7145adc09179111a0d631b9... and present since 1.3.9.0, and hadrian directory lower bound is 1.3.9.0, so we can revert our own in house hack now. - - - - - 4 changed files: - hadrian/src/Hadrian/Utilities.hs - hadrian/src/Rules/Docspec.hs - hadrian/src/Rules/Lint.hs - hadrian/src/Settings/Builders/RunTest.hs Changes: ===================================== hadrian/src/Hadrian/Utilities.hs ===================================== @@ -19,7 +19,6 @@ module Hadrian.Utilities ( copyFile, copyFileUntracked, createFileLink, fixFile, makeExecutable, moveFile, removeFile, createDirectory, copyDirectory, moveDirectory, removeDirectory, removeFile_, writeFileChangedBS, - findExecutable, -- * Diagnostic info Colour (..), ANSIColour (..), putColoured, shouldUseColor, @@ -691,7 +690,3 @@ renderUnicorn ls = ponyPadding = " " boxLines :: [String] boxLines = ["", "", ""] ++ (lines . renderBox $ ls) - --- Workaround for https://github.com/haskell/directory/issues/180 -findExecutable :: String -> IO (Maybe FilePath) -findExecutable exe = IO.catch (IO.findExecutable exe) $ \(_ :: IO.IOException) -> pure Nothing ===================================== hadrian/src/Rules/Docspec.hs ===================================== @@ -2,6 +2,8 @@ module Rules.Docspec ( docspecRules ) where +import System.Directory (findExecutable) + import Base import Context.Path import Settings.Builders.Common ===================================== hadrian/src/Rules/Lint.hs ===================================== @@ -4,6 +4,7 @@ module Rules.Lint import Base import Settings.Builders.Common +import System.Directory (findExecutable) import System.Exit (exitFailure) lintRules :: Rules () ===================================== hadrian/src/Settings/Builders/RunTest.hs ===================================== @@ -16,6 +16,7 @@ import Settings.Builders.Common import qualified Data.Set as Set import Flavour import qualified Context.Type as C +import System.Directory (findExecutable) import Settings.Program import qualified Context.Type View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/485c12b2fe697b71a62fcd1f418aaae0... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/485c12b2fe697b71a62fcd1f418aaae0... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)