-
-
Notifications
You must be signed in to change notification settings - Fork 398
Migrate change-type-signature-plugin to use structured diagnostics #4632
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
Changes from all commits
c26a6ec
fc36241
b87513e
6f1dcc7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Unchanged files with check annotations Beta
{ source_version = ver | ||
, old_value = m_old | ||
, get_file_version = use GetModificationTime_{missingFileDiagnostics = False} | ||
, get_linkable_hashes = \fs -> map (snd . fromJust . hirCoreFp) <$> uses_ GetModIface fs | ||
Check warning on line 805 in ghcide/src/Development/IDE/Core/Rules.hs
|
||
, get_module_graph = useWithSeparateFingerprintRule_ GetModuleGraphTransDepsFingerprints GetModuleGraph f | ||
, regenerate = regenerateHiFile session f ms | ||
} |
Just fileDiags -> do | ||
pure $ Just $ filter diagRangeOverlaps fileDiags | ||
where | ||
diagRangeOverlaps = \fileDiag -> | ||
Check warning on line 219 in ghcide/src/Development/IDE/Core/PluginUtils.hs
|
||
rangesOverlap range (fileDiag ^. fdLspDiagnosticL . LSP.range) | ||
-- | Just like 'activeDiagnosticsInRangeMT'. See the docs of 'activeDiagnosticsInRangeMT' for details. |
import Data.Time (UTCTime (..)) | ||
import Data.Tuple.Extra (dupe) | ||
import Debug.Trace | ||
import Development.IDE.Core.FileStore (resetInterfaceStore) | ||
Check warning on line 73 in ghcide/src/Development/IDE/Core/Compile.hs
|
||
import Development.IDE.Core.Preprocessor | ||
import Development.IDE.Core.ProgressReporting (progressUpdate) | ||
import Development.IDE.Core.RuleTypes | ||
tcs = tcg_tcs ts :: [TyCon] | ||
hie_asts = GHC.enrichHie all_binds (tmrRenamed tcm) top_ev_binds insts tcs | ||
pure $ Just $ | ||
#if MIN_VERSION_ghc(9,11,0) | ||
hie_asts (tcg_type_env ts) | ||
#else | ||
convImport (L _ i) = ( | ||
(ideclPkgQual i) | ||
Check warning on line 1106 in ghcide/src/Development/IDE/Core/Compile.hs
|
||
, reLoc $ ideclName i) | ||
msrImports = implicit_imports ++ imps |
{-# LANGUAGE DeriveAnyClass #-} | ||
Check warning on line 1 in ghcide/session-loader/Development/IDE/Session/Diagnostics.hs
|
||
module Development.IDE.Session.Diagnostics where | ||
import Control.Applicative | ||
surround start s end = do | ||
guard (listToMaybe s == Just start) | ||
guard (listToMaybe (reverse s) == Just end) | ||
pure $ drop 1 $ take (length s - 1) s | ||
multiCradleErrMessage :: MultiCradleErr -> [String] | ||
multiCradleErrMessage e = |
[] -> error $ "GHC version could not be parsed: " <> version | ||
((runTime, _):_) | ||
| compileTime == runTime -> do | ||
atomicModifyIORef' cradle_files (\xs -> (cfp:xs,())) | ||
Check warning on line 630 in ghcide/session-loader/Development/IDE/Session.hs
|
||
session (hieYaml, toNormalizedFilePath' cfp, opts, libDir) | ||
| otherwise -> return (([renderPackageSetupException cfp GhcVersionMismatch{..}], Nothing),[]) | ||
-- Failure case, either a cradle error or the none cradle | ||
x <- map errMsgDiagnostic closure_errs | ||
DriverHomePackagesNotClosed us <- pure x | ||
pure us | ||
isBad ci = (homeUnitId_ (componentDynFlags ci)) `OS.member` bad_units | ||
Check warning on line 897 in ghcide/session-loader/Development/IDE/Session.hs
|
||
-- Whenever we spin up a session on Linux, dynamically load libm.so.6 | ||
-- in. We need this in case the binary is statically linked, in which | ||
-- case the interactive session will fail when trying to load |
{-# LANGUAGE CPP #-} | ||
{-# LANGUAGE DataKinds #-} | ||
{-# LANGUAGE LambdaCase #-} | ||
{-# LANGUAGE OverloadedStrings #-} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need that? Should we open a GHC issue for adding the
DeclName
context to the error message?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, I think we do
That would be awesome