@@ -606,6 +606,8 @@ loadSessionWithOptions SessionLoadingOptions{..} dir = do
606606cradleToOptsAndLibDir :: Show a => Logger -> Cradle a -> FilePath
607607 -> IO (Either [CradleError ] (ComponentOptions , FilePath ))
608608cradleToOptsAndLibDir logger cradle file = do
609+ let noneCradleFoundMessage :: FilePath -> T. Text
610+ noneCradleFoundMessage f = T. pack $ " none cradle found for " <> f <> " , ignoring the file"
609611 -- Start off by getting the session options
610612 logDebug logger $ T. pack $ " Output from setting up the cradle " <> show cradle
611613 cradleRes <- HieBios. getCompilerOptions file cradle
@@ -617,13 +619,14 @@ cradleToOptsAndLibDir logger cradle file = do
617619 -- This is the successful path
618620 CradleSuccess libDir -> pure (Right (r, libDir))
619621 CradleFail err -> return (Left [err])
620- -- For the None cradle perhaps we still want to report an Info
621- -- message about the fact that the file is being ignored.
622- CradleNone -> return (Left [] )
622+ CradleNone -> do
623+ logInfo logger $ noneCradleFoundMessage file
624+ return (Left [] )
623625
624626 CradleFail err -> return (Left [err])
625- -- Same here
626- CradleNone -> return (Left [] )
627+ CradleNone -> do
628+ logInfo logger $ noneCradleFoundMessage file
629+ return (Left [] )
627630
628631emptyHscEnv :: IORef NameCache -> FilePath -> IO HscEnv
629632emptyHscEnv nc libDir = do
0 commit comments