Commit Graph

37 Commits

Author SHA1 Message Date
wz1000
3009a45c74
Support for 9.10 (#4233)
* Support for 9.10

This includes supports for all plugins, other than formatters and hlint.

We need ghc-exactprint and retrie release before merging this.

* Remove indexed-traversable allow-newer

* Fix couple of warnings

* Fix flags job for hls-graph

* foldl' exposed from Prelude since base 4.20

* Fix flags job for hls-plugin-api

* Fix ghcide hover test

* Fix flags job for hls-eval-plugin

* unzip since 4.19

* More pedantic fixes

* Don't CPP in tests, fix another test

* Switch to ghc-exactprint and witherable from hackage

* Fix all warnings in hls-refactor-plugin

* Remove more no longer necessary allow newers

* Fix all warnings in hls-gadp-plugin and hls-qualify-imported-names-plugin

* Remove allow-newer for boring

* Bump to lsp 2.6, remove more allow-newers

* outline tests

* disable simple plugin on 9.10

* Remove allow-newer for ghc-trace-events

* fix appendConstraint

* stylish

* Remove commutative-semigroups and monoid-subclasses from allow-newer

* Remove free from allow-newer

* Fix 'type wilcard actions' tests

* Remove hie-bios from allow-newer

* Fix suggestNewDefinition tests

* Revert "Fix suggestNewDefinition tests"

This reverts commit 2f3300e964.

* Remove makeDeltaAst breaking tests unrelated to addArgument

* Fix 79 code action tests

* Fix 12 more tests

* Remove co-log-core from allow-newer

* Fix 21 more tests

* Fix 8 import disambiguation tests

* fix windows ghcide tests

* Fix adding argument to function body

* update retrie commit, progress in add argument tests

* Fix few stylish-haskell parse errors

* Fix remaining redundant constraint tests

* Remove allow-newer for constraint-extras

* Fix warnings after master merge

* Fix most add argument tests except for one

* Remove dependent-map from allow-newer

* Try removing some allow-newers from lsp

* Ormolu is updated, add links for other tool dependencies

* Revert "Try removing some allow-newers from lsp"

This reverts commit 6f60029ff2.

* Try this

* Fix all gadt plugin and most class plugin tests, enable 2 tests for ghc 9.4+

* Undo spurious changes

* Update eval plugin tests

* Disable broken refactor plugin test for now

* Fix warnings

* Add source-repository-package to unblock floskell

* Make call hierarchy plugin tests green

* fix semantic tokens 9.10

* Fix remaining class plugin test

* Update hls-change-type tests

* Make class plugin more robust

* Fix stylish parse errors, simplify CPP

* Cleanups

* Remove retrie dep from hls-refactor-plugin

* More retrie fixes

* Fix cabal-plugin-tests by respecting maxCompletions client cfg + a bit of CPP

* Fixup ghcide-tests

* disable retrie, splice and floskell plugins for 9.10

* Update tested-with + fix import warning

* Fix stylish

* Fix compilation with 9.2.8, fix stack jobs

* Remove no longer relevant :type +v test

* Disable tests of disabled plugins in CI

* Try a better broken specifier?

* Fix invalid CI config

* Use getClientConfigAction instead of introducing new HandlerM action

* Move CPPd imports to prevent stylish from evaluating CPP

* Disable stan tests with ghc 9.10 in CI

* attempt fixing exactprint <9.10

* Try enabling fourmolu now

* Revert "Try enabling fourmolu now"

This reverts commit 7142686f62.

* Update code-range-plugin tests

* Fix No newline at the end of file

* Use more recent cabal-gild

* Try setting some linker flags for macos

* Ignore non-local variable completion test on windows for GHC 9.8

---------

Co-authored-by: Jan Hrček <honza.hrk@gmail.com>
Co-authored-by: Patrick <fwy996602672@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Fendor <fendor@posteo.de>
2024-06-13 14:45:57 +00:00
soulomoon
863d0cdca6
Add performace diff benchmarks (#4203)
* add performance diff `resultDiff.csv` showing the performance different between two version

* add resultDiff CI

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
2024-05-05 21:24:50 +08:00
soulomoon
8a8f59bf2e
Benchmark: Enable 9.6, 9.8 (#4118)
Fix bench for newer ghc versions
The following have been done:
1. No longer use the implicit-hie to generate the hie.yaml for the bench examples and in favor of using "cradle:\n cabal:\n", seems to be working with modern cabal.
2. upgrade benchmark to use 9.6, 9.8 (The latest two we support for now).
3. upgrade bench examples to `Cabal version: 3.10.2.1, lsp-types version: 2.1.1.0`
4. fix minor error that `*.hp` files duplicates its extension name

---------

Co-authored-by: fendor <fendor@users.noreply.github.com>
2024-03-07 13:40:18 +00:00
Michael Peyton Jones
975db494a2
Use GHC2021 (#4033)
Co-authored-by: Jan Hrček <honza.hrk@gmail.com>
2024-02-02 12:10:51 +00:00
Michael Peyton Jones
c0f7d4c40b
Simplify cabal.project (#3836)
- entropy has had bounds revised in
- basement/hw-prim bounds empirically unnecessariy
- hyphenation was for wingman
- bound hlint to a version that uses ghc-lib by default
- stylish-haskell has never had a ghc-lib flag
- none of the versions of fourmolu that we use have a fixity-th flag
- remove some other things that lack justification speculatively
2023-10-12 19:48:49 +01:00
wz1000
191bda61fe
9.6 support for HLS (#3480)
* 9.6 support

Fixes

hls-refactor-plugin 9.6 support

hls-gadt-plugin

Fix 9.4 build

Fixes

hls-gadt-plugin fixes

WIP 9.6 patches

fixes

fixes

fixes

fixes

fixes

Fixes and add CI

CI

CI fixes

patch haskell/actions for https://github.com/haskell/ghcup-hs/issues/783

CI fixes

CI fixes

CI fixes

CI

CI

CI

CI

CI

Fix build on 9.0

Fix build on 9.0

hls-splice-plugin 9.6 compat

fixes

fixes

fixes

fixes

Fix benchmark build errors

9.2.5 and 8.10.7 had build errors when running benchmarks due to `mfsolve`
test suite having duplicate instances, so stop building tests for
mfsolve (see: https://github.com/kuribas/mfsolve/issues/8). Also,
`http2-4.0.0` has a parse error due to a misplaced haddock comment that
causes build failure with `-haddock`. It is fixed in the latest commit
of the source repo, so use that in the `cabal.project` for now.

Checkout correct commit on `pull_request` in CI

By default, the `pull_request` event has a `GITHUB_SHA` env variable set to the
"last merge commit on the GITHUB_REF branch"
(see https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request).
But we want to check out the latest commit on the branch whether or not it is a
merge commit. This commit changes the CI actions to do just that.

fixes

Use head.hackage for 9.4

Only use head.hackage for 9.5 and up

Reverts the change that caused head.hackage to be used for 9.4 as
well

Reintroduce source-repo-package for ekg-json

Fix refactor plugin tests

Fix missing constraint detection in refactor plugin

ghc 9.6+ allow newer unordered-containers:template-haskell

Some refactor tests no longer broken for 9.2

Fix simple-multi-test on 9.6

Mark simple-plugin as broken on 9.6

func-test fixes

Disable unsupported plugins on 9.6

Eval plugin fixes

Eval plugin test fixes, debug output in CI script

Restore 'working' setup/actions

WIP Fix GHC prerelease windows install

Fix eval plugin T11

fixes

Eval plugin fixes

Fix splice plugin test

Mark `simple plugin` ghcide test broken on 9.6

fixes

fixes

Use GHC 9.6-rc1 in CI

Try using 9.6.1 for CI

* 9.6 nix

* Remove head.hackage

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes
2023-03-22 13:56:51 +00:00
Pepe Iborra
66599f48f2
bump shake-bench (#3411) 2022-12-18 21:34:18 +00:00
Ruslan Gadeev
5d56aa70a8
fix typos (#3325)
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-11-09 17:42:12 +00:00
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