Commit Graph

29 Commits

Author SHA1 Message Date
Andy
21c8e9b83e
Hlint: A handful of fixes to hints (#3259)
* CI: rwe/actions-hlint-run v2

* fmt script: Fix missing directories

Otherwise will fail

* Hlint: Automatically fix warnings via apply-refact

* Hlint: Do not suggest fromMaybe

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-10-10 11:47:42 +00:00
hololeap
c422cf373a
Add source-repository to all cabal files (#3219)
Add a source-repository stanza to any .cabal files in the project that
are missing it.

This metadata can be useful for package maintainers.

See: https://cabal.readthedocs.io/en/stable/cabal-package.html#source-repositories

Signed-off-by: hololeap <hololeap@users.noreply.github.com>

Signed-off-by: hololeap <hololeap@users.noreply.github.com>
2022-09-24 02:50:25 +00:00
Pepe Iborra
d0e3e0fe3f
HLS benchmarks (#3117)
* extract ghcide:experiments-types

* extract haskell-language-server:plugins and let go of examples

The main goal here is to move the Plugins module into an internal
library so that it can be reused from the benchmark suite.

In order to
make that easier, and since they hardly serve a purpose in a repository
with 25 plugins, I delete the Example and Example2 plugin descriptors
and their dependencies.

* HLS benchmark suite

Port the ghcide benchmark suite to HLS and benchmark plugin
"configurations" independently.

This includes the following changes to the ghcide benchmark suite and
HLS:
- Support for "configurations" which are defined as sets of plugin ids.
  The benchmark will be run with only these plugins enabled and all
  others disabled
- Support for configurable concurrency. This relies on RTS -ol and -po
  flags to place the RTS traces in the target location rather than in
  the cwd

This change requires two commits, the next one places
ghcide/bench/hist/Main.hs into its final location to help 'git'
recognize the change as a file move

* ghcide/bench/hist/Main.hs -> bench/Main.hs

* CI - fix artifact names for uniqueness

* disable shorten HLS step

* Do not store eventlogs to avoid out of disk space

* render durations up to milliseconds

* shorten titles

Goal is to display the formatted CSV (via column) one row per line

* exclude formatting plugin configurations

* Extract ghcide-bench to a standalone package

* ghcide-bench: fix stderr capturing

* Fix mem stats

We parse maxResidency and allocatedBytes from the RTS -S output, but runSessionWithHandles kills the server without waiting for it to exit and these stats don't get logged.

The solution is to use runSessionWithHandles', but unfortunately it is internal and not exposed. I have raised a PR to expose it and in the meantime we need a source repo package.

* feedbacks

* delete Example plugins
2022-08-25 15:08:57 +01:00
Dmitry Pogodin
347a7187f2
Run pre-commit hooks (#3059) 2022-07-28 16:48:13 +00:00
Pepe Iborra
5a6b079af2
Review project stack descriptors according to #2533 (#2874)
* Review project stack descriptors according to #2533

* adjust shake-bench cabal descriptor to work with gen-hie

* Fix shake-bench to build with aeson 2.x

* track also LTS 16
2022-05-01 12:08:37 +00:00
Zubin Duggal
41b30b5706 Prepare 1.7.0.0 2022-04-21 14:08:10 +05:30
wz1000
21c4510070
bench: Add more metrics (#2814)
Add columns to keep track of total GHC rebuilds, time for first response and
average time per response
2022-04-03 16:09:58 +01:00
Nick Suchecki
411db02883
Add pre-commit hook for cleaning up mixed-line endings (#2679)
* Update pre-commit hook to include changing line endings

* Fix non-lf lines

* Check pre-commit excludes files

* Revert "Check pre-commit excludes files"

This reverts commit 7b9670f863.

* Actually add the exclude to contributing docs

* Fix merge failure with previous patch

* Inadvertently overwrote merge

* Add LF option for stylish-haskell and pre-commit file

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-04 14:50:18 +00:00
Javier Neira
ce41b6459a
Prepare 1.6.0 release (#2642)
* Add list of merged prs

* Remove branch trigger

* Update release instructions

* Include 9.2.1 in the current release

* Bump up hls version

* remove duplicate mention

* Remove references to branch name

* Fix cabal.project gen

* Correct fail-fast condition

* Bump up minor version

* Bump up major version

* Bump up major version

* Allow brittany only for 9.0.1

* brittany not supported in hackage and 9.0.2

* Not short hls for hackage

* Bump up versions everywhere

* Update hackage index

* Add ghcide in rename plugin

* Apply linter and add selection demo

* Add header linkable

* Add first version of release description

* Add last prs

* Mention wingman

* Grammar corrections

Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>

* Correct mention

Co-authored-by: Pepe Iborra <pepeiborra@me.com>

* Warn about th in docs

* Remove reference to install doc

* Rephrasing

Co-authored-by: J. S. <document_done@hotmail.com>

* Better style

Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>

* Use could to stress it likely will not work

* REmove reliable from the warning

* Reorder comments

* Rephrasing

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>

* Update docs/supported-versions.md

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>

* Use last version of internal deps

* Restore original wording

* One more pr

* One more pr

Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
Co-authored-by: J. S. <document_done@hotmail.com>
Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-01-28 09:06:56 +00:00
bradrn
f33954ec38
Correct issues with pre-commit hook (#2597)
* Reformat in accordance with pre-commit hook

* Typo fix: add missing comma to documented pre-commit hook

* Exclude failing files from pre-commit hook

'stylish-haskell' seems to always fail with a parse error on several
files under ghcide/. Excluding these files from the pre-commit hook
ensures that this hook can always succeed.

* Add stylish-haskell excludes to Nix pre-commit hook

* Reformat again in accordance with pre-commit hook

This is basically the same as 800c165, but applied to new changes
which have been added since then.

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-01-24 00:58:22 +00:00
Javier Neira
2625689ad4
Add support for brittany (needs aeson-2) and floskell with ghc-9.0.1 (#2551)
* Enable tests for brittany and 9.0.2

* Enable tests for floskell plugin

* cabal-ghc901.project: naively enable brittany

* haskell-language-server.cabal: bump brittany flag <(9.0.1->9.2.1)

* Trying to add support for brittany

* Use last hackage floskell version

* Activate floskell in func-test suite

* Restrict brittany in hackage for ghc<9.0.1

* Adapt to Aeson.Key

* Update lsp source repo package

* Refer pr for butcher

* Add missing prefix

* Adapt to aeson-2 (incomplete)

* Use compat module

* Support for aeson-2 and extra-1.7.10

* Remove lsp

* Allow newer aeson for stylish-haskell

* Add needed import for non windows

* Remove insertJson and toJsonKey

* Update cabal-ghc901.project

* Missing import

* Avoid CPP by using lens-aeson

* Update hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs

* Use ghcide compat module

* Use type alias in cpp

* Fix stack build for ghc-8.6.5

* Use lens-aeson key

* Use lens-aeson in func-test

* Fixup shake-bench

* Update docs

* Switch to lens ix

* Try this

Co-authored-by: Anton-Latukha <anton.latukha@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-12 16:24:53 +00:00
Jan Hrcek
7c9b9327d8
Fix some hlint warnings (#2523)
* Fix some hlint warnings

* Revert changes in hie-compat

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
2021-12-24 21:40:17 +00:00
Javier Neira
253547816e
Prepare 1.4.0 (#2182)
* [Call hierarchy] Update change log for 1.0.1.0

* Add hackage release instructions

* Add missing new line

* Add initial list of merged prs

* Update list of prs

* Add a initial release description

* Add rename plugin

* Add rename demo and last pr

* Restore significant whitespaces

* Correct grammar

* Add some newlines

* Bump up versions

* Complete Changelog

* Ignoring time resolution test

* Remove reference to rename plugin

Co-authored-by: Lei Zhu <julytreee@gmail.com>
2021-09-15 07:36:17 +00:00
Javier Neira
c3e2e23eef
Bump up shake-bench version (#2178)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-09-11 01:06:09 +00:00
Pepe Iborra
a5d70ee2cd
preserve threading details in benchmark eventlogs (#2105)
We need the log of threading operations so that eventlog-to-tracy can
produe a valid trace. Without it, eventlog-to-tracy will generate an
invalid trace where all the spans are impossibly on the same thread and
tracy may/will crash
2021-08-17 18:00:18 +02:00
Pepe Iborra
f3620d1ee4
reduce allow-newer entries for shake-bench (#2101)
* reduce allow-newer entries for shake-bench

* fix comma
2021-08-17 15:28:28 +02:00
Junyoung/Clare Jang
679f1d0f62
Reformat all files (#1439)
* Update nix-shell excludes regexs

* Format all files
2021-02-24 21:34:35 -05:00
Pepe Iborra
9bb3bb72b0
[shake-bench] collect eventlogs (#1324)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-09 00:38:58 +00:00
Pepe Iborra
21cdce2a03
[shake-bench] extract project dependencies action (for the HEAD binary) (#1325)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-08 22:21:09 +00:00
Pepe Iborra
762838d4c8
[benchmark] add warmups (#1323)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-02-08 19:32:49 +00:00
Pepe Iborra
79c5cc75d9
Parallelize benchmark CI (#1320)
* [benchmark] command line config argument

* [benchmark] Add a phony target for every example

* [benchmark] add config to toggle heap profiling

* [shake-bench] Phony rules for binaries

* [CI] benchmark jobs tree

* update mergify conditions
2021-02-08 09:45:18 +00:00
Pepe Iborra
ebd8816ee5 hlint 2021-02-06 13:00:29 +00:00
Pepe Iborra
71e75c4a80 [benchmark] change the extension used for -S files
benchmark-gcStats was such an odd extension
2021-02-06 12:41:14 +00:00
Pepe Iborra
87e9615866 [benchmark] Lower the frequency of heap census to avoid starving the mutator
Heap census is preceded by a GC pass. The default interval of 0.1 seconds causes
the mutator time to go down to 14% in the HLS example
2021-02-06 12:40:54 +00:00
Pepe Iborra
0cfd629b1f [benchmark] disable parallel GC to avoid segfaults with -h 2021-02-06 12:40:51 +00:00
Pepe Iborra
573d184167
Produce heap profiles the old fashioned way, from .hp files (#1261)
The -eventlog runtime is not reliable when combined with +RTS -h
leading to undiagnosed crashes and infinite loops.

The crashes are sporadic and seem to arise more frequently in the lsp-types
example, although we have not investigated deeply since there is a simple
alternative that doesn't crash: the vanilla runtime.
2021-01-26 00:45:58 +00:00
Pepe Iborra
e0caba5a8a
Benchmarks: generate heap profiles (#1253)
* Parallelize benchmarks

* [benchmarks] Collect heap profiles

* [benchmarks] pass RTS options to the real thing!

We were passing RTS options to the wrong thing

* Drop the 8.6.5 benchmark since the vanilla rts doesn't support +RTS -h

* Tone down timeout

* Review feedbacks
2021-01-23 23:52:01 +00:00
Pepe Iborra
3773010287
Benchmark improvements (#1178)
* [test-ci] fix wibble

* [ghcide-bench] fix scrambled output

* [ghcide-bench] add a new experiment: getDefinition after edit

* [ghcide-bench] refine the position used for identifiers

* [ghcide-bench] Support examples with multiple FOIs

* [ghcide-bench] Allow identifierP to be optional

* [ghcide-bench] experiments: do all edits first, then query

* [ghcide-bench] Add examples with multiple FOIs

* [ghcide-bench] add a completions (without edit) experiment

* [ghcide-bench] Fix indentation

* [ghcide-bench] Fix incomplete pattern match

* [ghcide-bench] Include the documentContents setup in the "startup" metric

* [ghcide-bench] fix wibble

* [ghcide-bench] add more verbose output

* [shake-bench] Consolidate -s code

* [bench-hist] Fix: depend on # samples

* [ghcide-bench] cache searchSymbol

* [cabal-bench] --no-clean
2021-01-10 08:03:31 +00:00
Pepe Iborra
14af467e97 Extract the benchmarking Shake rules to a standalone Cabal package (haskell/ghcide#941)
* [bench-hist] break down in rule functions

* Extract the benchmarking Shake rules to a shake-bench package

There's some room for reusing the rules used in the historic benchmarking suite
in other projects. This change makes that a bit easier and improves the
documentation and code structure.

The new structure is:
- lib:shake-bench - a Cabal library with functions to generate Shake rules
- ghcide:bench:benchHist - the ghcide instantiation of the above Shake rules

That's not to say that shake-bench is completely decoupled from ghcide -
there are still plenty of assumptions on how the benchmarks are organized, their
outputs, etc. But with a little bit of effort, it should be easy to make
these rules more reusable

* Fix nix build

* Fix license

* hlints and redundant imports

* more hlints

* Exclude shake-bench from the stack build
2020-12-07 15:03:15 +00:00