Commit Graph

3669 Commits

Author SHA1 Message Date
Jan Hrcek
a2a9991158
Enable floskell and hlint plugins for ghc 9.8 (#4125)
* Enable floskell and hlint plugins for ghc 9.8

* Update golden extension schema

* Renererate default-config.golden.json
2024-03-09 21:21:51 +00:00
Jan Hrcek
91098a4e5f
Reduce usage of partial functions (#4123) 2024-03-09 18:30:42 +01:00
Jan Hrcek
c50a0e118b
Integrate stylish-haskell into hls executable with ghc 9.8 (#4124) 2024-03-09 14:02:37 +01: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
Raoul Hidalgo Charman
7610872c9a
Reintroduce ghc-lib flag for hlint plugin (#3757)
* Remove bitrotted CPP gated code

A lot of the HLINT_ON_GHC_LIB gated code has been bitrotting since this
flag was removed. This could be reintroduced if we wanted to directly
work on the same parsed AST, but as the hlint ghc plugin showed this
may not make much difference: https://www.haskellforall.com/2023/09/ghc-plugin-for-hlint.html

* Reintroduce ghc-lib flag for hlint plugin

The ghc-lib flag was removed in haskell#3015, but it's still useful to
be able to compile hls-hlint-plugin using the GHC API if you've done so
for hlint and ghc-lib-parser-ex, rather than using ghc-lib-parser as it
simplifies the build and dependencies.
2024-03-07 11:09:47 +00:00
fendor
79e36f5bcd
Improve isolation of build artefacts of test runs (#4112)
Even though we copy test files into temporary directories, we used to
reuse the same cache directory for build artefacts, hiedb and
compilation artefacts. While there is practially no chance this causes
any issues for the test runs themselves, it litters the cache directory
with a lot of files. So, we create one main directory in the temporary
directory, and generate all caches and in there. This makes it trivial
to delete all test caches, without risking deleting the cache that is
still used.
2024-03-05 11:00:18 +00:00
dependabot[bot]
2a6fa1e703
Bump haskell-actions/setup from 2.6.1 to 2.6.2 in /.github/actions/setup-build (#4116)
* Bump haskell-actions/setup in /.github/actions/setup-build

Bumps [haskell-actions/setup](https://github.com/haskell-actions/setup) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/haskell-actions/setup/releases)
- [Commits](https://github.com/haskell-actions/setup/compare/v2.6.1...v2.6.2)

---
updated-dependencies:
- dependency-name: haskell-actions/setup
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update test after ghc 9.8.1 -> 9.8.2 bump

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Jan Hrček <honza.hrk@gmail.com>
2024-03-05 09:43:01 +00:00
dependabot[bot]
0ff0327bb8
Bump haskell-actions/setup from 2.6.1 to 2.6.2 (#4115)
Bumps [haskell-actions/setup](https://github.com/haskell-actions/setup) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/haskell-actions/setup/releases)
- [Commits](https://github.com/haskell-actions/setup/compare/v2.6.1...v2.6.2)

---
updated-dependencies:
- dependency-name: haskell-actions/setup
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 16:18:26 +00:00
fendor
2ec645d375
Exit with non-zero exitcode if wrapper fails to launch (#4110)
* Exit with non-zero exitcode if wrapper fails to launch

Only when in LSP mode, we want to launch the LSP server that offers the
restart capability.

* Install recommended GHC version for release wrapper tests

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-03-03 22:38:56 +00:00
Jan Hrcek
7ccdeb9925
eval: more robust way to extract comments from ParsedModule (#4113) 2024-03-03 14:53:55 +01:00
Jan Hrcek
5502b76c95
Improve handling of nonsense rename attempts (#4111) 2024-03-02 16:47:09 +01:00
fendor
b377ab3985
Don't distribute gifs or plugin readmes (#4107) 2024-02-29 18:58:34 +01:00
fendor
dfb8feec99
Remove locale workaround for Module name that conatins non-ascii characters (#4106)
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-02-29 18:55:50 +01:00
fendor
829e1f47c2
Track extra-source-files of plugins more accurately (#4105)
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-02-29 16:53:33 +01:00
soulomoon
f4a36ed69c
remove non-ascii name (#4103) 2024-02-29 22:22:45 +08:00
Jan Hrcek
41de40ea63
Remove more workarounds for GHCs < 9.2 (#4092) (#4098)
* Remove more workarounds for GHCs < 9.2 (#4092)

* Delete removed module from cabal file

* Remove unused package
2024-02-28 08:52:59 +00:00
Jan Hrcek
50923e5c79
Remove more workarounds for GHCs < 9.0 (#4092)
* Remove more workarounds for GHCs < 9.0

* String, not [String]

* Remove GHC810 and GHC90 enum constants

* Fix logic mistake in windows tests

* Inline thDollarIdx

* Troubleshoot wrapper-test

* Troubleshoot

* Try free disk space action

* Run free-space in individual test jobs

* Only run the disk cleanup on ubuntu

* Revert troubleshooting code

* Revert free-disk-space workaround

* Reintroduce workaround

* Revert "Reintroduce workaround"

This reverts commit ec6e8da8c44d0130f0c23aac75df5e461c8f88e2.

* Don't install stack in tests?

* Revert "Don't install stack in tests?"

This reverts commit f53e9932f60eb6789ddef12f370ef81acf65fc58.

* Make the test use ghcup-managed stack

* More maintainable version of stack test
2024-02-27 15:52:07 +00:00
Fendor
b57c093619 Update release docs, and add missing ChangeLog entry 2024-02-27 15:17:05 +01:00
Fendor
dee1f507fd Remove .cirrus.yml as it is broken and we can't produce binaries 2024-02-27 15:17:05 +01:00
Fendor
219052cb43 Setup the release locale for UTF-8
Not all release runners seem to have a locale that allows for unicode
characters in module names.
Let's make sure they all use some form of UTF-8.
2024-02-27 15:17:05 +01:00
Fendor
59ae88ad85 Generate ChangeLog, update supported GHC versions 2024-02-27 15:17:05 +01:00
Fendor
26fa28c50e Update HLS version in .cabal files 2024-02-27 15:17:05 +01:00
Fendor
3d4782ae5d Add version update script 2024-02-27 15:17:05 +01:00
Fendor
d519565c44 Move release CI to GHC 9.8.2 2024-02-27 15:17:05 +01:00
Fendor
a6e869eafe Switch GHCup to vanilla channel 2024-02-27 15:17:05 +01:00
Fendor
5e8133aed9 Adapt to GHC 9.8.2 API changes 2024-02-27 15:17:05 +01:00
Michael Peyton Jones
949f3b8d0f
Remove ghcide-test-utils as a separate package (#4032)
* Actually build everything

* Remove ghcide-test-utils as standalone package
2024-02-26 10:49:41 +00:00
Jan Hrcek
fae6b83b47
Enable pedantic for remaining plugins (#4091) 2024-02-24 17:44:17 +00:00
ktf
af393d6769
Redundant imports/exports: use range only to determine which code actions are in scope (#4063)
* Use *only* incoming range to determine which code actions are in scope

Rather than doing a full compare with incoming `Diagnostic` objects from
the client. This brings the "remove redundant imports/exports" code
actions more in line with behavior described in #4056, and has the
pleasant side-effect of fixing broken code actions in neovim (#3857).

* Remove redundant imports ;)

* Rename param for clarity

---------

Co-authored-by: fendor <fendor@users.noreply.github.com>
2024-02-21 23:05:00 +00:00
soulomoon
24b40ca42d
Add Method_TextDocumentSemanticTokensFullDelta (#4073)
* add Method_TextDocumentSemanticTokensFullDelta

* remove persistentGetSemanticTokensRule

* add doc about semanticTokensCache location

* add Note [Semantic Tokens Cache Location]

---------

Co-authored-by: fendor <fendor@users.noreply.github.com>
2024-02-21 22:54:52 +01:00
Brandon Chinn
310b842ef0
Add support for fourmolu 0.15 (#4086) 2024-02-20 15:55:44 +01:00
dependabot[bot]
0cd11d4797
Bump pre-commit/action from 3.0.0 to 3.0.1 (#4066)
Bumps [pre-commit/action](https://github.com/pre-commit/action) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/pre-commit/action/releases)
- [Commits](https://github.com/pre-commit/action/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: pre-commit/action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-02-19 10:56:14 +00:00
Jan Hrcek
f9211c8da7
refactor plugin: fix regex for extracting import suggestions (#4080) 2024-02-17 07:27:37 +01:00
Jan Hrček
e93528bae7 Bump to hiedb 0.6.0.0 2024-02-16 12:07:26 +05:30
wz1000
3ba3f3884a
ghcide: Only try stating a core file after we ensure it actually exists (#4076)
This doesn't change any behaviour, but ensures we have a more informative error message
if we somehow request a linkable that does not exist.
2024-02-15 10:08:34 +00:00
Iustin Pop
908db38819
Fix small typo in Retrie error message (#4075) 2024-02-15 09:55:20 +01:00
Jan Hrcek
7b6986ba8c
Fix -Wall in retrie plugin (#4071)
* Fix -Wall in retrie plugin

* Fix ImportDecl initialization across ghc versions
2024-02-14 18:46:26 +01:00
Jan Hrcek
409bf3ba83
Fix -Wall in qualified imported names plugin (#4070) 2024-02-12 18:47:58 +01:00
Jan Hrcek
0ccb1784a8
Upgrade from deprecated haskell/actions/setup to haskell-actions/setup in benchmarks (#4068) 2024-02-12 12:20:08 +00:00
Jan Hrcek
f844a29a9e
Fix -Wall in refactor plugin (#4065)
* Fix -Wall in refactor plugin

* Fix hlint warnings

* stylish-haskell
2024-02-12 09:23:32 +01:00
Jan Hrcek
1bbe7806ac
Fix weird behavior of OPTIONS_GHC completions (fixes #3908) (#4031) 2024-02-10 10:20:48 +01:00
Jan Hrcek
e37ec7dbb3
Enable pedantic for more components (#4061) 2024-02-09 15:17:34 +01:00
Jan Hrcek
b115dc34f4
stack CI: switch to offic. haskell images, bump to lts-22.9 (ghc 9.6.4) (#4060)
* Bump to ghc 9.6.4 based lts-22.9

* Try more recent haskell image

* Fool around

* Cleanup and rename back to nightly

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-02-09 09:38:13 +00:00
Jan Hrcek
d8445f4eae
Bump haskell-actions/setup to get 9.6.4 in CI (#4062) 2024-02-09 09:37:29 +00:00
Michael Peyton Jones
0b0eee328f
Bump lsp versions (#4052)
* 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
2024-02-08 17:32:10 +00:00
Jan Hrcek
9021c39925
Add -Wunused-packages to common warnings (#4053)
* Add -Wunused-packages to common warnings

* Get rid of common deps

* Wrapper needs process on windows

* Refine

* Does it work like this?

* More cleanups in ghcide

* Fix build with stack

* Also fix stack --test

* Less noisy workaround

* Fix new warnings
2024-02-08 15:26:21 +00:00
soulomoon
03efae66ab
improve test (#4059) 2024-02-08 12:06:35 +00:00
soulomoon
3c511b0b03
Optimize semantic token extraction logic (#4050)
A follow up of #3958 , we have added a tokenizor to walk the hieAst along with the file rope, it means we no longer need to do the detour of storing temperal result as Map Range (Set identifier), instead we can optimize by fusing most of the logic into tokenizer and return [(Range, HsSemanticTokenType)] directly.
2024-02-07 18:07:13 +00:00
wz1000
2f33f8fe46
Bump ghcide-test-utils to 2.0.0.0 (#4058)
* Bump ghcide-test-utils to 2.0.0.0

We need this so we can release a version compatible with 2.6.0.0

I will need to make hackage revisions to all the plugin packages that depend on it

* update ghcide-test-utils tested with
2024-02-07 15:51:39 +00:00
soulomoon
cd959ae8b2
fix isClassNodeIdentifier in hls-class-plugin (#4020)
Partially fix #3942, by handling isClassNodeIdentifier correctly.

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-02-07 12:27:41 +00:00