Skip to content

Commit

Permalink
Demote implicit cradle warn to logging (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira committed Mar 7, 2021
1 parent 6fab02b commit 2a99031
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ghcide/session-loader/Development/IDE/Session.hs
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,8 @@ loadSessionWithOptions SessionLoadingOptions{..} dir = do
lfp <- flip makeRelative cfp <$> getCurrentDirectory
logInfo logger $ T.pack ("Consulting the cradle for " <> show lfp)

when (isNothing hieYaml) $ mRunLspT lspEnv $
sendNotification SWindowShowMessage $ notifyUserImplicitCradle lfp
when (isNothing hieYaml) $
logWarning logger $ implicitCradleWarning lfp

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

Expand Down Expand Up @@ -820,8 +820,8 @@ getCacheDirsDefault prefix opts = do
cacheDir :: String
cacheDir = "ghcide"

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

0 comments on commit 2a99031

Please sign in to comment.