phantom depencies is invoke becase dependencies have preconditions in rules, see #3423. This pr is intend to fix that.
This might also fix some of the flaky tests.
In favor of @wz1000 appoach of running deps linearly.
It modify the deps result from KeySet to [KeySet] to make sure the result is sorted
we initialy thought it would have performance impact on the build system. But it turns out instead of performance lost, we actaully have performance gain since it avoid building the phantom depencies.
Overall things have been done:
1. Fix up hls-graph phantom depencies issue by reflesh linear deps in a linear manner.
2. Add semantic tokens bench mark.
3. Add test to hls-graph to ensure phantom depencies would not be invoke.
Result:
Now no more phantom dependencies would be invoked in hls-graph, gaining correctness, less runtime and less mem usage at the some time.
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>
* Bump lsp versions
Broadly:
- A few places where we need to pipe `ProgressToken`s around.
- I also just removed the progress reporting from resolve commands,
since it's going to often be costly to do progress reporting on
something that short. Possibly we could revisit after https://github.com/haskell/lsp/issues/549
- Some changes to the registration options we infer
- A few places where we need to adapt to ignoring registrations or not
- Adapting to use the ghcide verison of `getCompletionPrefix` everywhere
- Adapting to use the new mixed rope format
* stack
* More fixes
* Prepare release 2.3.0.0
* release ci: respect ADD_CABAL_ARGS on non-windows builds
* release ci: disable simdutf text for centos
* release ci: disable simdutf text for freebsd
* Fix cabal file of hls-fourmolu-plugin to allow it to be uploaded to hackage
Fixes#3819
* Update ghc version support docs
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* Adapt to lsp changes for workspace/configuration
This has a few substantive changes and a lot of messing with tests.
- We now tell `lsp` our config section, and parse just that section.
- We move the logic for updating the shake build rules for client config
from a `workspace/didChangeConfiguration` handler to the new `lsp`
callback, which will ensure it gets called in all circumstances that
can be relevant.
The test changes are more annoying:
- We ignore config and logging messages by default now, so we have to
stop doing that when we care about it.
- Many tests didn't really need to _change_ the config, but rather just
to set it once at the beginning. I adjusted a lot of test functions to
allow passing in the initial config for this reason.
* don't reduce the message timeout for wingman
* Fix stan plugin
* Doh
* Remove GetDependencyInformation in favour of GetModuleGraph.
Computing and storing GetDependencyInformation for each file essentially individually means
that we perform downsweep on each file individually, wasting a lot of work and using an excessive
amount of memory to store all these duplicated graphs individually.
However, we already have the `GetModuleGraph` rule, which we need to compute before compiling
files any way due to being depended on by `NeedsCompilation`, which needs to know if any reverse
dependencies of the module we are compiling requires TH, which meant that each file already depends on
the results of downsweep for the whole project.
Instead, we can compute the whole graph once when we execute the `GetModuleGraph` rule and even use this inside `HscEnv.hsc_mod_graph` to avoid reconstructing the `ModuleGraph` on each invocation of `GhcSessionDeps`.
There may be concerns about excessive build churn due to any change to the result of `GetModuleGraph`
invalidating the result of `GhcSessionDeps` too often, but note that this only happens when something
in the header of a module changes, and this could be solved easily be re-introducing
a version of `GetDependencyInformation` with early cutoff that essentially returns the result of `GetModuleGraph`
but includes the hash of only the `ModSummary`s in the downward dependency closure of the file.
* module graph early cutoff
early cutoff for eval plugin
* allow running benchmarks on examples generated via a script
* Add new benchmarks to config
* Allow pathToId to fail
* Errors
---------
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This simplifies the release process as we can bump all package versions in
lockstep prior to a release instead of having to decide version bumps on a case
to case basis while adhering to PVP.
We don't test arbitrary configurations mixing versions of plugins/ghcide which
you might get if you install HLS from hackage. With this in mind, it makes sense
to pin the versions of all packages in this repository
Exceptions include:
- hie-compat (it is used by hiedb and is mostly separate from the other packages - it changes about once a GHC release)
- shake-bench (not meant to be distributed for users, for internal testing only
* Add CI flows for GHC 9.2.5
* Prefer GHC 9.2.5 over 9.2.4
* Update list of tested-with GHC versions, as we only *test* 9.2.5
* Add GHC 9.2.5 as a supported GHC version
* Update comment in cabal-plugin about disabled test-case
* Disable GHC 9.2.5 on windows
* Fix CI for windows
* Run tests on windows for GHC 9.2.4
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* Drop min_version_ghc (8.8.4 is min supported)
* Drop conditional glasgow_haskell cpp
* Inline some imports (review feedback)
* Drop hie-compat 8.6 (review feedback)
* Dropping more ghc 8.6 related code and docs
* Eval: Include tests that were broken for 8.6
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>
All code actions have been moved to hls-refactor-plugin
Mostly straightforward, only slight complication was that completion auto imports
depends on exactprint, but I didn't want to remove all completion logic from ghcide
just for this.
Instead, I added logic to dynamically lookup the plugin that provides
the extend import command, so that auto imports work as expected when you have
hls-refactor-plugin enabled.
Move lookupPluginId out of loop
Replace code actions with lenses in benchmarks
Allow plugins to use GetAnnotatedParsedSource by linking it in when depended on
Move lookupPluginId to IdePlugins
Add default extensions
Move traceAst
* 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