Commit Graph

3633 Commits

Author SHA1 Message Date
dependabot[bot]
b37705814a
Bump haskell-actions/setup from 2.6.2 to 2.6.3 (#4149)
Bumps [haskell-actions/setup](https://github.com/haskell-actions/setup) from 2.6.2 to 2.6.3.
- [Release notes](https://github.com/haskell-actions/setup/releases)
- [Commits](https://github.com/haskell-actions/setup/compare/v2.6.2...v2.6.3)

---
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-26 19:13:55 +00:00
dependabot[bot]
175461ef89
Bump haskell-actions/setup in /.github/actions/setup-build (#4150)
Bumps [haskell-actions/setup](https://github.com/haskell-actions/setup) from 2.6.2 to 2.6.3.
- [Release notes](https://github.com/haskell-actions/setup/releases)
- [Commits](https://github.com/haskell-actions/setup/compare/v2.6.2...v2.6.3)

---
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>
Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
2024-03-26 18:41:33 +01:00
soulomoon
3668683c1e
Remove dead code in ghcide and hls-graph for priority (#4151) 2024-03-26 07:23:31 +08:00
fendor
e9ee544e25
Run ExceptionTests in temporary directory (#4146) 2024-03-23 15:05:01 +01:00
Jan van Brügge
b2b41df92d
hls-notes-plugin: Do not error if no note is under the cursor (#4136) 2024-03-18 12:30:09 +01:00
soulomoon
82148dc221
Fix hls-graph: phantom dependencies invoke in branching deps (resolve #3423) (#4087)
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.
2024-03-16 18:10:10 +08:00
Jan Hrcek
5453ab5b5d
Update comment in refactor tests (#4138)
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2024-03-13 12:02:01 +00:00
Jan Hrcek
46ad85b1eb
Update contact info in docs (#4137)
* Update contact info in docs

* Mention primary/secondary
2024-03-12 17:43:13 +01:00
soulomoon
bd7c9ba835
improve logging in semantic tokens rule (#4135)
* improve logging in semantic tokens rule
2024-03-11 20:34:40 +00:00
fendor
16912ccebd
Add cabal-gild as a cabal file formatter plugin (#4101)
* Add cabal-gild as a cabal file formatter plugin

* Add support for multiple cabal formatters

In addition, allow different cabal file formatter provider to specify an
explicit file path, instead of searching only on $PATH.

* Fix cabal formatter test flags
2024-03-11 17:23:29 +00:00
Jan van Brügge
03d418c92c
hls-notes-plugin: Initial implementation (#4126)
* hls-notes-plugin: Initial implementation

* hls-notes-plugin: add to feature list and plugin table

* hls-notes-plugin: Add more documentation comments

* hls-notes-plugin: Fix tests after #3846, add CI job

* hls-notes-plugin: Address review comments

* hls-notes-plugin: Allow Note definition within single line comments

* hls-notes-plugin: Improve "Note not found" error message

* hls-notes-plugin: Allow single line notes to be indented

* treewide: Add missing underscores to note definitions

* hls-notes-plugin: Wait until HLS is done in tests

* hls-notes-plugin: Fix tests on windows

The regex did not allow windows line endings in note definitions

---------

Co-authored-by: Jan Hrcek <2716069+jhrcek@users.noreply.github.com>
Co-authored-by: fendor <fendor@users.noreply.github.com>
2024-03-11 15:19:51 +00:00
dependabot[bot]
306dbc6591
Bump softprops/action-gh-release from 1 to 2 (#4133)
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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-03-11 10:03:06 +00:00
dependabot[bot]
9076f903da
Bump cachix/install-nix-action from 25 to 26 (#4132)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 25 to 26.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v25...v26)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 09:02:22 +00:00
Jan Hrcek
78e55d4bc4
Use Set.member instead of Foldable.elem (#4128) 2024-03-10 20:16:02 +01:00
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