Commit Graph

3121 Commits

Author SHA1 Message Date
Julian Ospald
9fe56f1f01
Migrate release CI to github (#3406)
* Migrate to github CI

* Parallelize GHC builds

* Avoid building local packages twice

* Prepare for building 9.2.6

* Fix build on darwin M1 9.0.2

* Drop build of windows 9.2.6 due to https://gitlab.haskell.org/ghc/ghc/-/issues/22961

* Drop 9.0.2 for darwin M1

* Fix build on windows by disabling ghc-check pkg ABI check

* Use git-archive to create src tarball in upload

* Build releases for 9.2.7

* Build src archive in github action

* Build on unknown-linux too

* Try to build GHC-9.4.4 for unknown linux on Fedora33

* Make sure hls-wrapper binary comes from GHC-8.10.7

---------

Co-authored-by: wz1000 <zubin.duggal@gmail.com>
2023-03-23 11:23:18 +00: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
Brandon Chinn
6e42e9ad7a
Support fourmolu 0.11 (#3533)
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2023-03-21 13:22:50 +00:00
Lei Zhu
b7cb76598e
Don't show lenses for TH generated instances (#3531) 2023-03-19 09:14:27 +00:00
fendor
014c8f9024
Remove hslogger from codebase (#3526)
Co-authored-by: Fendor <walross.power@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2023-03-18 14:46:00 +00:00
Michael Peyton Jones
adf6622479
Bump haskell/actions (#3520)
Hopefully this will help with the Windows issues.

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
2023-03-18 10:59:44 +00:00
dependabot[bot]
c75138017f
Bump haskell/actions from 2.3.3 to 2.3.6 (#3529)
Bumps [haskell/actions](https://github.com/haskell/actions) from 2.3.3 to 2.3.6.
- [Release notes](https://github.com/haskell/actions/releases)
- [Commits](https://github.com/haskell/actions/compare/v2.3.3...v2.3.6)

---
updated-dependencies:
- dependency-name: haskell/actions
  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>
2023-03-18 08:21:45 +00:00
cydparser
eebf3b2a68
Use GHC 9.2.7 in flake (#3527)
* Assign all Nix dev shells to `all-nix-dev-shells`

* Use GHC 9.2.7 in flake

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2023-03-17 18:02:05 +00:00
Zubin Duggal
385f0008a4 Use older version of http2 to avoid breakage with -haddock on 8.10 2023-03-17 19:02:45 +05:30
Zubin Duggal
b9565a1b5a Use hie-bios 0.12 2023-03-17 19:02:45 +05:30
dependabot[bot]
1ebb619d86
Bump cachix/install-nix-action from 19 to 20 (#3514)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 19 to 20.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v19...v20)

---
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>
2023-03-06 09:57:25 +00:00
Malvin Gattinger
2e7961932e
Docs: update Emacs section: add eglot with config example (#3509)
* Docs: update Emacs section: add eglot with config example

Based on the discussion at https://github.com/haskell/haskell-language-server/issues/3157

* Update docs/configuration.md

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>

---------

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2023-03-02 09:14:22 +00:00
Michael Peyton Jones
f8e954eb06
Eval plugin is now supported in 9.4 (#3508) 2023-02-28 09:56:46 +00:00
amesgen
4d5ce72cf2
Make the Ormolu plugin respect .ormolu fixity files (#3449)
when Ormolu ≥0.5.3.0
2023-02-26 22:39:47 +00:00
Pepe Iborra
50799fecb4
Fix lower bounds (#3501)
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2023-02-24 11:28:24 +00:00
cydparser
65f0d057d2
Update flake to GHC 9.2.6 and 9.4.4 (#3503)
* configuration-ghc-94.nix: Don't yolo anymore since packages work now

* Stop doing an extremely slow fetch of all-cabal-hashes

* Export an overlay that does not override the package set

* At least it works in nix on 9.4

* Allow ormolu-0.5.3

* Update flake to GHC 9.2.6 and 9.4.4

---------

Co-authored-by: Jade Lovelace <software@lfcode.ca>
2023-02-24 09:35:35 +00:00
Matthew Pickering
f63627fa81 Simplify implementation of eval plugin and make it work with GHC 9.4
The plugin was implemented by calling "load" which circumvents all of
HLSs caching mechanisms for interface files and linkables. Instead we
should work like the other typechecking functions which get all the
stuff we need using HLS rules and setup the HscEnv with all the state in
the right places.

The key part to this is setting up all the HPT modules with linkables if
they are depenedencies of the module we are trying to run a function
from.

- ban load functions from GHC driver

- Enable CI for hls-eval-plugin and fix a bug due to clearing of mi_globals
2023-02-22 06:33:22 +05:30
Julian Ospald
a73c07c51b
Bump versions and add changelogs for 1.9.1.0 (#3493)
* Bump versions and add changelogs for 1.9.1.0

* Fix build on windows by disabling ghc-check pkg ABI check

---------

Co-authored-by: Zubin Duggal <zubin.duggal@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-02-14 19:48:11 +00:00
wz1000
64e6e57957
Add 9.2.6 to ghc-version-support.md (#3494) 2023-02-14 17:28:17 +00:00
dependabot[bot]
b16b05f0af
Bump cachix/install-nix-action from 18 to 19 (#3490)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 18 to 19.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v18...v19)

---
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>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2023-02-14 13:22:49 +00:00
Michael Peyton Jones
efbf253d35
Experiment with loading matrix values from a file (#3481)
* Experiment with loading matrix values from a file

The goal here is to avoid duplication of e.g. which versions of GHC we
support.

This is an experiment at the moment.

* fix some warnings in hlint plugin
2023-02-13 16:17:01 +00:00
ners
d3a5ee1a6d
Expose makeDefaultHandleRecorder (#3485) 2023-02-12 19:50:13 +00:00
Michael Peyton Jones
059237be0a
Delete dead release workflow (#3482) 2023-02-09 19:24:08 +01:00
Michael Peyton Jones
d48cc0f831
Workaround ghcup runner issue (#3483)
* Workaround ghcup runner issue

* Try this
2023-02-08 17:51:31 +00:00
Matt Revelle
b8205fa76c
Filter generated Core variable names from hovertip documentation (#3316)
* Filter names from hovertip documentation which match patterns of generated Core variables.

* Added comment for isInternal function.

* Relocated list of OccName prefixes from the Completions plugin to the CoreFile module. Updated the check for GHC-generated OccName prefixes in AtPoint to use the shared list of OccName prefixes.

* Added test data and test for ensuring Core-generated variables are not included in hover info.

* Switched to using isEvidenceContext to filter out evidence bindings.

* Relocated list of OccName prefixes from the Completions plugin to the CoreFile module. Updated the check for GHC-generated OccName prefixes in AtPoint to use the shared list of OccName prefixes.

* Removed unused import.

* Relocated list of OccName prefixes from the Completions plugin to the CoreFile module. Updated the check for GHC-generated OccName prefixes in AtPoint to use the shared list of OccName prefixes.

* Removed unused import.

* Fixed incorrect definition of mkRecordSnippetCompItem introduced when rebasing.

* Add preprocessor check for GHC version before using isEvidenceContext. Updated related comment.
2023-02-07 16:03:12 +00:00
fendor
065957ece3
Use apply-refact 0.12.0 (#3469)
* Use apply-refact 0.12.0

* Limit ormolu version to < 0.5.3
2023-02-02 12:40:38 +00:00
Pepe Iborra
2b691b65cb
Add Inline code action to Retrie plugin (#3444) 2023-01-29 16:31:24 +01:00
wz1000
00f4e61da6
Two recompilation avoidance related bugs (#3452)
1. Recompilation avoidance regresses in GHC 9.4 due to interactions between GHC and HLS's implementations.
   Avoid this by filtering out the information that causes the conflict
   See https://gitlab.haskell.org/ghc/ghc/-/issues/22744.

2. The recompilation avoidance info GHC stores in interfaces can blow up to be
   extremely large when deserialised from disk. See https://gitlab.haskell.org/ghc/ghc/-/issues/22744
   Deduplicate these filepaths.
2023-01-26 14:25:26 +00:00
Pepe Iborra
2b6f603b6b
Fix ghc min bounds for hie-compat (#3456)
ghc 8.8 is no longer supported
2023-01-23 11:28:08 +00:00
Zubin Duggal
ec19079e52 Drop 9.4.3 and 9.2.4 for all platforms 2023-01-23 15:23:30 +05:30
Zubin Duggal
571fccb38f Update haskell/actions 2023-01-23 15:23:30 +05:30
Zubin Duggal
6221cbc928 Add CI for 9.4.4 2023-01-23 15:23:30 +05:30
Michael Peyton Jones
ddc67b2d4d
Support stylish-haskell and ormolu in 9.4 (#3446)
* Update index-state

* Enable ormolu on 9.4

* Enable stylish-haskell on 9.4

* Update flake.lock

* Declare 9.4 to be fully supported

* Enable floskell for 9.4
2023-01-09 21:08:08 +00:00
George Thomas
6cf57745b4
Correct Fourmolu plugin's lower bound on Ghcide (#3443)
Due to the use of `usePropertyAction`.
2023-01-07 15:31:32 +00:00
Michael Peyton Jones
05051866b2
Delete the Brittany plugin (#3441)
It's unmaintained and not popular.

Fixes #3346.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-06 13:36:42 +00:00
wz1000
05b248dfac
Bump hls-call-hierarchy-plugin (#3427) (#3440) 2023-01-05 09:53:49 +00:00
Jaro Reinders
ce6a516824
Update ghc-version-support.md (#3428)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-02 18:30:09 +00:00
openingnow
639668337b
Update list of unsupported plugins (#3429)
* Update list of unsupported plugins

I checked fourmolu and hlint work fine with ghc 9.4. Other plugins are updated according to the following issues: 

ghc 9.2: https://github.com/haskell/haskell-language-server/issues/2982
ghc 9.4: https://github.com/haskell/haskell-language-server/issues/3190

* Also mark `retrie` as compatible with ghc 9.2

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-02 16:55:25 +00:00
maralorn
cf380338d1
various plugins: Add testdata to sdist (#3431) 2023-01-02 14:44:22 +00:00
Michael Peyton Jones
8f0d940445
Document exception handling in Actions/Rules (#3407)
* Document exception handling in Actions/Rules

I also took the liberty of removing the `MonadFail` instance for
`Rules`, since failing in `Rules` seems much worse as it won't
automatically be caught. There was only one use of that, which now has
an appropriately threatening comment.

* Tweak

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2023-01-02 12:51:56 +00:00
Jens Petersen
90d17fe1bc
ghcide needs prettyprinter 1.7 (#3430) 2022-12-30 11:18:30 +01:00
Kyriakos Papachrysanthou
d621fc4b14
Add qualified imports in postfix position when ImportQualifiedPost and WarnPrePositiveQualifiedModule are set (#3399)
* Import qualified in postfix when applicable

* Dont import `EnumSet`

* Add `QualifiedImportStyle`

* Add qualified import test

* Ignore functional code action tests for windows-9.4.2

The test fails with:

test\functional\FunctionalCodeAction.hs:116:
expected: "Not in scope: \8216Control.when\8217\nNo module named \8216Control\8217 is imported."
but got: "Variable not in scope: when :: Bool -> IO () -> IO ()"

Seems like diagnostics for missing variables differ

* Add `importQualifiedPostTests`

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-27 23:41:23 +00:00
Tomasz Batko
6e76fce3d8
hls-class-plugin - Add placeholders for all class methods (#3394)
* #3017 WIP: Add Action for all missing class methods

* #3017 WIP: Filter out equivalent suggestions

* #3017 Fix CodeAction title, adjust tests

* #3017 Rename functions

* #3017 Update demo gifs

* 3017 Stylish-haskell

Co-authored-by: Lei Zhu <julytreee@gmail.com>
2022-12-27 20:22:51 +00:00
wz1000
472947cdb9
Add 9.4.4 binaries and drop 9.4.2 (#3417) 2022-12-27 14:54:41 +00:00
Zubin Duggal
1916b5782d Add 9.4.4 binaries and drop 9.4.2 2022-12-26 16:09:25 +05:30
Zubin Duggal
2df68246f8 Prepare release 1.9.0.0 2022-12-26 16:09:25 +05:30
Michael Peyton Jones
dfd8f0b402
Add a mergify action to update PRs (#3418)
After a bit of digging I've worked out what's up with mergify. It's
still working fine, but it's not updating PRs very often now. The reason
for that is that it updates PRs that are in the queue, but to get
_into_ the queue you have to pass CI, which is hard ATM because of our
flaky CI. So we can add a separate update rule that just updates the
labelled PRs, so that they are at least kept up-to-date with master.
2022-12-22 19:42:20 +00:00
wz1000
e7b1ef0c95
Enable plugin tests in CI for GHC 9.4 (#3420)
* Run 9.4 tests for enabled plugins

* Fix 9.4 tests

* Fix splice plugin
2022-12-22 13:45:29 +00:00
wz1000
3b05bde23b
Clear the mi_globals field when generating an iface (#3414)
GHC populates the mi_global field in interfaces for GHCi if we are using the bytecode
interpreter.
However, this field is expensive in terms of heap usage, and we don't use it in HLS
anywhere. So we zero it out.
The field is not serialized or deserialised from disk, so we don't need to remove it
while reading an iface from disk, only if we just generated an iface in memory

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-12-21 22:07:29 +00:00
wz1000
881d23ba8d
Compute the source hash before the preprocessor runs because this is (#3415)
how GHC does it.

This reduces spurious rebuilds of modules using CPP on GHC 9.4
2022-12-21 20:05:32 +00:00