@@ -606,6 +606,8 @@ loadSessionWithOptions SessionLoadingOptions{..} dir = do
606
606
cradleToOptsAndLibDir :: Show a => Logger -> Cradle a -> FilePath
607
607
-> IO (Either [CradleError ] (ComponentOptions , FilePath ))
608
608
cradleToOptsAndLibDir logger cradle file = do
609
+ let noneCradleFoundMessage :: FilePath -> T. Text
610
+ noneCradleFoundMessage f = T. pack $ " none cradle found for " <> f <> " , ignoring the file"
609
611
-- Start off by getting the session options
610
612
logDebug logger $ T. pack $ " Output from setting up the cradle " <> show cradle
611
613
cradleRes <- HieBios. getCompilerOptions file cradle
@@ -617,13 +619,14 @@ cradleToOptsAndLibDir logger cradle file = do
617
619
-- This is the successful path
618
620
CradleSuccess libDir -> pure (Right (r, libDir))
619
621
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 [] )
623
625
624
626
CradleFail err -> return (Left [err])
625
- -- Same here
626
- CradleNone -> return (Left [] )
627
+ CradleNone -> do
628
+ logInfo logger $ noneCradleFoundMessage file
629
+ return (Left [] )
627
630
628
631
emptyHscEnv :: IORef NameCache -> FilePath -> IO HscEnv
629
632
emptyHscEnv nc libDir = do
0 commit comments