Skip to content

Commit 2a99031

Browse files
authored
Demote implicit cradle warn to logging (#1511)
1 parent 6fab02b commit 2a99031

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ghcide/session-loader/Development/IDE/Session.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,8 @@ loadSessionWithOptions SessionLoadingOptions{..} dir = do
395395
lfp <- flip makeRelative cfp <$> getCurrentDirectory
396396
logInfo logger $ T.pack ("Consulting the cradle for " <> show lfp)
397397

398-
when (isNothing hieYaml) $ mRunLspT lspEnv $
399-
sendNotification SWindowShowMessage $ notifyUserImplicitCradle lfp
398+
when (isNothing hieYaml) $
399+
logWarning logger $ implicitCradleWarning lfp
400400

401401
cradle <- maybe (loadImplicitHieCradle $ addTrailingPathSeparator dir) loadCradle hieYaml
402402

@@ -820,8 +820,8 @@ getCacheDirsDefault prefix opts = do
820820
cacheDir :: String
821821
cacheDir = "ghcide"
822822

823-
notifyUserImplicitCradle:: FilePath -> ShowMessageParams
824-
notifyUserImplicitCradle fp =ShowMessageParams MtWarning $
823+
implicitCradleWarning :: FilePath -> T.Text
824+
implicitCradleWarning fp =
825825
"No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for "
826826
<> T.pack fp <>
827827
".\n Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie).\n"<>

0 commit comments

Comments
 (0)