Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demote implicit cradle warn to logging #1511

Merged
merged 1 commit into from
Mar 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
jneira marked this conversation as resolved.
Show resolved Hide resolved

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