Skip to content

Commit fa0e4de

Browse files
authored
Merge branch 'master' into soulomoon/update-ghcide-tests-hls-test-utils-DiagnosticTests
2 parents 361131e + 3822586 commit fa0e4de

File tree

11 files changed

+92
-52
lines changed

11 files changed

+92
-52
lines changed

.github/workflows/bench.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ jobs:
156156
- name: Display results
157157
run: |
158158
column -s, -t < bench-results/unprofiled/${{ matrix.example }}/results.csv | tee bench-results/unprofiled/${{ matrix.example }}/results.txt
159+
echo
160+
echo "Performance Diff(comparing to its previous Version):"
161+
column -s, -t < bench-results/unprofiled/${{ matrix.example }}/resultDiff.csv | tee bench-results/unprofiled/${{ matrix.example }}/resultDiff.txt
159162
160163
- name: tar benchmarking artifacts
161164
run: find bench-results -name "*.csv" -or -name "*.svg" -or -name "*.html" | xargs tar -czf benchmark-artifacts.tar.gz

bench/Main.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ createBuildSystem config = do
163163

164164
buildRules build hlsBuildRules
165165
benchRules build (MkBenchRules (askOracle $ GetSamples ()) benchHls warmupHls "haskell-language-server" (parallelism configStatic))
166+
addGetParentOracle
166167
csvRules build
167168
svgRules build
168169
heapProfileRules build

bench/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ Targets:
5454
- bench-results/*/*/*/results.csv
5555
- bench-results/*/*/results.csv
5656
- bench-results/*/results.csv
57+
- bench-results/*/*/*/resultDiff.csv
58+
- bench-results/*/*/resultDiff.csv
59+
- bench-results/*/resultDiff.csv
5760
- bench-results/*/*/*/*.svg
5861
- bench-results/*/*/*/*.diff.svg
5962
- bench-results/*/*/*.svg

ghcide/exe/Main.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import qualified Development.IDE.Main as IDEMain
2121
import qualified Development.IDE.Monitoring.OpenTelemetry as OpenTelemetry
2222
import qualified Development.IDE.Plugin.HLS.GhcIde as GhcIde
2323
import Development.IDE.Types.Options
24-
import Ide.Logger (LoggingColumn (DataColumn, PriorityColumn),
24+
import Ide.Logger (LoggingColumn (..),
2525
Pretty (pretty),
2626
Priority (Debug, Error, Info),
2727
WithPriority (WithPriority, priority),
@@ -73,7 +73,7 @@ main = withTelemetryRecorder $ \telemetryRecorder -> do
7373
-- stderr recorder just for plugin cli commands
7474
pluginCliRecorder <-
7575
cmapWithPrio pretty
76-
<$> makeDefaultStderrRecorder (Just [PriorityColumn, DataColumn])
76+
<$> makeDefaultStderrRecorder (Just [ThreadIdColumn, PriorityColumn, DataColumn])
7777

7878
let hlsPlugins = pluginDescToIdePlugins (GhcIde.descriptors (cmapWithPrio LogGhcIde pluginCliRecorder))
7979
-- WARNING: If you write to stdout before runLanguageServer

ghcide/ghcide.cabal

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ flag pedantic
3535

3636
common warnings
3737
ghc-options:
38+
-Werror=incomplete-patterns
3839
-Wall
3940
-Wincomplete-uni-patterns
4041
-Wunused-packages
@@ -43,6 +44,7 @@ common warnings
4344
-fno-ignore-asserts
4445

4546
library
47+
import: warnings
4648
default-language: GHC2021
4749
build-depends:
4850
, aeson

ghcide/src/Development/IDE/GHC/CoreFile.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ tcIfaceId = fmap getIfaceId . tcIfaceDecl False <=< unmangle_decl_name
202202
name' <- newIfaceName (mkVarOcc $ getOccString name)
203203
pure $ ifid{ ifName = name' }
204204
| otherwise = pure ifid
205+
unmangle_decl_name _ifid = error $ "tcIfaceId: got non IfaceId: "
205206
-- invariant: 'IfaceId' is always a 'IfaceId' constructor
206207
getIfaceId (AnId identifier) = identifier
207208
getIfaceId _ = error "tcIfaceId: got non Id"

ghcide/src/Development/IDE/GHC/Orphans.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ instance NFData Unlinked where
6060
rnf (DotA f) = rnf f
6161
rnf (DotDLL f) = rnf f
6262
rnf (BCOs a b) = seqCompiledByteCode a `seq` liftRnf rwhnf b
63+
rnf _ = error "rnf: not implemented for Unlinked"
6364
instance Show PackageFlag where show = unpack . printOutputable
6465
instance Show InteractiveImport where show = unpack . printOutputable
6566
instance Show PackageName where show = unpack . printOutputable

ghcide/src/Development/IDE/LSP/Notifications.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import Numeric.Natural
4141
data Log
4242
= LogShake Shake.Log
4343
| LogFileStore FileStore.Log
44-
| LogOpenTextDocument !Uri
4544
| LogOpenedTextDocument !Uri
4645
| LogModifiedTextDocument !Uri
4746
| LogSavedTextDocument !Uri

ghcide/test/exe/Main.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ import CompletionTests
4949
import CPPTests
5050
import CradleTests
5151
import DependentFileTest
52+
import Development.IDE (LoggingColumn (..))
5253
import DiagnosticTests
5354
import ExceptionTests
5455
import FindDefinitionAndHoverTests
@@ -74,7 +75,7 @@ import WatchedFileTests
7475

7576
main :: IO ()
7677
main = do
77-
docWithPriorityRecorder <- makeDefaultStderrRecorder (Just [PriorityColumn, DataColumn])
78+
docWithPriorityRecorder <- makeDefaultStderrRecorder (Just [ThreadIdColumn, PriorityColumn, DataColumn])
7879

7980
let docWithFilteredPriorityRecorder =
8081
docWithPriorityRecorder

hls-test-utils/src/Test/Hls/FileSystem.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ materialise rootDir' fileTree testDataDir' = do
115115
copyDir' root dir = do
116116
files <- fmap FP.normalise . lines <$> withCurrentDirectory (testDataDir </> dir) (readProcess "git" ["ls-files", "--cached", "--modified", "--others"] "")
117117
mapM_ (createDirectoryIfMissing True . ((root </>) . takeDirectory)) files
118-
mapM_ (\f -> putStrLn $ (testDataDir </> dir </> f) <> ":" <> (root </> f) ) files
119118
mapM_ (\f -> copyFile (testDataDir </> dir </> f) (root </> f)) files
120119
return ()
121120

0 commit comments

Comments
 (0)