Commit Graph

268 Commits

Author SHA1 Message Date
Michael Peyton Jones
388fd40ade
Purge GHC 8.8 (#3287)
We're also dropping support for this.
2022-10-18 22:12:53 +01:00
Lei Zhu
8cef7a456a
Support ghc 9.4 for hls-class-plugin (#3258)
* Support ghc 9.4 for hls-class-plugin

* Update support table

* Update test description

* Update nix dependency
2022-10-16 11:56:43 -04:00
Pepe Iborra
9b491f7bbf
Drop compatibility with GHC 8.6.5 (#3101)
* Drop compatibility with GHC 8.6.5

* drop a few more bits

* fixup merge

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-10-11 12:18:49 +00:00
maralorn
f6dc2064d1
wrapper.in: Require runtime ghc-pkgs to be an abi compatible superset of bootpkgs (#3214)
This still makes sure that ghc has been compiled with the same core
libraries as hls while it allows runtime environments where other
packages have been added to the ghc-pkg database.

This commit also adds that file to the sdist, so that distro
packagers can use it.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-09-28 13:22:21 +00:00
Pepe Iborra
dca5cc36c7
Log plugin name and attribute errors to plugins (#3194)
* Log plugin name

* redundant import

* Attribute response error logs to plugins

* remove redundant plugin names from error messages

* improve pretty printing

* Avoid show

* simplify test messages

* Fix
2022-09-21 17:36:19 +00:00
Zubin Duggal
ddb21a0c8d Remove internal library haskell-language-server:plugins 2022-09-14 11:38:48 +05:30
Zubin Duggal
816cd6301e Prepare 1.8.0.0
Use hiedb from hackage

gitlab-ci: remove workaround for windows 9.2.2
gitlab-ci: remove workaround for windows 9.2.2

hie-bios

update hie bios

update hie bios

bounds

hie-bios fixes

hie-bios fixes

lsp 1.6

cabal.project fixes

hie-bios fixes

lsp and hie-bios from hackage

Mark hie-bios error as expectFail

hie-bios fixes

hie-bios fixes

Stack

Stack

stack fixes
2022-09-14 02:27:17 +05:30
Nick Suchecki
aad896cdc5
Update hls-retrie-plugin to be usable with 9.2.4. (#3120)
* Update hls-retrie-plugin to be usable with 9.2.4.

This is the first pass at getting hls-retrie-plugin enabled. Much of the
changes were updating to match the changes in the upstream `retrie`
package.

* Replace GHC.Paths.libdir by querying a ModSummary for the LibDir

* Looks like formatting was missed

* Revert "Looks like formatting was missed"

This reverts commit 4f6eee5a6f.

* Don't build retrie for 9.4

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-09-07 17:58:05 +00:00
Zubin Duggal
a2df919078 Make hls-code-range-plugin buildable on 9.4 by removing usused exactprint dependencies 2022-09-06 20:36:24 +05:30
Pepe Iborra
9297c98c54 enable a bunch of plugins that build with ghc 9.4 2022-09-06 20:36:24 +05:30
Nick Suchecki
08cfc78394 Change Type Signature Plugin buildable with 9.4 2022-09-06 20:36:24 +05:30
Nick Suchecki
608cfd99b4 Alternate Number Format Plugin buildable with GHC 9.4 2022-09-06 14:45:26 +05:30
Zubin Duggal
87133b0394 Fix func test 2022-09-01 14:47:55 +05:30
Zubin Duggal
6c99563a9f 9.4 support + MHU 2022-09-01 14:47:55 +05:30
Zubin Duggal
a9f1c538ac Remove exactprint dependencies from ghcide by introducing hls-refactor-plugin.
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
2022-08-31 00:56:35 +05:30
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
Lei Zhu
0e74593e8d
hls-explicit-fixity-plugin (#2941)
* init hls-explicit-fixity-plugin

* Update dependencies

* Refactor: Prevent block on startup

* Run pre-commit

* Compatibility: Add emptyMessages

* Remove unused ModIface

* Comment why to make this plugin a lower priority

* Provide hover content while testing fail

* Avoid lambda

* 4 space indent

* Pass Text instead of Name

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-08-11 11:48:18 -04:00
Lei Zhu
df77e7dd2d
Support ghc-9.2.4 (#3085)
* Support ghc-9.2.4

* Restore caching workflow for ghc-9.2.3
2022-08-11 09:54:02 +01:00
Kobayashi
dc682ba118
add a prefix to plugin CPP (#3065) 2022-07-29 10:28:31 +00:00
Gregory Gerasev
078fc14dda
Stan integration #258 (#2908) 2022-07-28 02:11:31 +03:00
Kobayashi
445192e21d
refactor selection range plugin (#3003)
* update Gitpod config

* update nix shellHook & docs

* install pre-commit hook

* add kokobd as code owner to .gitpod.*

* add gen-hie to Gitpod

* add tools for doc

* remove .pre-commit-config.yaml from .gitignore

* set vscode formatter to stylish-haskell in Gitpod

* refactor selection range plugin

* refine selection range

* add CodeKind to CodeRange

* rename hls-selection-range-plugin to hls-code-range-plugin

* update docs about selection range

* cleanup RuleTypes.hs

* add the missing bang pattern

* fix subRange

* add some unit tests to CodeRange.Rules

* add tests for removeInterleaving

* add even more tests

* fix extra sources

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-07-11 04:24:35 +00:00
ˌbodʲɪˈɡrʲim
4b0b99efc1
haskell-language-server: add lower bound for githash (#3030) 2022-07-09 16:44:08 +00:00
Stefan Matting
cdc8f78a98
Turn HLS-wrapper into an LSP Server (#2960)
* Make wrapper a LSP on failure

* Fix incorrect imports

* revert import block for smaller diff

* add missing imports

* Fix: callProcess on win32 machines not called

* import container only on win32

* add missing liftIO

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-06-26 11:39:07 +00:00
fendor
907a6e645b
Teach HLS about different file extensions (#2945)
* Fix parameter switch-up

* Generalise file extension handling for plugins

NotificationHandler now distinguishes between different file extensions
RequestHandler distinguishes between different file extensions

* Introduce PluginMethod Typeclass hierarchy

The hierarchy looks as follows:

            PluginMethod (pluginEnabled)
                          |
         -----------------------------------
         |                                 |
 PluginRequestMethod             PluginNotificationMethod

* Add example plugin

* Improve documentation for plugins

* Simplify Plugin Handling code

Co-authored-by: Jana Chadt <jana.chadt@nets.at>
Co-authored-by: Jana Chadt <jana.chadt@tuwien.ac.at>
Co-authored-by: Fendor <walross.power@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-22 15:38:13 +00:00
Lei Zhu
e64b61e7fd
Support ghc-9.2.3 (#2936)
* Support ghc-9.2.3

* ormolu-0.5

* Update stack.yaml

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-06-16 15:29:38 +08:00
Lei Zhu
faa88f685e
A plugin for GADT syntax converter (#2899)
* initial hls-gadt-plugin

* Correct condition

* Render context correctly

* Fix typo

* Support from ghc-8.6 to ghc-9.0

* ghc8.6 compat

* Try to fix test for ghc-8.6

* Pretty name

* Add GADTs pragma automatically

* Enrich Readme

* Clean up

* Update hls docs

* Update CODEOWNERS

* Fix typo

* Rename withTempDir with withCanonicalTempDir

* Add @michaelpj's suggestions

* Pass PluginId through descriptor

* Explicit forall
2022-05-26 17:13:09 +08:00
ˌbodʲɪˈɡrʲim
4b475b0adf
hls-haddock-comments does not support ghc-exactprint >= 1.0 (#2878)
* hls-haddock-comments does not support ghc-exactprint >= 1.0

And should be marked as such otherwise `cabal install haskell-language-server` generates an unbuildable plan

* Try to make CI happy

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-05-01 13:50:12 +00:00
Lei Zhu
c14cbdbdd4
Support hls-hlint-plugin and hls-stylish-plugin for ghc9.0 and ghc9.2 (#2854)
* hls-hlint-plugin & hls-stylish-haskell-plugin rush to ghc92

* Restore allow-newer

* Add BufSpan for lower version ghc

* Add Cabal constraint for stack-9.0.1.yaml

* Try ghc-lib-parser for BufSpan

* Loose tactic compiling constraint

* Rename hlint34

* Rerun test

* Update doc

* Comment ghc-exactprint requirements

* Add test for apply-refact-0.10

* Use hackage stylish-haskell

* ghc-exactprint constraints for hls-class-plugin

* Remove uncompiled if

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-04-28 17:36:25 +00:00
Zubin Duggal
5ce21d0a77
Bump hls-test-utils to 1.3
Also need to bump the minor versions of all packages which were not bumped since 1.6.1.1
and had changes to their testsuite.
2022-04-23 16:45:47 +05:30
Zubin Duggal
41b30b5706 Prepare 1.7.0.0 2022-04-21 14:08:10 +05:30
Oliver Madine
dda3e5efae
Enable rename plugin (#2809)
* refactor rename plugin
  - add context to error messages
  - remove unnecessary unwrapping of ParsedSource
  - use HashSet for references
  - consistent naming, whitespace, indentation, imports style

* prevent renaming of built-in syntax

* limit rename scope to current module

* refine imports in rename plugin

* allow renaming with implicit module names

* update tests with cross-module renaming limitation

* enable rename plugin
  - add rename package to hackage CI
  - set default build flag to True

* add rename plugin to features docs

* add rename plugin to ghc-8.10.X stack yaml files

* improve position printing in rename error

* implement cross-module rename config option

* unignore tests for cross-module renames

* update docs for cross-module renaming

* fix within module renaming for ghc-9

* fix rename plugin language extensions for ghc-92

* add explicit GHC.Parser imports in rename plugin

* fix typo in rename docs

* use implicit import lists in rename plugin

* relocate orphaned instances from rename plugin

* Revert "relocate orphaned instances from rename plugin"

This reverts commit bb91db031e.

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-04-03 21:30:40 +00:00
Pepe Iborra
a538641bf7
Target GHC 9.2.2 (#2787)
* Target GHC 9.2.2

* fix with-compiler

* attempt to fix Mac build

* attempt to fix stack

* Apply @July541 suggestion

* add missing space

* fix yaml

* another yaml fix
2022-03-21 17:19:25 +00:00
Nick Suchecki
a832491ae7
Provide all format suggestions in AlternatFormat Code Action (#2790)
* Insert Language Extensions when required

- Add new function that converts a NextPragmaInfo (identifies the
  location to insert a new Pragma) into an Insertion that will insert
  the new Extension

- Provide all format choices instead of only currently active extensions

* Update Test Suite

* Update Documentation

* Miscellaneous Cleanup

* Push extraneous functions into where bindings

* Remove unneeded logging

* Add Haskell2010 pragma to fix 9.2 tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-03-21 12:22:22 +00:00
Michael Peyton Jones
388abc300e
Purge some more hslogger (#2770)
* Purge some more hslogger

At this point we only really need it for `hie-bios`.

* Add StrictData to Hlint plugin
2022-03-10 13:10:17 +00:00
Nick Suchecki
911fe59d7f
Change Type Signature Plugin (#2660)
* First go

* Match against specific error message.

* Basic Change Type Signature implementation.

This implementation only matches a single GHC Error message:

```
    • Couldn't match type ‘Int’
                     with ‘Data.HashSet.Internal.HashSet Int’
      Expected type: Int -> Int
        Actual type: Data.HashSet.Internal.HashSet Int -> Int
    • In the expression: head . toList
      In an equation for ‘test’: test = head . toList
```

Specifically on `Expected type: ...`, `Actual type:...` and `In an equation ...`.

There are plenty of error messages that match this format but aren't actually valid.

* GHC 9.2.0 compat change

* Lift expectedError message into a separate binding

* Move ChangeTypeAction into it's own plugin

* Add New Error Message parsing.

- Add new regex for matching extra errors message types

- Revamp original regex to match more.

- Add basic test suite.

- Begin adding `tidyActualType` semantics to provide slightly prettier
TyVars

* Added Error Message Validation to ignore bad Messages.

- Add Pretty Printing for Types
- Added a few test scenarios

* Miscellaneous Cleanup.

* Update Tide Type Signature logic.

- Be able to tidy signatures with operators in it
- Use T.words instead of regex matching to split tyVars

* Remove locA (defaults to id in 8.10) to satisfy 9.0+

* Touch up 9.2.1

* Clean up review notes

* Update stack.yamls

* Fix copy-paste error

* Fix Local Signature resolution

* Improve logging (#2558)

* convert to contravariant logging style part 1, uses additional hardcoded log file to see it side by side with original logging

* convert Session to contravariant logging style

* convert Plugin/HLS and FireStore to contravariant logging style

* convert Rules (and most of the universe) to contravariant logging style

* fix tests, allow old style logging and contravariant logging to write to same log file

* fix import inside wrong CPP

* add CPP for LogTactic constructor

* remove redundant import

* fix ghcide tests

* remove unused import

* fix plugin tests

* LSP_TEST_STDERR should apply to contra logger as well

* fix tactic plugin test

* use CPP for Log datatype plugin constructors, remove unused imports

* add a few Pretty instances, add prettyprinter to haskell-language-sever and hls-plugin-api dependencies

* add Pretty Log instances for Session, FileStore, Notifications

* add remaining Pretty Log instances

* add logToPriorities

* fix slight interleaving issue with hslogger and logger both logging, have default logger be mutex stderr or file handle, use stderr if failing to open log file

* forgot to add .cabal files with hslogger dep

* dont use UnliftIO file IO helpers because they are too new

* remove log helper comments, use Doc instead of Text as final console/file logger input, renaming, export Log constructors

* remove accidentally added useless file, removed prettyprinter dep from hls-plugin-api because stack ghc8.6.5 doesnt have it?

* use deprecated prettyprint modules import for the sake of circleci ghc-8.6.5

* use dummy stderr logger for plugin cli commands, use priorityToHsLoggerPriority function instead of manual mapping

* remove old plugin detritus that somehow got committed

* fix prettyprinter imports for 8.6.5

* try enforcing prettyprinter bounds?

* enforcing bound makes no sense

* maybe changing stack yamls does trick

* filter out warnings when their diags are empty to more closely match original

* add ability to select wanted logging columns, match prev ghcide exe logging behaviour

* dont log anything when diags are empty in some defineEarlyCutoff versions

* use non-deprecated prettyprinter imports

* fix ghcide test module

* change logWith to accept priority at call site, remove all logToPriority functions, add cmapWithPrio that contramaps through WithPriority

* remove useless hiding import list, add comments to default recorder makers

* make cradleToOptsAndLibDir take concrete cradle to remove existential type var in Log constructor

* Types.Logger now re-exports prettyprinter, remove unused dependencies on prettyprinter and hslogger

* existential type var to remove boilerplate in Plugins.hs, remove a few Show instances

* add SourceLoc logging column, inline logToDoc functions, add comment explaining hslogger setup existence

* qualify a name to match original source

* fix -WError

* Delete the Telemetry log level (#2727)

It's a bit non-standard, and moreover it's entirely dead.

* Wall and 9.2 fix

* Remove unneeded comments/code

Co-authored-by: J. S <shenjonathan0@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
2022-03-03 23:08:42 +00:00
J. S
3b687a52ac
Improve logging (#2558)
* convert to contravariant logging style part 1, uses additional hardcoded log file to see it side by side with original logging

* convert Session to contravariant logging style

* convert Plugin/HLS and FireStore to contravariant logging style

* convert Rules (and most of the universe) to contravariant logging style

* fix tests, allow old style logging and contravariant logging to write to same log file

* fix import inside wrong CPP

* add CPP for LogTactic constructor

* remove redundant import

* fix ghcide tests

* remove unused import

* fix plugin tests

* LSP_TEST_STDERR should apply to contra logger as well

* fix tactic plugin test

* use CPP for Log datatype plugin constructors, remove unused imports

* add a few Pretty instances, add prettyprinter to haskell-language-sever and hls-plugin-api dependencies

* add Pretty Log instances for Session, FileStore, Notifications

* add remaining Pretty Log instances

* add logToPriorities

* fix slight interleaving issue with hslogger and logger both logging, have default logger be mutex stderr or file handle, use stderr if failing to open log file

* forgot to add .cabal files with hslogger dep

* dont use UnliftIO file IO helpers because they are too new

* remove log helper comments, use Doc instead of Text as final console/file logger input, renaming, export Log constructors

* remove accidentally added useless file, removed prettyprinter dep from hls-plugin-api because stack ghc8.6.5 doesnt have it?

* use deprecated prettyprint modules import for the sake of circleci ghc-8.6.5

* use dummy stderr logger for plugin cli commands, use priorityToHsLoggerPriority function instead of manual mapping

* remove old plugin detritus that somehow got committed

* fix prettyprinter imports for 8.6.5

* try enforcing prettyprinter bounds?

* enforcing bound makes no sense

* maybe changing stack yamls does trick

* filter out warnings when their diags are empty to more closely match original

* add ability to select wanted logging columns, match prev ghcide exe logging behaviour

* dont log anything when diags are empty in some defineEarlyCutoff versions

* use non-deprecated prettyprinter imports

* fix ghcide test module

* change logWith to accept priority at call site, remove all logToPriority functions, add cmapWithPrio that contramaps through WithPriority

* remove useless hiding import list, add comments to default recorder makers

* make cradleToOptsAndLibDir take concrete cradle to remove existential type var in Log constructor

* Types.Logger now re-exports prettyprinter, remove unused dependencies on prettyprinter and hslogger

* existential type var to remove boilerplate in Plugins.hs, remove a few Show instances

* add SourceLoc logging column, inline logToDoc functions, add comment explaining hslogger setup existence

* qualify a name to match original source

* fix -WError
2022-02-20 21:50:28 +00:00
Julian Ospald
a96b623c2b
Implement distribution of dynamic builds (#2675) 2022-02-11 07:54:09 +00:00
Javier Neira
9d75cc5660
Prepare 1.6.1.1 (only hackage release) (#2681)
* Disable -dynamic for all workflows

* Remove quotes

* Bump version to 1.6.1.1

* Update changelog for 1.6.1.1

* Correct flag set

* add comment to ci step

* Restore header and link
2022-02-02 15:13:53 +00:00
Pepe Iborra
3f12824f0f
Add the -dynamic flag and update build instructions (#2668)
* Add the -dynamic flag and update build instructions

* Disable dynamic in release build

* tweak wording

* add a comment

* Disable dynamic on Windows
2022-02-01 14:30:20 +01:00
Javier Neira
f4022c5bb8
Post 1.6.0.0 fixes and prepare 1.6.1.0 bug fix release (#2647)
* Reverse condition to upload candidates

As github.event.inputs.upload-candidates has no value when
the workflow is triggered via a -hackage branch

* Remove parenthesis

* Remove unused rerun by comment

* Remove install zip (again)

* Ignore gitlab ci in github

* Update release instructions

* Correct hls version

* Use name schema of github release

* Apply markdown-lint

* Complete th workarounds

* Bum up hls version

* Fix bug hls-wrapper non static

* Update dynamic build instructions

* Bump up wingman due to the last fix

* Correct grammar

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-29 21:12:57 +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
Javier Neira
65dff924a6
Disable alpine build by default (#2638)
* Disable alpine by default

* guard hlint plugin

* Rename hls in actual cabal project file
2022-01-25 11:00:14 +01:00
Kobayashi
310e6a4683
support selection range lsp feature (#2565)
* add selection range support

* add the whole import area as a selection step

* add selection range plugin to all project files

* merge type signature with value definition

* support ghc 9

* fix it for ghc-9.0

* remove unnecessary import

* reformat GhcIde.hs

* selection range: make it easier to understand

* selection range: improve error handling

* update lsp-types to 1.4.0.1

* add selection range to doc

* fix comment for findSelectionRangesByPositions

* remove a use of partial function

* update author & maintainer

* use foldlM1 instead of foldl1

* add testdata to cabal file

* update performace tips and log level

* update lsp-types in nix

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-01-24 13:13:56 +00:00
Javier Neira
92a8cc0b98
Use ghc+integer-gmp for alpine linux build release (#2615)
* Remove integer-simple workaround

* Skip upload to the release

* Fix echo cabal.project

* Echo PATH

* Use specific cache for build

* runner not allowed out of steps

* Use common cache

* Use raw ubuntu for ghc-9.2.1

* Enable alpine for ghc-9.2.1

* Replace gitrev with githash

* Handle GitInfo exception

As it breaks `cabal install`

* Clean up build workflow
2022-01-22 14:53:12 +01:00
mrgutkun
70bb0ab4ee
[ghc-9.2] Fix refine-imports plugin (#2601)
* [ghc-9.2.1] Fix refine-imports plugin

* Drop accidental top-level undefined
2022-01-18 13:20:47 +00:00
Javier Neira
3f4685141c
Add support for ghc 9.0.2 (#2567)
* Extract out ci build setup

* Add required shell property

* Add support for ghc-9.0.2

* Test ghc 9.0.2

* Add unix boot package

* Use primitive-unlifted < 1.0

* Use primitive-unlifted < 1.0 for stack

* Ude 9.0.1 for hackage

We cant use 9.0.2 until all deps do not need allow-newer

* Use a unified cabal-ghc90.project

And bump up index state to get lastest hie-bios

* Use last snapshot with ghc-9.0.2 support

* Use new cabal-ghc90.project in build

* Add stm-containers

* Add specific tweaks for ghc-9.0.2

* Use the las ghc-boot-9.0

* Fix test adding allow-newer

Co-Authored-By: @michaelpj

* Use unix-compat from hackage

* Use unix-compat from hackage

* Make consistent lastest stack.yamls

* Clean up cabal.project

* more cleanups

* Update tweaks in hackage ci

* Correct comment

* Correct fourmolu condition

* Correct fourmolu condition in tests

* Removing the all target from caching

It builds all project packages even if we they are not buildables
(and are not included in hls due to flags)
Its goal was build all tests and benchmarks but --enable-tests
ans --enable-benchmarks should work
Last one does not: https://github.com/haskell/cabal/issues/6259

* exclude Brittany 0.14.0.1

* Update snapshot to get new lsp

* document flag

* Document and build ghcide benchmark

* Doc and use ghc-9.0.2 in hackage

* Add ghc-9.2.1 to tested-with

* Use 9.0.2 in gitlab

* Use last *molus

* Use same versions as cabal build

* Use cabal freeze versions

* Add dep for ghcide tests

* one by one

* Unnecessary change

* Remove unnecessary flag

* Corrections

* Move blocks

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-17 01:18:04 +00:00
mrgutkun
b01a94a82b
Fix module-name plugin on ghc-9.2.1 (#2594)
* Fix module-name plugin on ghc-9.2.1

* Removing flag

Also enables the plugin

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-01-16 21:44:04 +00:00
Javier Neira
9c2bc32875
More work around next ghc-9.2.1 support (#2587)
* Enable class-hierarchy for 9.2.1

* Add module-name plugin to tests

* Update docs status

* Include module plugin via flags

* Module name does not compile for ghc-9.2.1
2022-01-14 16:31:37 +01:00
Javier Neira
8804cbdf65
Post ghc-9.2.1 config cleanup (#2582)
* Uncomment packages thanks to allow-newer

* Clean up cabal config files

* Enable floskell for ghc-9.2.1

* removing bad flag usage

* correct bad merge
2022-01-13 17:35:48 +01:00
George Thomas
4ffdf45a39
Bump Ormolu and Fourmolu to GHC-9.2-compatible versions (#2579)
* Bump Ormolu and Fourmolu to latest versions (resp. 0.4 and 0.5)

* Enable Ormolu and Fourmolu on GHC 9.2

* Bump index-state

* enable tests for ghc-9.2.1

* enable fourmolu and ormolu

* Allow newer ghc-lib-parser for *molu

* Fix ormolu

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
2022-01-13 11:35:35 +00:00