Skip to content

Commit

Permalink
Demote implicit cradle warn to logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira committed Mar 6, 2021
1 parent 1b245ca commit 3c9c7cb
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 3c9c7cb

Please sign in to comment.