Skip to content

Add thread id in ghcide tests log #4204

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

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions ghcide/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import qualified Development.IDE.Main as IDEMain
import qualified Development.IDE.Monitoring.OpenTelemetry as OpenTelemetry
import qualified Development.IDE.Plugin.HLS.GhcIde as GhcIde
import Development.IDE.Types.Options
import Ide.Logger (LoggingColumn (DataColumn, PriorityColumn),
import Ide.Logger (LoggingColumn (..),
Pretty (pretty),
Priority (Debug, Error, Info),
WithPriority (WithPriority, priority),
Expand Down Expand Up @@ -73,7 +73,7 @@ main = withTelemetryRecorder $ \telemetryRecorder -> do
-- stderr recorder just for plugin cli commands
pluginCliRecorder <-
cmapWithPrio pretty
<$> makeDefaultStderrRecorder (Just [PriorityColumn, DataColumn])
<$> makeDefaultStderrRecorder (Just [ThreadIdColumn, PriorityColumn, DataColumn])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this seems like it will affect people using the ghcide executable directly? Well, hopefully that will go away in due course anyway...

Copy link
Collaborator Author

@soulomoon soulomoon May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I am under the impression ghcide is just used for test purpose now and we are considering removing it?


let hlsPlugins = pluginDescToIdePlugins (GhcIde.descriptors (cmapWithPrio LogGhcIde pluginCliRecorder))
-- WARNING: If you write to stdout before runLanguageServer
Expand Down
3 changes: 2 additions & 1 deletion ghcide/test/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import CompletionTests
import CPPTests
import CradleTests
import DependentFileTest
import Development.IDE (LoggingColumn (..))
import DiagnosticTests
import ExceptionTests
import FindDefinitionAndHoverTests
Expand All @@ -74,7 +75,7 @@ import WatchedFileTests

main :: IO ()
main = do
docWithPriorityRecorder <- makeDefaultStderrRecorder (Just [PriorityColumn, DataColumn])
docWithPriorityRecorder <- makeDefaultStderrRecorder (Just [ThreadIdColumn, PriorityColumn, DataColumn])

let docWithFilteredPriorityRecorder =
docWithPriorityRecorder
Expand Down
1 change: 0 additions & 1 deletion hls-test-utils/src/Test/Hls/FileSystem.hs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ materialise rootDir' fileTree testDataDir' = do
copyDir' root dir = do
files <- fmap FP.normalise . lines <$> withCurrentDirectory (testDataDir </> dir) (readProcess "git" ["ls-files", "--cached", "--modified", "--others"] "")
mapM_ (createDirectoryIfMissing True . ((root </>) . takeDirectory)) files
mapM_ (\f -> putStrLn $ (testDataDir </> dir </> f) <> ":" <> (root </> f) ) files
mapM_ (\f -> copyFile (testDataDir </> dir </> f) (root </> f)) files
return ()

Expand Down
Loading