Commit Graph

456 Commits

Author SHA1 Message Date
dependabot[bot]
f3372714cd
Bump actions/cache from 2 to 3
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-01 02:22:38 +00:00
Dmitry Pogodin
488d287455
Add Github precommit workflow (#3060)
* Add Github precommit workflow

* Reformat remaining files

* Don't shorten project name

* Fix pre-commit file exclusion pattern
2022-07-29 02:03:09 -04:00
Gregory Gerasev
078fc14dda
Stan integration #258 (#2908) 2022-07-28 02:11:31 +03:00
Michael Peyton Jones
6b2239f408
Update issue templates (#3044)
- Add a support issue template
- Ask questions about versions of GHC and HLS
- Add some heuristic details fields to help people pick an issue type
2022-07-18 11:09:40 +00: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
Michael Peyton Jones
efcb8e2589
Set up partial functions ratchet (#2974)
* HLint partial functions

* Delete commented out stuff

* Delete flag-based warnings, unclear they add much

* Delete DA-specific hints

* Delete extra cpp args

* Delete extension options relating to dead build system

* Don't bother trying to restrict CPP for now, it's everywhere

* Make the hlint job fail if there are any errors

* Fix for rebase, add unsafePerformIO and fold1 variants

* Add some more indexing functions

* Try turning off hlint on this test file

* Add .hlint.yaml file for hls-hlint-plugin

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-06-24 10:46:35 +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
Pepe Iborra
6524122927
Expose runtime metrics via EKG (#2267)
* Collect metrics and expose an EKG server

* register gc metrics locally

* getDatabaseKeys

* fixups

* Abstract monitoring and put EKG behind a Cabal flag

* Add CI for the new flag

* fix double ifdef

* link to GHC docs for eventlogs

* log when stopping the EKG server

* Allow CPP in modules

* Add doc comments

* Apply suggestions from code review

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

* Compat. with ghc 9.2

* use an ekg-json snapshot that preserves compat. with ghc 8.x

* confine CPP to the EKG module

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-05-06 09:58:18 +00:00
Pepe Iborra
b6d87c564d
no longer disable -dynamic builds (#2885) 2022-05-05 22:53:42 +00:00
Pepe Iborra
8cbefb71bc
Consolidate all cabal.project files (#2866) 2022-05-05 15:07:51 +01:00
Lei Zhu
796b292f4f
Fix hls-call-hierarchy-plugin tests (#2888)
* Wait for kick done

* Enable test on Windows

* Wait for kick done
2022-05-05 09:16:24 +00:00
Lei Zhu
2a8d24460e
Enable hls-eval-plugin test on ghc-9.2.2 (#2893) 2022-05-03 17:41:04 +00:00
Pepe Iborra
2bd9ab4e3c
simplify hlint plugin Cabal descriptor (#2867) 2022-05-01 20:17:13 +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
dependabot[bot]
a4b8e645a2
Bump haskell/actions from 1 to 2
Bumps [haskell/actions](https://github.com/haskell/actions) from 1 to 2.
- [Release notes](https://github.com/haskell/actions/releases)
- [Commits](https://github.com/haskell/actions/compare/v1...v2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 03:05:36 +00:00
Zubin Duggal
4a761c64ab Fix hackage workflow 2022-04-21 17:09:49 +05:30
Zubin Duggal
55ea102304 Remove references to cabal-ghc921.project
It has been changed to `cabal-ghc92.project`
2022-04-21 14:08:10 +05:30
Lei Zhu
fbcd3a46d1
Enable hls-stylish-haskell-plugin with ghc 9.2 (#2836)
* Enable hls-stylish-haskell-plugin on ghc-9.2

* Remove sha256 notation

* Update project file

* Update nix file

* Enable tests

* update index-state

* Rerun ci

Co-authored-by: wz1000 <zubin.duggal@gmail.com>
2022-04-19 13:57:34 +00:00
dependabot[bot]
db3dd7dc27
Bump fkirc/skip-duplicate-actions from 3.4.1 to 4.0.0 (#2833)
Bumps [fkirc/skip-duplicate-actions](https://github.com/fkirc/skip-duplicate-actions) from 3.4.1 to 4.0.0.
- [Release notes](https://github.com/fkirc/skip-duplicate-actions/releases)
- [Commits](https://github.com/fkirc/skip-duplicate-actions/compare/v3.4.1...v4.0.0)

---
updated-dependencies:
- dependency-name: fkirc/skip-duplicate-actions
  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>
2022-04-18 20:17:27 +00:00
dependabot[bot]
6d8c1ba65b
Bump cachix/install-nix-action from 16 to 17 (#2823)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 16 to 17.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v16...v17)

---
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: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-04-14 12:06:53 +01:00
dependabot[bot]
1079d077e7
Bump actions/upload-artifact from 2 to 3 (#2822)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  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>
2022-04-11 11:21:40 +00:00
dependabot[bot]
5b8d5f85c8
Bump actions/download-artifact from 2 to 3 (#2821)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 2 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  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>
2022-04-11 10:48:02 +01:00
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
dependabot[bot]
0a787666b9
Bump actions/cache from 2 to 3 (#2806)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  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>
2022-03-28 12:29:17 +01: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
fendor
a9ae9d100b
Delete HLS installer scripts (#2773)
* Delete HLS installer scripts

Prefer ghcup for installations from source.

* Use simpler ghcup syntax

Co-authored-by: Julian Ospald <hasufell@posteo.de>

Co-authored-by: Julian Ospald <hasufell@posteo.de>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-03-11 15:11:31 +00:00
dependabot[bot]
7e361f0a08
Bump actions/github-script from 2 to 6 (#2730)
Bumps [actions/github-script](https://github.com/actions/github-script) from 2 to 6.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v2...v6)

---
updated-dependencies:
- dependency-name: actions/github-script
  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: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-03-10 18:28:15 +00:00
Pepe Iborra
6a8dc225ae
Implement cycle detection in hls-graph (#2756) 2022-03-08 10:34:57 +00:00
Nick Suchecki
82c15353ab
Fix Change Type Signature Plugin test suite for 9.2.1 (#2761)
* Add change-type-signature test suite and enable alternate-number-format for 9.2

* Revert 9.2.1 enable tests for alternate-number-format

* Clean up test file

* GHC 9.2.1 test fixes

* -Wall fixes

* Add  to fix test failures

* Bump Version
2022-03-07 19:51:56 +00:00
dependabot[bot]
d735c37a1e
Bump actions/checkout from 2 to 3 (#2759)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  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>
2022-03-07 11:00:34 +00:00
Nick Suchecki
fbdbbd639d
Fix test failure for AlternateNumberFormat (#2752)
* Fix test failure for AlternateNumberFormat

* Update AlternateNumberFormat.hs

* Update AlternateNumberFormat.hs

* Add -Wall

* Fix 8.8 compile error

* Remove unneccessary tests

* Bump plugin version
2022-03-07 02:01:01 +00:00
Lei Zhu
e29f61f17d
Fix hls-class-plugin on ghc-9.2 (#2733)
* Fix codeAction on 9.2

* Enable test

* pointCommand: MIN_VERSION_ghc to 9.2

* Specify version

* Fix edit command

* Enable class plugin in cabal

* Comment addWhere

* Unify the method of obtaining identifiers

* Remove CPP

* Remove compile flag

* Rewrite filter with more restricts

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2022-03-06 16:15:23 +00:00
Zubin Duggal
0d4f98eff2 Disable call-hierarchy plugin tests on windows 2022-03-02 20:00:54 +05:30
Zubin Duggal
9b61a754bf Disable rename plugin tests on windows 2022-03-02 20:00:54 +05:30
Guillaume Bouchard
96ea854deb
Nix flake fix dev shells (#2655)
* nix: ghc92: ignore broken plugins

* nix: use current ghc for tools in the shell

Theses tools are pulled in the shell, but we don't need them to match
the GHC version used for development. Said otherwise, as long as we use
a working `cabal-install` to build with GHC 9.2, we don't care if that
cabal-install was built with GHC 8.10.

This gives more chance for theses tools to work and be in the binary
cache of nixpkgs.

* nix: disable shake-bench for ghc921

* nix: fix ghc 9.2 shell

* nix: explicit cabal project in devShell

Using alias, we get the "correct" behavior when typing `cabal build` in
the nix-shell, it points to the current cabal-project file.

* nix: remove special case for different ghc versions

* nix: move implicit-hie-cradle as a flake input

* nix: restore dev shell

This commit restores a working behavior for `nix-shell` or `nix
develop`, for all supported GHC versions.

When entering a `nix-shell`, or `nix develop
.#haskell-language-server-ghcXxX-dev` you will get an environment with
all the dependencies needed to run `cabal build`.

Haskell dependencies will be built by cabal instead of nix. This may be
more robust compared to a shell where dependencies are built by nix:

- It won't try to build any dependency with nix. This mean that it won't
  benefit from nix caching, but on the other hand, it will perfectly
  match the cabal plan.
- The nix shell may fail to start if an (possibly unneeded) dependency
  was failing to build.

Entering nix-shell also generates an alias command `cabal_project` which
runs cabal with the correct project file if needed (e.g. for GHC 9.0 and
9.2). Users are notified with a message when entering the shell.

The old behavior (i.e. where dependencies are built with nix) is still
available with `nix develop .#haskell-language-server-xxx-dev-nix` (i.e.
suffix the name of the shell with `-nix`).

* nix: New entries which build all target at once

All HLS version can be built with `nix build
.#all-haskell-language-server`, and all development shells with `nix
build .#all-dev-shells`.

I had to workaround a limitation in `nix build` which is not able to
build multiples targets, instead I used linkFarmFromDrvs.

All packages and shells are now named with a unique package name
containing the GHC version.

* nix: Build all devShells and all binaries in CI

* nix: build HLS with dynamic linking

Related to #2668.

This fixs the build, however, because now HLS is dynamicly linked, it
pulls GHC as a dependency. The uncompressed closure size is now `~6GiB`.

* nix; fix CI command

* nix: only build dev shell with nix packages for current GHC version

* Another tentative to fix the build

* fix: Eval and alternate number format works with ghc 9.2

* fix CI build

* ANother tentative fix
2022-02-16 12:24:22 +00:00
Julian Ospald
34e9914f4e
Fix releasing (#2707)
Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-15 00:00:23 +00:00
Javier Neira
6cdd5bebbf
Set -dynamic in cabal.project (#2688)
To fix the build workflow

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-02-07 12:37:04 +00:00
Javier Neira
20a5d5d59b
Optionally publish packages definitely in the hackage workflow (#2689)
* Optionally publish packages defintely

Via a manual run setting publish=="true"

* Update hackage release instructions
2022-02-03 22:52:57 +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
Kobayashi
ffd0f346d8
fix positionInRange (#2625)
* add a failing test case for positionInRange

* fix positionInRange in PluginUtils

* add hls-plugin-api to CI

* fix ci

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-01-22 17:28:26 +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
Javier Neira
255803531a
Make work stack-9.2.1.yaml and enable pedantic (-WError) for cabal (#2606)
* Enable brittany for ghc-9.0.2

* Make works using cabal freeze

* Add stack 9.2.1 to ci

* Use new *molu versions

* Enable rename for stack 9.2.1

* Use last ghc-lib

* Use correct boot pkgs

* Use last ghc-exactprint

* Reorganize and use lens-5.1

* update retrie

* Comment class plugin package

* Handle Nothing case

* Restore ghc-typelits deps

* More non-exhaustive patterns

* More non-exhaustive patterns

* Set pedantic (-WError) true for cabal

* Remove pedantic as we set it out in cabal.project

* Not set pedantic for ghc-9.2.1

* Set pedantic in cabal.project's

* More non-exhaustive patterns

* Not set pedantic for ghc-9.0.1

* More incomplete patterns

* Fix WErrors

* Dodgy import

* Correct CPP conditions

* Not MonadFail in Prelude

* Fix more warnings

* Restore missing fun

* unused imports

* Enable refine imports

* more fixes

* Enable brittany in nix for 9.0.1

* Use newer prettyprinter

* Return to master

* Enable tactics in stack-9.2.1.yaml

* Enable pedantic in ci

* Avoid deprecation warning with CPP �

* Use default prettyprinter

* Update refinery for ghc-9.2.1

* Ignore deprecations

* Use dev version of ghc-source-gen

* disable wingman for 9.2.1

* Enable wingman for 9.0.2

* disable tactic with flag

* yaml grammar

* Use setup-build action

* Correct workflow

* Build flags for al major os's

* The integer twaek is needed for the solver

* Disable tests beforehand

* flags only affect local packages

* Exclude 8.6.5

* Exclude 8.8.4
2022-01-20 12:38:21 +00:00
Sandy Maguire
d640d13984
GHC-9.0 support for hls-tactics-plugin (#2581)
* Initial partially broken ghc9 support for tactics

It compiles and most tests succeed, but some fail.
In particular, the ones where it should suggest `show` fails to find
that as a possible solution and fails to find evidence for `Show a`.

* Enable tactics plugin for nix as well

* Wingman does support ghc9 now

* Fix stack support for tactics ghc-9.0.1

* Enable tests for tactics on ghc-9 on ci

* Actually enable tactics for ghc-9 on nix

* Wingman: Improve test failure messages

Previously when wingman fails to find a solution, the test failure
would say "Timed out when waiting for a message".
Now it instead prints the error message from wingman.

* Get theta

* Make wrapper theta discovery more reliable

* Fix AutoThetaRankN

* Fix FmapJoin and FmapJoinInLet

* Fix MetaBegin

* Cleanup

* Fix merge

More fixing the merge

No, seriously fix the merge

Fix a broken merge

* Need a comma

* Try a better ConPatIn

* Oops

* its a nightmare

* i hate ci

* ok that fixes the conpat

* Maybe this is the end of it

* ci

* refinery

* undo some changes

* no more tctypes?

* maybe it builds now

* omg

* om F g

* expect fail on 9.2

* fix

* fix again

Co-authored-by: Andreas Källberg <anka.213@gmail.com>
Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2022-01-19 12:11:20 +00: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
mrgutkun
5714207bfe
[ghc-9.2] Fix qualify-imported-names plugin (#2600)
* [ghc-9.2] Fix qualify-imported-names plugin

* Drop default-true plugin flags from stack-9.2.1.yaml
2022-01-17 19:36:18 +01: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
Pepe Iborra
87fb2e0e04
[ghc-9.2] Fix rename plugin (#2593)
* Introduce a Compat layer for retrie Annotated type

* Use GetAnnotatedParsedSource in rename plugin

We already have a cached delta AST at hand

* fix build issues

* remove debugging traces

* Fix hlint
2022-01-16 19:18:45 +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
Pepe Iborra
4386396624
Build with GHC 9.2 (#2503)
* WIP

* progress

* enable 9.2 in CI

* Sort out some compatibility issues (#2511)

* fix mkPrintUnqualifiedDefault

* fix qualified idents

* Fix a few more ghc compats

* Add new orphans

* Fix runtime APIs

* HsParsedModule

* export GHC.Hs.Utils

* 9.2 compat for unloading and hie file generation

* hlint fix

* Remove 'setupFinderCache' as its never actually used

* 9.2 compat for Development.IDE.Core.Compile

* Stub out 'getDocumentation' on GHC 9.2 (Requires a reimplementation in terms of in-tree annotations)

* Expose binds

* Remove a bit of CPP by refactoring it into Compat layer

* Progress on ghc-exactprint stuff

The Exactprint module compiles, but code actions are the next focus.

* Fix compile on 8.10

* 9.2 compat for CodeAction Exactprint

* 9.2 compat for Outline

* 9.2 compat for Pragmas plugin

* Get the rest compiling with 9.2

* WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE

This hook starts caching pipeline inside of the PR.
If this got merged - all PRs would start to run caching workflow (which is
undesirable, because of platform limitations)

* disabling {test,bench} to properly heat-up the cache

`index-state` change means nothing, but allow to run increment action on
dependency cache pile (as otherwise cache stays idempotent to its key id).

* CI: index-state: +1s refresh

Somehow previous run got early termination. Seems like some GitHub bug, since
cache-hit promises to True only on direct key hit (& we had indirect).

Maybe second time the charm.

* CI: fix early termination

GitHub accepted previous code, & did passed the steps, but somehow ... long
story short, it was pretending to have early termination working, while it just
was always skipping those steps silently.

So, `index-state` needs another +1s.

* WIP: PLEASE, DROP BEFORE MERGE

* WIP: PLEASE, DROP BEFORE MERGE

This reverts commit 064a9b7995.

* WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE

This reverts commit 208f4844f4.

* WIP: PLEASE, DROP THIS COMMIT BEFORE MERGE

This reverts commit ba4d618ba5.

* CI: index-state advance to save cache anew

* CI: apparently GitHub uses alias cp='cp -i'

Another day, another bug.

* WIP: PLESE, REVERT TO TEST ALL GHCs

* CI: index-state +1s

* WIP: PLESE, REVERT TO TEST ALL GHCs

* CI: index-state +1s

* WIP: PLESE, REVERT TO PASS HLINT CI REQUIREMENTS

* Enable tests for ghc-9.2.1

* Use cabal-ghc921.project

* Enable tests for all ghcs

To check changes for ghc-9.2.1 do not break other ghcs

* Address or skip hlint

* Last hlint fixes

* Fix loop when setting DynFlags

* Filter out evidence variables in documentHighlight

* Fix getFlds

* fix GRE

* fix formatting

* fix Compat build in 9.0

* fix collectHsBindsBinders

* remove redundant WarnMsg local typedef

* showSDocForUser

* redundant import

* HsLet

* LetStmt

* fix Completions build

* bump cabal index state

* Literals: replace argument patterns by field patterns

Sadly this is not enough to fix the build

* QualifyImportedNames: fix build with ghc <9.2

* fix <9.2 build Splice plugin

* fix <9.2 build QualifyImportedNames plugin

* Fix <9.2 build Wingman

* fix build example

* Disable a whole bunch of plugins

* Move windows test into the matrix

* Make consistent plugin handling

package commented out <-> flags <-> test suite

* Add a not working stack.yaml for ghc-9.2.1

It starts to build though

* Remove wrong comma

* Restore primitive allow-*

* Use correct UnitId when constructing InstalledModules

* Fix 8.8 build

* Fix hls-test-utils

* Build explicit imports plugin

* Drop Windows build blocked on unix-compat

* bump Cabal index and simplify constraints

* Add comment

* Use GhcSessionDeps in getHieAst

* Use hsConDeclsBinders in Outline generation

* Use the right session in typecheckModule

* Restore some cases in Outline

* Fix Outline build with GHC <9.2

* Remove noisy logMessage notifications in tests

I have never found these useful and they make it much harder to read logs. If there is a test that needs them, please use a custom logger instead of forcing this madness on everyone.

* Build ghcide test and bench suites with 9.2

* Revert "Merge branch 'master' into ghc-9.2"

This reverts commit daf43c86e8, reversing
changes made to f951004021.

* The redundant constraints warning has changed in 9.2

* Fix code action regression

* fix 9.2 ghcide build

* Fix completion snippets

* Fix mismerge

* Bifunctor instance for GenLocated

* Build rename plugin with GHC 9.2

* Helpers for tracing ExactPrint ASTs

* Fix exactprint code actions

* Enable import lens plugin

* WIP test run changes

* Fix GHC 9 build

* Undo WIP test changes

* Fix GHC 8.8 build

* Fix 8.6 build

* Fix another exactprint regression

* Add source repository with ghc-exactprint fixes

* Add source repository for retrie (needed for fixed ghc-exactprint)

* fix ghc <9.2 build

* Another exactprint fix

* Fix benchmarks

* Another exactprint fix

* Disable a plugin test (plugin not compatible anymore)

* Enable windows build

* Fix multiple components by using consistent UnitIds

There are multiple sources of truth for the home unit id now, in the DynFlags and in the hsc_units

* Improve error handling for initPlugins

* Fix two hover tests

* Remove retrie and ghc-exactprint source repos

* Fix version of direct-sqlite

Not sure why this is needed, but without it Cabal is selecting an older version
which fails to build with 9.2

* Fix ci update hackage index

* This test is broken because GHC 9.2 built-in libraries lack docs

The interface files have no docs, checked via:

    ghc --show-iface ~/.ghcup/ghc/9.2.1/lib/ghc-9.2.1/lib/x86_64-osx-ghc-9.2.1/base-4.16.0.0/Data/Functor.hi

* Sanitize hiding tests

These tests are reimplementing runWithExtraFiles - let's just use it

* Disable another test

* Fix outline

* Revert "Sanitize hiding tests"

This reverts commit 4f016ddca2.

* Extract out ci build setup

* Correct action path

* Add required shell property

* Remove unused cabal version

* Update .github/actions/setup-build/action.yml

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

* Update .github/actions/setup-build/action.yml

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

* Update .github/actions/setup-build/action.yml

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

* Fix remaining tests and some warnings

* Update .github/actions/setup-build/action.yml

Co-Authored-By: @michaelpj

* Copy alt project file unconditionally

* Make freeze strict

* Actually fix tests

* remove unnecessary? allow-newer

* Drop no longer needed source repo for th-extras

* Add module header comments

* Fix or remove commented out code

* more commented out code

* Disable a couple of func-test tests

* All func-test tests passing now

* fix test matrix

* Update cabal-ghc921.project

* do not test class plugin

* Mark hover test broken in Windows and Mac

* Fix hls-pragmas-plugin test suite

* disable testing of refine imports plugin

* disable rename plugin

* Do not test qualify imported names plugin

* addressing hlint suggestions

* Revert hlint change that breaks due to CPP

Co-authored-by: Alan Zimmerman <alan.zimm@gmail.com>
Co-authored-by: Zubin Duggal <zubin.duggal@gmail.com>
Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
Co-authored-by: jneira <atreyu.bbb@gmail.com>
Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-01-12 21:57:36 +00:00
Javier Neira
2625689ad4
Add support for brittany (needs aeson-2) and floskell with ghc-9.0.1 (#2551)
* Enable tests for brittany and 9.0.2

* Enable tests for floskell plugin

* cabal-ghc901.project: naively enable brittany

* haskell-language-server.cabal: bump brittany flag <(9.0.1->9.2.1)

* Trying to add support for brittany

* Use last hackage floskell version

* Activate floskell in func-test suite

* Restrict brittany in hackage for ghc<9.0.1

* Adapt to Aeson.Key

* Update lsp source repo package

* Refer pr for butcher

* Add missing prefix

* Adapt to aeson-2 (incomplete)

* Use compat module

* Support for aeson-2 and extra-1.7.10

* Remove lsp

* Allow newer aeson for stylish-haskell

* Add needed import for non windows

* Remove insertJson and toJsonKey

* Update cabal-ghc901.project

* Missing import

* Avoid CPP by using lens-aeson

* Update hls-plugin-api/src/Ide/Plugin/ConfigUtils.hs

* Use ghcide compat module

* Use type alias in cpp

* Fix stack build for ghc-8.6.5

* Use lens-aeson key

* Use lens-aeson in func-test

* Fixup shake-bench

* Update docs

* Switch to lens ix

* Try this

Co-authored-by: Anton-Latukha <anton.latukha@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-01-12 16:24:53 +00:00
Javier Neira
e6227440b4
Reuse build setup using a dedicated github action (#2563)
* Extract out ci build setup

* Correct action path

* Add required shell property

* Remove unused cabal version

* Update .github/actions/setup-build/action.yml

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

* Update .github/actions/setup-build/action.yml

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

* Update .github/actions/setup-build/action.yml

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

* Update .github/actions/setup-build/action.yml

Co-Authored-By: @michaelpj

* Copy alt project file unconditionally

* Make freeze strict

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2022-01-05 14:30:32 +00:00
Javier Neira
a8aa016f78
Fix ci update hackage index (#2562)
* Fix ci update hackage index

* Make effective freeze file hash

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
2022-01-04 14:20:29 +00:00
Javier Neira
1849a878b7
Fix freeze cache key correctly (#2560)
* Update cabal before freeze

* Use step outputs for cache key

* Remove rm freeze file

* Move cabal update for flags

* Flags workflow needs rm freeze file
2022-01-03 11:04:59 +00:00
Pepe Iborra
46dfbd1480
Restore TemplateHaskell pragma in hls-graph (#2549)
* restore TemplateHaskell pragma

not 9.2 specific, but required for file_embed flag

* CI: add flags workflow

* hls-graph: STM.Stats: fx stm-stats build

* hls-graph: Internal.Types: mk 8.6.5 code as such

* hls-graph: Internal.Types: treat MonadFail

* CI: {caching, test, bench, flags}: fx freeze phase

* hls-graph: Internal.Types: fx TVar import

* CI: {caching, test, bench, flags}: ('' -> "")

Tripped-over the syntax highlighting & the DHall work (which uses `''` for QuasiQuoting stuff)

* Apply suggestions from code review

Co-authored-by: Javier Neira  <atreyu.bbb@gmail.com>

* CI: flags: post-review fxs

Co-authored-by: Anton-Latukha <anton.latukha@gmail.com>
Co-authored-by: Javier Neira  <atreyu.bbb@gmail.com>
2022-01-01 00:50:19 +00:00
Javier Neira
2eaa2a4db0
Remove cabal.project.freeze files in workflows after computing the cache key (#2552)
* Enable tests for brittany and 9.0.2

* Enable tests for floskell plugin

* Remove cabal.project.freeze

* don't test Brittany for ghc-9.0.1

* restore src cache keys

* restore src cache keys

* remove freeze cache key

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
2021-12-31 19:01:50 +00:00
Michael Peyton Jones
7518a3a7eb
Upgrade to new version of lsp libraries (#2494)
* Update to latest version of lsp libraries

* Compute completions on kick

This is not only for faster completions.
 It's also needed to have semi-fresh completions after editing.
This is specially important for the first completion request of a file - without this change there are no  completions available at all

* Emit LSP custom messages on kick start/finish

useful to synchonize on these events in tests

* Fix completions tests after https://github.com/haskell/lsp/pull/376

* Restore cabal update with comments

* Use new lsp in stack 9.0.1

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: jneira <atreyu.bbb@gmail.com>
2021-12-29 09:45:25 +01:00
Anton Latukha
f47bb47e97
CI: caching: closer match work/CI guarantees (#2536)
* CI: caching: do `bench` & `test` separately

`cabal v2-build all --enable-tests --enable-benchmarks` inferres 1 version per dep
keeping all targets.

People (frequently) & CI do `test` & `bench` separately.

So `all tests` & `all bench` deps may not end up.

Even current code does not match the CI guarantees, as all plugins get `test`
separately, so their deps can not match-up.

`caching` should not assume guarantees bigger then provided.

* CI: caching: rm workaround

This workaround was not addressing the CI behaviour.

* CI: {caching, test, bench}: output `freeze` or warning

* CI: {caching, test, bench}: m v2-update unification

* CI: caching: do bench caching only for what gets used

Efficient use of available space.

* CI: caching: fx benchmark caching step

Co-authored-by: Javier Neira  <atreyu.bbb@gmail.com>

* CI: {caching, test, bench}: `haskell/actions/setup` does the update

* CI: caching: m fx

Co-authored-by: Javier Neira  <atreyu.bbb@gmail.com>
2021-12-27 20:21:58 +00:00
Javier Neira
48c6eb1d08
Set an unique name for Hlint job (#2544)
* Update hlint.yml

* Correct typo

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
2021-12-27 17:58:17 +00:00
Anton Latukha
b35420203b
CI: linting (#2538)
* CI: {caching,test,bench}: paths layout

* CI: nix: paths layout

* CI: build: organize step names

* CI: build: organize step names
2021-12-26 11:22:59 +00:00
Anton Latukha
3e17c4f2c9
CI: add hlint workflow (#2537)
* CI: add hlint workflow

* CI: hlint: update to action

This is what `fmt.sh` runs.

* CI: hlint: use version 3.3.1

* CI: hlint: fix args

* CI: hlint: use 3.3.4
2021-12-25 18:19:00 +00:00
Anton Latukha
2aaa5b8278
CI: {caching,test,bench}: mk cache aware of package dep versions (#2532)
* CI: {caching,test,bench}: mk cache aware of package dep versions

1. CI caches 3rd patry dependency binaries.

2. That is why we do not want to trigger on all `.cabal` changes. We want to
cache only when changes in `.cabal` descriptions lead to changes in versions of
deps used, or in their compilation flags. `freeze` files:

For example the bits of the resulting `.freeze` file:

active-repositories: hackage.haskell.org:merge
constraints: any.Boolean ==0.2.4,
             ...
             any.HsYAML ==0.2.1.0,
             HsYAML -exe,
             any.HsYAML-aeson ==0.2.0.1,
             HsYAML-aeson -exe,
             any.JuicyPixels ==3.3.6,
             JuicyPixels -mmap,
             any.MemoTrie ==0.6.10,
             MemoTrie -examples,
             ...
             any.QuickCheck ==2.14.2,
             QuickCheck -old-random +templatehaskell,
             aeson -bytestring-builder -cffi -developer -fast,
             ...
             any.aeson-pretty ==0.8.9,
             aeson-pretty -lib-only,
             bifunctors +semigroups +tagged,
             any.blaze-textual ==0.2.2.1,
             blaze-textual -developer -integer-simple +native,
             ...
             any.brittany ==0.13.1.2,
             brittany -brittany-dev-lib -brittany-test-perf,
             ...
             any.clock ==0.8.2,
             clock -llvm,
             any.cmdargs ==0.10.21,
             cmdargs +quotation -testprog,
             ...
             any.comonad ==5.0.8,
             comonad +containers +distributive +indexed-traversable,
             ...
             any.hashtables ==1.2.4.2,
             hashtables -bounds-checking -debug -detailed-profiling -portable -sse42 +unsafe-tricks,
             haskell-language-server -alternatenumberformat +brittany +callhierarchy +class +eval +floskell +fourmolu +haddockcomments +hlint -ignore-plugins-ghc-bounds +importlens +modulename +ormolu -pedantic +pragmas +qualifyimportednames +refineimports -rename +retrie +splice +stylishhaskell +tactic,
             ...
             any.hlint ==3.2.7,
             hlint -ghc-lib +gpl -hsyaml +threaded,
             hls-eval-plugin -pedantic,
             hls-graph -embed-files -pedantic -stm-stats,
             hls-hlint-plugin -ghc-lib -hlint33 -pedantic,
             ...
             any.integer-logarithms ==1.0.3.1,
             integer-logarithms -check-bounds +integer-gmp,
             ...
             any.lens ==5.0.1,
             lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy,
             ...
             any.scientific ==0.3.7.0,
             scientific -bytestring-builder -integer-simple,
             any.semigroupoids ==5.3.6,
             semigroupoids +comonad +containers +contravariant +distributive +tagged +unordered-containers,
             any.semigroups ==0.19.2,
             semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers,
             ...
             any.transformers-compat ==0.6.6,
             transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
             ...
             any.vector ==0.12.3.1,
             vector +boundschecks -internalchecks -unsafechecks -wall,
             any.vector-algorithms ==0.8.0.4,
             vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks,
             ...
index-state: hackage.haskell.org 2021-11-29T12:28:17Z
```

You got the idea. `freeze` collects stuff for dependencies.

I also checked - it solves & collects all package configuration across all
subprojects in one file.

* CI: {caching,test,bench}: freeze: allow to fail

Before we not had this at all.

Now - most cases would use it.

But for example, all HLS subprojects can not solve single version of deps for
GHC 9.0 at once.

And depending on `.cabal` is not the right way, as it means to account of only 1
configuration of many in the project.

* CI: {caching,test,bench}: fx cache keys

* CI: {caching,test,bench}: freeze: output result into log

* CI: caching: add workaround to allow last step to fail

* CI: {caching,test,bench}: use only freeze file hash
2021-12-24 16:34:34 +01:00
Anton Latukha
ab8c52b097
CI: caching: keep-going (#2535)
This solves the `build all` problem when all projects can't infer the consitent
package version.

Also would allow caching workflow on manual start - to work & cache in a broken
or complex PRs.
2021-12-23 21:36:00 +00:00
Javier Neira
9797e1be9d
Test hls-pragmas-plugin (#2530)
Dont know why it is not here 🤦

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
2021-12-23 13:31:45 +00:00
Javier Neira
e642dd1c2b
Enable manual run for caching, hackage and build workflows (#2528)
* Enable manual run

* Remove skip ghcide

We want to build all deps

* Enable manual run of hackage

* allow only check packages

* Enable manual run of build
2021-12-23 11:45:41 +00:00
Anton Latukha
e6c1fcab76
CI: caching: fix early termination expression check & cabal.project replacement (#2520)
* CI: caching: fix early termination expression check

It is obscure bug.

Details are in
https://matrix.to/#/!oOjZFsoNYPAbTEgSOA:libera.chat/$tB_L6wbaxe1ElQtYzMI9woID4hZyscS6Rhpn-nsCc6Y?via=libera.chat&via=matrix.org&via=monoid.al

Because after the second path somehow it always returned `False` - the caching
runs always resulted in early termination.

* CI: caching: fx `cabal.project` copying

In the
https://github.com/haskell/haskell-language-server/runs/4596861600?check_suite_focus=true
of
https://github.com/haskell/haskell-language-server/pull/2503

Noted that:

I rm cabal.project. The sources of cabal-ghc921.project contain:
index-state: 2021-12-18T00:00:07Z
cp cabal-ghc921.project cabal.project
Then from cabal.project CI retrieves finderprint 2021-11-29T08:11:08Z.
Seems like GitHub uses alias cp=cp -i - preventing UNIX-like default copying over behaviour.
& rm cabal.project does not remove the file.
cabal.project seems to be protected from deletion.

* cabal*.project: index-state +1s

Renewing cache.

* CI: {caching,test}: make rm/cp comment more informative

* CI: {caching,test}: upd commets

This should short-cirquit.

* cabal*.project: index-state +1s

* Correct small typo

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-22 12:59:41 +00:00
Nick Suchecki
3061ace0be
Refactor collectLiterals in AlternateNumberFormat. (#2516)
* Use `extQ` to choose parser.

- In the process of development, it was forgotten that the "parent" type
  of patterns and exprs is different. When traversal occurs, SYB would
  throw out `Pat` types as it was only expecting `HsExpr` types.

- Using `extQ` allows us to chain the expected types and we can then
  destructure patterns appropriately.

* Revert "Disable alternate numbers format plugin temporary (#2498)"

This reverts commit 15d7402696.
2021-12-22 06:59:16 +01:00
Michael Peyton Jones
82b91ace58
Rework troubleshooting section, add basic explainer (#2517)
* Rework troubleshooting section, add basic explainer

This is an attempt to make the troubleshooting doc a bit better
structured. It's a bit lacking in concrete details for some of the
common problems (because I forget exactly how they mainfest), but I hope
that we can beef this up as things come up.

I also added a short explainer doc which explains some of the key
concepts.

* Update docs/troubleshooting.md

Co-authored-by: Pepe Iborra <pepeiborra@me.com>

* Reorganize a bit

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-21 17:53:22 +00:00
Anton Latukha
d1e6d3c19e
CI: caching: add early termination & run check on schedule (#2506)
* CI: caching: add early termination

* CI: caching: run cache check 3 times a day

Recently there is a lot of PRs/builds from internal repo branches. Repo cache
has 10G pool limit & PR caches are not shared between PRs, but main branch cache
is.

Checking & when missing rebuilding it ensures that if internal branch PRs pushed main state
out of the pool - it gets reinstituted.

*afaik* there is no way to prioritize main branch cache better, since GitHub CI
FIFO caches out of the pool by build time.

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-21 10:01:22 +00:00
Javier Neira
070f16fbc2
Fix ci cache for windows (#2507)
* Use new cabal dir

* Use new cabal dir in caching
2021-12-21 07:47:15 +00:00
Javier Neira
22540bef3f
Ignore stack.yamls in test cabal workflow (#2502)
* Ignore stack.yamls in test cabal workflow

* Ignore stack.yamls in bench cabal workflow

* Ignore stack.yamls in bench cabal workflow

Co-authored-by: Anton Latukha <anton.latukha@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-18 23:33:35 +00:00
Javier Neira
15d7402696
Disable alternate numbers format plugin temporary (#2498)
* Disable alternateNumberFormat temporary

* Disable alternateNumberFormat tests

* Add a warn in docs

* Add link to issue in docs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-18 12:51:02 +00:00
Javier Neira
eee4c63211
Fail if main or pre jobs are cancelled (#2493) 2021-12-17 11:50:54 +01:00
Junyoung "Clare" Jang
ae6f7070da
Class plugin bump up (#2475)
* Bump class plugin to work with GHC 9.0.1

* Update class flag in hls cabal file

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-13 17:14:33 +00:00
Anton Latukha
0b6b5ecda1
Caching process update (#2467)
* CI: workflows: disable stack where it is not used

Hopefully it would remove it & its files from being cached in the action. & also
not includde into environment.

* CI: {bench,hackage} add Linux platform config

For future caching configuraiton.

* CI: {caching,test,bench,hackage}: retrieving index timestamp

For 1:1 according cache to it.

* CI: {caching,test,bench,hackage}: new caching process

Sources are stored separately.

Before this cache was storing per Platform/GHC sources & compiled results
together. While deps sources does not depend on platform or GHC, they are
platform & GHC agnostic. Because sources & compiled results were stored togather
& sources took ~1/2-2/3 of that - cache stored multiple duplicates of the same
source code.

This config stores the source code separately.

And at the same time tries to store & share all source code which may be needed.
& all compiled deps that would be used in different workflows.

* CI: caching: separate source retrieval step & separate build step

* CI: {caching,bench}: add executable patching for cache

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-12-12 22:07:35 +00:00
Pepe Iborra
c5706561ff
Build linux binaries in alpine container (#2463)
* Build linux binaries in alpine container

* fix submodules

* install system deps

* force integer-simple

* Merge build-mac-win and build-linux

* --disable-tests

* default shell
2021-12-11 15:32:59 +00:00
Anton Latukha
cf84ef5951
CI: organizing bootstraping (#2446)
* CI: caching: upd doc

* CI: caching: rm schedule

It seems would not be needed.
`cabal.project` has pinned Hackage revision & when HLS code updates in `master`
is during merges.

* CI: caching: build & save cache

* CI: (caching,test,bench): org bootstrap

This were organized but others were ommited, because `build` & `hackage` have a
different purpose I postphoned addind bootstrap to them.

* CI: rm submodule checkouts

Seems like HLS does not plan to use submodules.

* CI: bench: fitting the workflow to strategy chosen

Still kept the 9.0.1 bootstrap, because the very next workflow standard GHC
update would hit the need of that code.

* CI: bench: default to bash

* CI: bench: rm env step

* CI: Circle-CI: m fx

Merely to refresh the Circle-CI report status in the PR

* CI: caching: fx: rm executable name patching
2021-12-10 22:53:30 +01:00
Javier Neira
1b69975000
Remove support for ghc 8.8.3/8.10.5 (#2444)
* Remove support for ghc 8.8.3/8.10.5

* Remove ghc-8.10.5 from circleci

* Correct releases links

* Rename stack test dir

* Parametrize stack wrapper test
2021-12-10 14:58:30 +00:00
Javier Neira
ddacbced0f
Fix rerun log handling (#2450) 2021-12-08 19:07:48 +00:00
Anton Latukha
85b51c4bdd
CI: cabal 3.6 use & clean-up 8.10.5 builds (#2443)
* CI: (cache-deps->caching)

* CI: caching: add doc

* CI: rm 8.10.5

Since next HLS release is no longer supports this version.

* CI: update to currently recommended Cabal version

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2021-12-07 01:16:23 +00:00
Anton Latukha
3e44c70d25
CI: cache-deps: rm pull request hook (#2426)
* CI: cache-deps: rm pull request hook

I needed to remove
b0621d7490
before merge.

That is my fault, I should be more conservative between draft<->mergable PR.

* CI: cache-deps: shift cache regeneration time

Since most contributors are in the US & EU, & lets pretend they contribute
between 17:00 - 00:30 - this cache time seems better.
2021-12-01 21:41:05 +01:00
Nick Suchecki
1a74937ca5
HLS Plugin to provide Alternate Literal Formats. (#2350)
* Initialize and Setup Plugin Source.

* Provide Traversal Module to Haskell AST that collects Literals.

* Change Literals module to return type.

Update our parsing module to return the data type we will use in our
plugin.

The datatype: Literal

Constructors:

Overloaded - Contains an overloaded literal with a SrcSpan

NonOverloaded - Contains non-overloaded literals with a SrcSpan

NoLocation - currently unused.

This data type is bound to change. This module is designed to capture
ALL numeric literals for use in the plugin. When parsing Haskell source
tree, certain cases result in getting a plain `Expr`. This means it is
not annotated with a SrcSpan. As a result, we pass along a SrcSpan
through most functions to keep track of the most recent SrcSpan
encountered. This isn't a fool proof plan and may be removed in the
future.

* Implement Logic for actual CodeActions.

The traversal of Haskell source has been turned into a rule. This rule
generates hidden diagnostics which allow a user to run a code action
over (most) literals.

There is some "dead code" in the sense that some literals (prims to be
exact) are not allowed to be changed, despite existing in code. The
other "dead code" exists in the FormatType type. Certain extensions
exist that alter how numbers are shown or act, we make note of those
extensions but call them "NoFormat", which essentially means it's a
NOOP.

Most of the conversion is done via the Numeric module. There are plenty
of "show" functions that provide the translation of numbers into the
various formats. The only custom format is a slightly "dumb"
NumDecimal-extension-function that generates three separate options,
instead of using a numeric defined function.

* Clarify source code comments. Reformat file structure.

* Set up Test Scaffolding.

* Miscellaneous clean-up.

* Use Regex to Match Source Text.

* Remove unneccessary diagnostics from Rule.

* Update all stack versions to include new Plugin.

* Clean up Conversion.hs and AlternateNumberFormat.

Clean up function names and add supporting haddock documentation for
exported functions.

* Update cabal file bounds and add Github workflow test

* Add plugin package to all cabal.project

* Add plugin to test suite

* Push SYB changes. Test.hs is merely for testing and will be removed prior to Merge.

* Use Generics.SYB for parsing Literals from GHC Source.

Updated Literals.hs to use custom SYB traversal of the AST.

* Update hls-alternate-number-format-plugin.cabal

* WIP: run tests

* Test additions and GHC compatability changes.

* Removed dead code.

PrimLiterals were defined originally, however GHC source doesn't provide
the source text. This is one of the needs of the plugin so we don't
provide duplicate suggestions.

Swapped `Maybe Text` to `Text`. Similar to above we now ignore all
literals that have no source text attached.

Swapped `Maybe SrcSpan` to `RealSrcSpan`. Again, similar to the previous
points we now ignore literals that don't get a sourceSpan attached.
Similarly, we drop any `UselessSpan`'s as those are also not very
helpful.

* Use Set to remove duplicates from CollectLiterals Result.

Certain AST representations are traversed multiple times with the switch
to SYB. Using Set allows to easily remove duplicate Literals from our
result.

Added a test suite to monitor for regressions.

* Delete Test.hs

Inadvertently commit this file.

* Add README and bump version to 1.0.0.0.

* Update HLS cabal file for version change.

* Additional Tests.

* Update Test file to use Path library function.

* Miscellaneous Code Fixes.

- Remove unneeded imports/functions.

- Export only specified functions from each module (and add Haddock
  Comment if necessary)

- Minor text changes for accuracy

* Add README to Extra Source Files.

* Update Extra Source Files to include Test Haskell Source files.

* Update Features.md and Minor Bug Fix :)

* Add new plugins to hackage workflow

* Fix Bug caused by Minor Bug Fix.

Co-authored-by: jneira <atreyu.bbb@gmail.com>
Co-authored-by: Fendor <power.walross@gmail.com>
2021-12-01 14:12:06 +00:00
Anton Latukha
0b74792b51
Centralized caching workflow (#2419)
* CI: add workflow to cache build dependencies

* delete this pull request push trigger before
2021-12-01 09:34:14 +01:00
fendor
00d08b85fc
Avoid unnecessary Target canonicalisation in Session setup (#2359)
* Add test-case for projects that use symbolic links

In particular, this test checks whether modules that are actually
symbolic lins can be found by ghcide.
This is known to be broken, as Session.hs canonicalises Targets, e.g.
saves the location of the symbolic link. When we later try to load that
module, we can't find it, as it won't be part of the known targets since
it is not canonicalized.

* Dont canonicalise Targets during session setup

Canonicalising Targets makes it harder later to actually find the
targets during import analysis, as ghcide only looks for modules in the
import paths and checks for existence in the known target Map.

However, import analysis doesn't canonicalise target candidates, thus
the lookup in the known target Map will always fail.

We no longer canonicalise Targets, so import analysis will succeed
loading modules that are actually symbolic links.

* Prefer makeAbsolute over canonicalizePath

* Use makeAbsolute to read HIE files from disk

* Restore repeated builds

the ghcide build fails for win and ghc-8.8 with segfaults

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-29 19:33:23 +00:00
J. S
d0ccc2f9f3
Qualify imported names plugin (#2355)
* actual initial qualify imported names implementation

* renamed and added tests for QualifyImportedNames plugin

* fix backtick and parenthesized operators not being qualified correctly

* add tests, and remove logging

* add license, readme, and demo

* remove old demo, add slightly better demo

* remove old mp4 demo, add slightly gif demo

* update readme to use demo

* readme typo

* slight rewording of readme

* slight rewording of readme 2

* remove Demo header from readme

* don't need ShakeExtras and remove some more logging stuff

* hopefully fix ghc 9 differences, rename plugin cabal file

* forgot comma on module re-export

* minimize imports

* fix Hashmap import for ghc <= 8.8, remove unused extension pragmas

* fix hls-qualify-imported-names ghcide bound

* add test suite to CI

* add more tests for qualify imported names plugin

* change ghcide bound to match what @hololeap is doing

* add qualify imported names to feature list

* add demo, readme, test files, test hie.yaml to extra source files

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2021-11-29 17:58:25 +00:00
Javier Neira
268ef19741
[skip circleci] Add modern issue templates (#2394)
* Add modern issue templates

* Replace with modern issues templates

* Mention discussions in the blank issue

* Mention explicitly vscode binaries location

* Correct grammar

Co-authored-by: fendor <fendor@users.noreply.github.com>

* Correct grammar

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

* Rephrase into

Co-Authored-by @michaelpj

* they already let you open a blank one

* Comment out suggestions

Co-authored-by: fendor <fendor@users.noreply.github.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-29 15:35:26 +00:00
Javier Neira
6506991fd5
Use dependent-sum from hackage (#2412)
* Use dependent-sum from hackage

* Update index in all project files
2021-11-29 13:29:26 +00:00
Javier Neira
b05e14d7fb
Prepare 1.5.1 (#2393)
* Rerun tests between run attempts

* without quotes

* Bump up versions for hackage

* Add support for auth github requests

As anonymous ones reach the api limit quickly
Via a unique argument with a github oauth token

* Add changelog for 1.5.1

* Fix makrdownlint warnings

* Bump up index state

* Bump up plugin version

* build with -v3 on error

* More backjumps for tests and benchs

* Add last prs

* eval plugin needs ghcide>=1.5.0.1

* Include #2395 in the changelog

* Ignore deferred tests for win and 9.0.1

* Ignore tactics tests for ubuntu+8.6.5
2021-11-28 12:54:17 +00:00
Javier Neira
4b7d139773
[skip circleci] Update release instructions (#2384)
* Check the build workflow

* Add gitlab/ghcup specific intructions

* Apply suggestions from @michaelpj

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

* Note where are release artifacts

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-11-24 17:39:43 +00:00
dependabot[bot]
2e61b7c0ba
Bump cachix/install-nix-action from 15 to 16 (#2383)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 15 to 16.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v15...v16)

---
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: Javier Neira <atreyu.bbb@gmail.com>
2021-11-22 16:00:40 +00:00
Javier Neira
311107eabb
Prepare 1.5.0 (#2361)
* Use hackage version of czipwith

* Update stack.yaml's

* Remove source czipwith

* Update index and clean cabal-ghc921.project

* extra-1.7.9 has a breaking change so no way

* Increase resources for circleci

As for November 16, circleci has set a timeout of 1 hour for jobs in free plans
Trying to increase resources to make the build faster as suggested by its support center

* Use more threads reduce build times

* Correct runs-on field

* Update stack.yaml's

* Dont fail fast if we are checking

* Use ref_name to check it is a check

* Bump patch version of brittany plugin

* Allow newer base/th for czipwith

* Add enough allow-newers to allow build the project

Having all subpackages included in the `packages` field

* Correct allow-newer's

* Add missing cd's

* Bump up ghcide to 1.5.0

* Exclude pkgs not buildable with 9.0.1

* Bum up plugins with changes versions

* Bum up subpackages with changes versions

* Bum up hls version to 1.5.0

* Bump up haddock plugin version

* Allow ghcide 1.5

* Use ghcide 1.5.0 in the rest of plugins

* Use ghcide 1.5.0 for pragmas

* Allow tactics 1.5.0 for hls

* Remove czipwith in hackage ci script

* Disable 9.0.1 for hackage ci

* Use bounds operator consistently

* Build formatters with newer ghc-lib-parser

* Only stylish-haskell needs newer ghc-lib

* Avoid ghc-9.0.1 in other way

* Script needs a min time version

* First draft of 1.5.0 changelog

* Comment out hackage for 9.0.1

* allow newer ghc-lib-parser

* Remove redundant entry

* Correct condition

* Cancel previous hackage jobs

* Add link to pepe's talk slides

* Use th-extras master

* Use th-extras master and uncomment packages

* add extra-1.7.9

* Add required extra-deps

* Comment unbuildable packages again

* Add ignore-plugins-ghc-bounds

* Add #2354

* Complete ghc deprecation notice

* Add extra-1.7.9

* Add #2346 to Changelog
2021-11-18 06:28:38 +01:00
Javier Neira
07042d4043
Use hackage version of czipwith (#2346)
* Use hackage version of czipwith

* Update stack.yaml's

* Remove source czipwith

* Update index and clean cabal-ghc921.project

* extra-1.7.9 has a breaking change so no way

* Increase resources for circleci

As for November 16, circleci has set a timeout of 1 hour for jobs in free plans
Trying to increase resources to make the build faster as suggested by its support center

* Use more threads reduce build times

* Correct runs-on field

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2021-11-17 15:09:46 +00:00
dependabot[bot]
9a575e0ff2
Bump cachix/install-nix-action from 14.1 to 15 (#2356)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 14.1 to 15.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v14.1...v15)

---
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: Javier Neira <atreyu.bbb@gmail.com>
2021-11-16 05:57:08 +00:00
dependabot[bot]
937de21326
Bump cachix/install-nix-action from 13 to 14.1
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 13 to 14.1.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v13...v14.1)

---
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>
2021-11-11 06:00:16 +00:00
dependabot[bot]
e21d10b622
Bump fkirc/skip-duplicate-actions from 3.4.0 to 3.4.1 (#2345)
Bumps [fkirc/skip-duplicate-actions](https://github.com/fkirc/skip-duplicate-actions) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/fkirc/skip-duplicate-actions/releases)
- [Commits](https://github.com/fkirc/skip-duplicate-actions/compare/v3.4.0...v3.4.1)

---
updated-dependencies:
- dependency-name: fkirc/skip-duplicate-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>
2021-11-11 06:59:34 +01:00
Anton Latukha
bca2cc97f2
add dependabot: add Actions CI merge requests automation (#2339)
Dependabot would send merge requests
[like these](haskell-nix/hnix-store#169)

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2021-11-10 23:56:06 +00:00
Javier Neira
f54bf55bee
Give unique names to post-jobs (#2337) 2021-11-10 13:19:21 +00:00
Javier Neira
44fa1d7e73
Cancel prev runs for bench and nix (#2335)
* Cancel prev runs for bench and nix

* Dont use skip-duplicate-actions for cancel others

* Ignore format func-tests
2021-11-09 16:59:43 +01:00
Kota Yoshitsugu
9fa6abe2cb
Not suggest exported imports (#2329)
* Not suggest exported imports

* Add testing explicit-imports-plugin to github workflow

* Add comment

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

Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
2021-11-06 11:33:44 +00:00
Javier Neira
6e297c5f15
Add support for install hls from hackage using ghc 9.0.1 (#2322)
* First temporal changes

* Clean up tests plugin inclusion

Deprecate them as they will be removed when all tests are
moved to their own plugin packages

* Use force-plugins in project files

* Add ghc-9.0.1 to hackage release workflow

Diabling actual upload if the branch contains 'check'

* Improve force-plugins explanation

* Correct deprecated pragma location

* Dont use deprecated pragma

* Correct yaml config error

* Change flag name

* Use new flag name in project files
2021-11-03 08:09:46 +00:00
Javier Neira
7565798675
[skip circleci] Enable func-test suite for windows (#2296)
* Ignore tests stucking ci

* Enable func-test for win and 9.0.1
2021-11-02 19:06:41 +00:00
Javier Neira
d845f872b9
Remove comment to skip circleci (#2325)
It does not work for prs from external repos
2021-11-02 16:58:04 +01:00
Javier Neira
ebe1d922ef
[skip circleci] Add option to effectively cancel prev runs (#2310)
* Add option to cancel prev runs

Without using skip-duplicate-actions which is failing due to github access permission. 
See https://github.com/fkirc/skip-duplicate-actions/issues/103

* Cancel by branch *and* workflow

Without it will cancel other workflows for the same branch
Credits: 7b371e8b

* Disable cancelling other runs

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-10-30 11:51:49 +00:00
Javier Neira
939caa36b6
Use new queue rules for mergify bot (#2301)
* Use new queue rules

* Add queue action

* Remove method from the queue rule

* Correct yaml

* Comment about empty conditions
2021-10-28 19:17:05 +02:00
Javier Neira
2feabf3583
Reorganize github workflows and use specific label [skip circleci] (#2297)
* Use post job to set workflow status

* Apply post_job trick to bench and nix

* Change label to skip circleci

* Delete setup cache ide step

* Skip circle ci when skipping gh

* No skip circleci if its config change

* Look for skip label in comments as well

* Add missing condition

* Use a explicit github token
2021-10-28 10:25:56 +02:00
Pepe Iborra
2474e7c2d0
[hls-graph] clean up databaseDirtySet (#2294)
* attempt to fix hiedb lock errors

it looks like the test runner has a preexisting process locking the hiedb

* Move ghcide cache to the tmp folder

* Use ${{ runner.temp }}

* clean up the hie-bios cache too

* The runner context doesn't exist outside the steps section
2021-10-26 09:35:14 +00:00
Javier Neira
fffc04d79a
Move hlint tests to its own package (and other clean ups) (#2284)
* Move hlint tests to its package

* Move hlint config tests to its package

* Update extra-source-files

* Remove unused cabal-helper test data

* Add hlint test suite

* Make diganostic tests work without hlint

* Make progressCap test work without hlint files

* No cabal files in hlint test data

* Fix progress test

* Fix parent folder name

* Correct test data dir

* Correct extra-source dir and update maintainer

* Use sendConfigurationChanged everywhere
2021-10-22 09:24:35 +00:00
George Thomas
ee4b496645
Bump Fourmolu to 0.4 (#2254)
* Allow Fourmolu 0.4

* Reformat record construction to Fourmolu style

* Run stylish-haskell on imports

* Enable fourmolu for ghc-9

* Enable fourmolu tests for ghc-9

* Enable fourmolu for ghc-9 and stack

* Correct stack-9.0.1.yaml changes

* Use explicit import to avoid shadowing

* Remove unused import

* Bump plugin version

* Enable -Wall

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2021-10-05 19:38:37 +00:00
Javier Neira
8ee73d0e50
Generate custom source tarball (#2248)
* Generate source tarball

* Update release doc

* Checkout code and create subdir

* Separate src-tar in a new job

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-10-05 06:16:50 +00:00
Javier Neira
3bfb9b3fd9
Drop ghc support for 8.6.4, 8.10.2, 8.10.3, 8.10.4 (#2197)
* Remove outdated setup troubleshooting

* Remove ghc-8.6.4 support

* Remove ghc-8.10.2 support

* Remove ghc-8.10.3 support

* Remove ghc-8.10.4 support

* Complete list of tested ghcs

* Update stack resolvers

* Update hackage index

* Set 8.10.7 as default stack.yaml

* Use extra 1.7.9
2021-09-17 13:00:29 +02:00
Javier Neira
ed67f2c455
Apply workaround for 8.8.4 and windows (#2199)
to enable it in ci (test and build)
2021-09-17 07:52:18 +02:00
fendor
ec53fcb7b5
Drop ghc-api-compat from dependency closure (#2128) 2021-09-15 19:17:40 +02:00
Javier Neira
94ebd4d813
Add rerun workflow (#2181)
to rerun other workflows via pr comments
see https://github.com/marketplace/actions/rerun-actions
2021-09-10 21:48:57 +02:00
Javier Neira
1f0249eb11
Fix hackage release (#2177)
* Do a cabal update

* Set false explicitly

* Correct outputs

* Show entire diff

* Remove duplicate cabal update
2021-09-10 21:47:43 +02:00
Jade
384902c14a
Update nix flake (#2159)
* Update nix flake

Doing a nixpkgs update gains ghc 8.10.6 support.

lsp-types needed updating to satisfy bounds so I did that.

* Add ghc-lib-parser override required for ormolu

* Put the override in the right spot, oopsie

* Pass --print-build-logs to nix commands

* Fix tracy on darwin

* Remove the macOS hack since it got merged

* It appears this is actually ghc8107 by now

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
Co-authored-by: Potato Hatsue <1793913507@qq.com>
2021-09-10 06:31:38 +02:00
Javier Neira
adb964cd51
Semiautomatic hackage releases (#2163)
* Including the update of some .cabal files to make `cabal check` happy
2021-09-09 09:24:17 +02:00
Javier Neira
c91d30afc2
Add ghc-8.10.7 to release build (#2158)
Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
2021-09-05 22:00:27 +02:00
Javier Neira
b1d3dce80e
Disable window job for ghc-8.10.2 (#2154)
It fails to build with transient segfaults

Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
2021-09-04 17:43:45 +02:00
Javier Neira
577948f241
Add ghc-8.10.7 support (#2141)
* Add stack yaml for ghc-8.10.7

* support for ghc-8.10.7

* Use void as suggested by hlint

* Remove duplicate build

* Update extra-deps for ghc-8.10.7

Copied from #2138 stack-8.10.6.yaml

Co-authored-by: peterbecich <peterbecich@gmail.com>

* allow newer ghc for ghc-api-compat-8.10.6

Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
Co-authored-by: peterbecich <peterbecich@gmail.com>
2021-09-03 20:55:12 -04:00
Javier Neira
32cd57df63
Support for ghc-8.10.6 (#2109)
* Support for ghc-8.10.6

* Always miss this one

* Update tested-with .cabal field

* Pin optparse-applicative for stylish-haskell

* Add needed extra-deps
2021-08-26 14:47:04 -04:00
Oliver Madine
28222e9005
New rename plugin implementation (#2108)
* initial commit

project structure
initial test cases
directly modify source to rename references

* code style

* enable for ghc < 8.8.0

* remove aeson from build-depends

* update support

support ghc9
revert retrie version bump
disable feature by default

* enable plugin for testing

* fix test.yml

* code style, ghc9 retrie bump

remove unnecessary flag in test.yml
consistent indentation
increase retrie version for ghc 9.0.1 (decreased by mistake)

* avoid using Data.List.nub

* code style

fix typo in indentation test
break lines at 100 chars
rename some vars

* code style / performance

remove Retire dependency by using exactprint directly
group references by file to increase speed of checking `elem` per file
add test cases (typeclass, let expression)
add some documentation
fix bug when looking up reference in HieDb
improve error messages
rename some function / vars

* replace GhcPlugins import with Name import

* use GHC.Types.Name for ghc >= 9.0.1
2021-08-21 20:06:53 +02:00
Pepe Iborra
790afc6b92
[ghcide-bench] Support extra args in examples (#2107)
* [ghcide-bench] Support extra args in examples

This is useful in the context of #2060 to compare performance with and
without reactive change tracking

* Fix bench.yml CI script
2021-08-19 06:01:36 +02:00
Felix Yan
027587b93f
Enable tests for ormolu plugin (#2086)
It was never enabled in github workflow.

Also we should test it with GHC 9 now.
2021-08-08 07:59:29 +01:00
Potato Hatsue
8d5e34706c
Update nix flake (#2065)
* Update nix flake

* Fix missing ghc-api-compat in hiedb

* unrelated: Update paths_ignore for #2063

Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
2021-08-05 21:38:19 +08:00
Lei Zhu
d815d0474d
Call hierarchy support (#1955)
* Initialize structure

* Add basic tests

* prepareCallHierarchy

* Add prepare call hierarchy tests

* Prepare call hierarchy support

* add outgoing calls

* Rename incoming to outgoing

* Add incoming calls support

* Fix panic error caused by parameters

* Prepare callhierarchy tests

* Duplication items support

* Format and add missing components for review

* Use local lsp

* Add CI test

* Fix typo

* Add flag for 9.0.1

* Change lsp repo

* Fix query error in data declaration

* Add incoming/outgoing call tests

* Add flag for test ghc 9.0.1

* Ignore test on 9.0.1

* Add 9.0.1 test

* Specifying lsp for cabal

* Refresh hiedb before incoming/outgoing calls

* Add moduleUnit on ghc 9.0.1

* Compatible with ghc 9.0.1

* Add missing qualifier

* Remove ghcide capability test
2021-07-27 22:40:04 +01:00
Javier Neira
4d730b3e00
Disable hls tests for win and ghc-9.0.1 (#2018)
* Disable hls tests for win and ghc-9.0.1

* Unignore hlint tests for win and ghc-9.0.1
2021-07-14 13:15:06 +02:00
Javier Neira
8edb0f7c2a
Enable tests for ghc 9 and promote ghcVersion check (#2001)
* Test 9.0.1 for windows and macOS

* Refactorize ghc checking in tests

* Replace CPP checks with ghcVersion

* Use GHC cpp and remove 8.4

* Use the ghc version runtime checker

* HLINT ann ignored for ghc-9 too

* Mark test as broken for win and ghc-9

* Use GHC90 in eval tests

* Disable tests for macos and ghc-9.0.1

* Test 9.0.1 for windows and macOS

* Refactorize ghc checking in tests

* Correct imports/exports

* Replace CPP checks with ghcVersion

* Use GHC cpp and remove 8.4

* Use the ghc version runtime checker

* HLINT ann ignored for ghc-9 too

* Mark test as broken for win and ghc-9

* Use GHC90 in eval tests

* Avoid reformatting code

* Remove not supported ghc-8.4

* Disable tests for macos and ghc-9.0.1

* Ignore hlint+cpp tests for win and ghc-9.0.
2021-07-07 18:18:14 +02:00
Potato Hatsue
47db34f248
Eval plugin: support ghc 9.0.1 (#1997)
* Eval plugin: support ghc 9.0.1

* Update CI and stack

* Use pprTypeForUser for printing kinds

* test: remove forall

* test: [Char] -> String

* test: update forall

* Keep tests only for GHC 9

* Update nix and CI

* Mark one hlint test as known broken

* Re-enable tests for other ghc versions

* Update test
2021-07-05 15:57:33 +08:00
Potato Hatsue
8aa698b53f
nix: add support for ghc 9.0.1 (#1995)
* nix: add support for ghc 9.0.1

* Add CI

* Don't use overrideScope

* Try to disable plugins properly

* Avoid removing attrs of hpkgs

* Split CI steps

* Jailbreak all ghc901 packages

* Override `operational`

* Disable the test of `dual-tree`

* Override `dependent-sum-template`

* Disable tests for every ghc901 package

* Remove formatters executables from dev shell

* Disable pre-commit check for ghc901

* Override `diagrams` packages

* Override `monoid-extras`

* Disable class plugin and refineImports plugin (consistent with cabal-ghc901.project)
2021-07-04 13:15:04 +08:00
Javier Neira
2df3d302af
Add windows to ghcup artifacts and generate sha256 sums (#1970)
* Add windows to ghcup artifacts

* Add 7z compress

* Make move generic per os

* Generate sha256 sums

* Include .tar.gz and sums in artefacts

* Clean up sha256sums tags
2021-06-30 07:28:26 +02:00
Sandy Maguire
68c4a90a68
Fix nix.yaml (#1974)
Our old cachix install URL got garbage collected.
2021-06-24 11:36:08 -07:00
Andreas Källberg
5f6ce4af03
Add ghc-9.0.1 to the build release script (#1940)
* Add ghc-9.0.1 to the build release script

* ghc9: Enable module-name plugin

* Diagrams now supports ghc-9.0.1

* Upgrade cabal in build script

* Cache reset updating hackage index

Co-authored-by: jneira <atreyu.bbb@gmail.com>
2021-06-23 10:59:34 +08:00
Javier Neira
813e5ff400
Remove ghc-8.8.2 support (#1934) 2021-06-17 16:24:13 +02:00
Hiromi Ishii
5db0108e01
Workaround for GHC 8.10.5 on macOS (#1931)
* Workaround for GHC 8.10.5 on macOS

* Removes unnecessary env specification

* Also adds workaround to test CI
2021-06-16 16:13:42 +02:00
Pepe Iborra
369373eda3
Fall back to hiedb for invalid srcspan paths (#1918) 2021-06-14 10:00:45 +01:00
Junyoung/Clare Jang
be2071e985
Fix build action for macOS (#1916)
* Fix GitHub actions for build

* Remove resolved comment

* Rollback build wrapper version to use GHC 8.10.4
2021-06-13 05:19:43 -04:00
Junyoung/Clare Jang
7ba6279aa4
Add GHC 8.10.5 support (#1899)
* Add GHC 8.10.5

* Remove GHC 8.10.2

* Fix cabal build

* Downgrade bench to 8.10.4 as master do not have 8.10.5

* Add missing window builds

* Update ghc-api-compat location

* Mark a test as broken in GHC 8.10.5

* Exclude ghc 8.10.5 for MacOS CI

* Update build.yml

* Revert "Remove GHC 8.10.2"

This reverts commit b85b02903b797e63a57179ba49c02fe204e2aab6.
2021-06-10 16:22:17 -04:00
Andreas Källberg
0b3bb10cd2
Ghc 9.0.1 support for ghcide (#1649)
* hie-compat: Add basic support for ghc-9.0.1

A tiny step towards #297

* hie-compat: Remove dependency on ghc-api-compat

* hie-compat: Add more backwards compatability

* Import a bunch of upstream ghc9 fixes

* cabal.project: allow-newer: *:*

The lazy solution to making things compile

* Add more upstream fixes

* Bump patch of ghc-check

* ghcide: Add basic support for GHC-9.0.1

I tried to limit the use of CPP to the Compat module as much as possible
by re-exporting the new functions under the old names,
but there is still plenty of pragmas all over the code.

I'm using ghc-api-compat so the imports doesn't need to be changed as much.

* ghcide: Fix backwards compatability with ghc-8.8.4

* ghc9-ghcide: Fix some more issues that caused runtime errors

* Restore initDynLinker for older versions of ghc

It was probably important for something

* Fix ghc-8.6.5 compatability

* Fix completion test failures for ghc9

With this example:
f asdfgh = asd

it would suggest to complete `asd` into `asd_arNC`,
which seems to be a name it generated because of
deferred-out-of-scope-variables

* Ghc-check now supports ghc-9.0.1

* Retrie now supports ghc-9.0.1

But it's not on hackage yet.

* Restore retrie orphans

* tests: Ghc9 shows [Char] as String by default

This seems like an improvement, so just update the test-suite

* tests: Ghc9 shows TH-errors after the dollar sign

Instead of including it like older versions did

$(foo)
  ~~~~
  some TH error/warning

* Fix two more test failures

- GHC9 uses a more lenient haddock parser
- TH2.17 has polymorphic Q monad with a type class

* ghc9: Fix "Remove redundant imports" code action

In ghc9, only the specific unused function is highlighted,
instead of the whole line.

* ghcide-tests: Show errors where they are caused

instead of deep inside some generic helper function

* Only use nub on SrcSpan for ghc>=9

* Remove more CPP pragmas

* Remove a bit more CPP

This could almost be handled by ghc-api-compat,
but if it was imported from TyCoPpr, it doesn't work with
ghc < 8.10

* Update stack files to support new versions

* Use the version of retire on hackage

The new version is now released

* Don't use allow-newer: *:*

* ghcide-tests: Enable test no longer broken in ghc9

* Update hiedb version for ghcide

* Adjust for a minor change in test output for ghc9

* Fix benchmark test for ghc9

Cabal-3.2 is not buildable on ghc9, but 3.4 is builable on older ghc.

* Mark minor issues as broken for ghc9

Ghc9 highlights both the constructor and the other fields

Maybe this should just be accepted and not seen as broken?

* haddock-comments-plugin: Ghc9 support

* hls-eval-plugin: Partial ghc9 support

* WIP: hls-eval-plugin: Partial ghc9 support

* hls-explicit-imports-plugin: Add ghc9 support

Now ignores any imports with Unhelpful locations,
since we can't make a map of SrcLoc

* hls-retrie-plugin: Add ghc9 support

* hls-hlint-plugin: Add ghc9 support

* Fix backwards compatability of hlint plugin

* Fix stack builds

(Broken by previous hlint fixes)

* Disable tests when their required plugins are disabled

Not all plugins are supported on ghc9 yet, but we
still want to run the tests for the supported parts

* ghc9: Fix module name plugin

* Add a stack file and run tests for ghc9 in ci

* Add missing packages to ghc-9 stack

* Resolve rebase issues

Maybe it's better to create merge commits instead?

* Allow newer for more packages so cabal stops complaining

These aren't really working, but since they are dependencies
of packages in the `packages:` section
the resolver won't allow us to build anything without this, even if
those plugins are disabled.

* Replace MIN_GHC_API_VERSION with MIN_VERSION_ghc

* Revert incorrect change to hlint code

* Remove remaining traces of GHC_LIB flag

* Add back ghc 9 to github workflow

* Revert "Add back ghc 9 to github workflow"

This reverts commit c465a1e51a.

* hie-compat: Add basic support for ghc-9.0.1

A tiny step towards #297

* hie-compat: Remove dependency on ghc-api-compat

* hie-compat: Add more backwards compatability

* Disable CI for ghc9

* Use newer version of apply-refact

* Don't needlessly duplicate code from ghc

* hie-compat: Reexport the original version of HieBin

* Don't include broken "allow-newer"s

* FIx stack build for ghc9

* Fix warning from imperfect merge commit

* Don't needlessly duplicate code from ghc

* hie-compat: Reexport the original version of HieBin

* Add missing ghc-api-compat

* Fix ghc9 build for ModuleName

* Add more conditionals on flags for tests

* Add a separate cabal.project file for ghc9

As far as I know, this is the only way to disable the packages who's
dependencies doesn't compile in GHC9 yet.

* Fix and re-enable CI for GHC9

* Remove accidental non-breaking space

* Fix CI build for ghc9

Since we are changing the flags for haskell-language-server,
which CI renames to hls,
we need to use the shortened name in those flags as well

* Run tests for ghc9 in CI

* Minor CI changes

* Use proper values when enriching hie

* Don't try to test hls-refine-imports-plugin on ghc9

* Update comment about ghc9 crashing on initDynLinker

* setSessionDynamicFlags to prevent ghc9  from crashing

The only way to set the dynamic linker is with the function `setSessionDynFlags`
so we call it with the result from `getSessionDynFlags` to give it a
(hopefully sensible) argument.

See also this commit:
18757cab04

* Revert "setSessionDynamicFlags to prevent ghc9  from crashing"

This reverts commit 4065ac8394.
That change made the "ghcide.cradle.muli" tests fail.

* Simplify logic in hls-hlint-plugin.cabal

* Add comment on OldRealSrcSpan

* Remove source overrides for non-ghc9 builds in cabal.project

* Remove commented out code

Co-authored-by: Pepe Iborra <pepeiborra@me.com>

* Remove resolved question from comment

"This code is only concerned with extracting argument names, so I don't see how multiplicity would be relevant here"
https://github.com/haskell/haskell-language-server/pull/1649#discussion_r642606967

* ghc9: Update to latest version of LSP per

* cabal-ghc901.project: Remove commented out code

* Update the lsp commit hash for stack as well

* Use a version of lsp without haskell/lsp#326

That patch was causing test failures, but the issues
should be fixed for real at some point, so that patch can be incluede

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
2021-06-06 18:16:29 +01:00
Potato Hatsue
959da62074
Fix nix build for #1858 (#1870)
* Fix nix build for #1858

* Update skip paths

* Run job nix build on PRs that change nix files

* Fix typo
2021-05-27 12:33:28 +08:00
Potato Hatsue
aa4bd292d0
Fix condition of nix build job (#1864) 2021-05-24 22:51:26 +08:00
Javier Neira
da72a27e6f
Use last apply-refact and several stack.yaml updates (#1858)
* Update hackage index

* Update stack.yaml's

* Use ghc-8.10.4 for default stack.yaml

* Update brittany

* Bump up min apply-refact version

* Set max-backjumps to 12000
2021-05-24 12:51:56 +02:00
Potato Hatsue
6606a06ba1
Use cabal-install if nix is failing in CI (#1859)
* Use cabal-install if nix is failing in CI

* Add default.nix

* Split nix job

* Fix syntax error

* Reorder
2021-05-24 07:42:00 +02:00
Junyoung/Clare Jang
4344617e47
Update mergify.yml (#1853)
* Update mergify.yml

* Remove possibly unnecessary explicit status checks
2021-05-21 22:33:50 -04:00
Potato Hatsue
a06b2e6475
Skip cachix jobs if token is unset (#1845) 2021-05-21 21:48:52 +08:00
Potato Hatsue
9abf566e06
nix: refactor with flakes (#1827)
* nix: refactor with flakes

* Update github actions

* Make pre-commit-hooks/flake-utils follows flake-utils

* Update github actions

* Update github actions

* Support multi GHC versions

* Update github actions

* Copy postInstall from nixpkgs

* Remove invalid ghc865

* Update README

* Use nixpkgs-unstable

* Update README

* Add plugins automatically
2021-05-19 03:32:23 -04:00
Gustavo Avena
0772f2d42d
Extract fourmolu plugin into a standalone package (#1823) 2021-05-14 13:57:03 +01:00
Junyoung/Clare Jang
15381405d7
Extract floskell plugin as a standalone plugin (#1829)
* Extract floskell plugin as an independent plugin

* Increase max-backjumps for cabal configure
2021-05-14 04:47:41 -04:00
Ray Shih
54737e9e2d
Implement refine imports (#1686)
* Implement refine imports

* Implement code action for refine imports

* fix stack.yaml

* fix stack-*.yaml

* fix missing records fields after merge master

* fix nix

* reduce duplicated functions

* [Plugin][RefineImports] add tests and fix overriding issue

* add hls-refine-imports-plugin to CI workflow

Co-authored-by: Junyoung/Clare Jang <jjc9310@gmail.com>
2021-04-29 22:32:19 -04:00
Potato Hatsue
f1c0969271
Prepare ghcide 1.2.0.2 and HLS 1.1.0 (#1722)
* Update CHANGELOG

* Bump ghcide to 1.2.0.2

* Downgrade release building runner to ubuntu-18.04
2021-04-13 15:56:15 +08:00
Potato Hatsue
28c9f0e60e
Wrap test suite of tactics plugin into tasty test tree (#1676) 2021-04-08 00:07:41 +08:00
Javier Neira
ab16895a7f
Ignore nix job steps (#1672)
Co-authored-by: Potato Hatsue <1793913507@qq.com>
2021-04-07 16:21:12 +08:00
Javier Neira
c7fd931dfa
Ignore ghcide tests by paths (#1673)
Co-authored-by: Potato Hatsue <1793913507@qq.com>
2021-04-07 11:30:38 +08:00
Potato Hatsue
2d1a588d0d
Run plugins' test suites with server in the same process (#1628)
* Run plugins' test suites with server in the same process

* Use async

* Update CI

* Add rts options

* Sleep 0.5s after running a session

* Update CI

* Don't use withAsync

* Add timeout

* Cancel the server action when timeout

* Fix cwd

* Close input stream manually, add a lock

* cleanup

* tactics plugin

* Remove sleep

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2021-04-06 15:37:50 +08:00
Javier Neira
fc5a412475
Fix ignore paths (#1656)
* Skip individual steps

* Skip individual steps

* And needs pre_job
2021-04-04 14:51:04 +08:00
Junyoung/Clare Jang
d60dee03ac
Update ISSUE_TEMPLATE.md (#1640) 2021-03-30 09:05:44 -04:00
Javier Neira
c5f5d20fa8
Remove ignored paths (#1623)
* Remove ignored paths

* Remove old needs

* Add bench-init to needs

Co-authored-by: Potato Hatsue <1793913507@qq.com>
2021-03-27 23:22:12 +08:00
Potato Hatsue
df67bee3d4
Migrate tests of plugins (#1612)
* Class plugin

* Splice plugin, extract hlsCommand from hls-test-utils

* Haddock comments plugin

* Update github actions

* Remove invalid import

* Bump up specification version of package description to 2.4

* Fix hls.cabal

* Remove the build of eval plugin's testdata from circle ci

* Limit the parallelism of building test suites in circle ci

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2021-03-25 12:04:17 +08:00
Potato Hatsue
7255b408da
Extract hls-test-utils (#1606)
* Extract hls-test-utils

* Use test utils in brittany plugin and stylish haskell plugin

* stack

* Set locale encoding to utf8 in defaultMain

* Remove with-utf8
2021-03-23 18:45:45 +08:00
Potato Hatsue
5724343ee2
Extract stylish-haskell plugin into a standalone package (#1604) 2021-03-22 21:49:27 +08:00
Potato Hatsue
86d67ffe28
Update nixpkgs to ghc 8.10.4 (#1538)
* Update niv and nixpkgs

* Use nixos-unstable in CI

* Do not override mkDerivation

* Switch to nixpkgs-unstable

* Jailbreak only broken packages

* Update nixpkgs

* Better override

* Update nixpkgs

* Check whether the package is jailbroken, add comments

* Downgrade tracy to 0.7.5

* Update maintainer notes
2021-03-16 18:36:19 +08:00
Pepe Iborra
6fbc602274
Extract an hls-brittany-plugin package (#1422)
* Extract a Brittany plugin

* Add the brittany plugin to all the stack descriptors

* Extract tests into a standalone testsuite

* Drop AGPL flag

* Change the default logger to print to stderr

* add hls-brittany-plugin test suite to CI

* Add strict version bounds

These are completely unnecessary, but it's the approach that we seem to be taking

* includes breaking API change: bump ghcide version number

Co-authored-by: Junyoung/Clare Jang <jjc9310@gmail.com>
2021-03-08 05:07:38 +00:00
wz1000
19207ef2cf
Disable HLS benchmarks (#1501)
* Revert "Reenable HLS benchmark"

This reverts commit e9adb3d2ef.

* disable HLS bench in CI config

Co-authored-by: Potato Hatsue <1793913507@qq.com>
2021-03-06 19:49:37 +08:00
Javier Neira
369b5e5019
Ignore ci for some subdirectories and files (#1480)
* Ignore ci for some paths

* Run ci for all branches

* Ignore nix dir

* Update .github/workflows/bench.yml

Co-authored-by: Pepe Iborra <pepeiborra@me.com>

Co-authored-by: Potato Hatsue <1793913507@qq.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
2021-03-03 14:22:44 -05:00
Sandy Maguire
00e3577adb
Enable hls-tactics-plugin tests in CI (#1474)
* Enable hls-tactics-plugin tests in CI

* Revert a bug in `auto` that caused test failures
2021-03-02 13:47:51 -05:00
Pepe Iborra
8a2cb852dc archive benchmark logs 2021-02-20 21:04:07 +00:00
Pepe Iborra
5cfe4eceb8
Add a new benchmark example to characterise multi-component performance (#1326)
* [ghcide-bench] handle main modules

* [ghcide-bench] use gen-hie

* [benchmark] Add the HLS benchmark example

* Tweak down the number of components

* Update mergify conditions

Co-authored-by: Javier Neira <atreyu.bbb@gmail.com>
2021-02-12 16:03:34 +00:00
Pepe Iborra
e99be7ddc8
Cancel earlier queued benchmarks (#1339)
* Cancel earlier queued bench workflows

* fix indentation
2021-02-10 11:52:17 +00:00
jneira
2d956cd635 Add ghc-8.10.3 windows build 2021-02-09 22:10:03 +01:00
jneira
5a6d5841c0 Add 8.10.4 and remove 8.10.1 from ci 2021-02-09 22:09:59 +01:00
Pepe Iborra
79c5cc75d9
Parallelize benchmark CI (#1320)
* [benchmark] command line config argument

* [benchmark] Add a phony target for every example

* [benchmark] add config to toggle heap profiling

* [shake-bench] Phony rules for binaries

* [CI] benchmark jobs tree

* update mergify conditions
2021-02-08 09:45:18 +00:00
Pepe Iborra
d48ec1d158 Update Mergify 2021-02-07 09:11:12 +00:00
Pepe Iborra
9016285a39 [CI] restrict benchmarks to 8.10.3 2021-02-06 12:59:25 +00:00
Pepe Iborra
aa802ce511
Update bench.yml to include all the relevant artifacts (#1254) 2021-01-24 10:52:18 +00:00
Pepe Iborra
e0caba5a8a
Benchmarks: generate heap profiles (#1253)
* Parallelize benchmarks

* [benchmarks] Collect heap profiles

* [benchmarks] pass RTS options to the real thing!

We were passing RTS options to the wrong thing

* Drop the 8.6.5 benchmark since the vanilla rts doesn't support +RTS -h

* Tone down timeout

* Review feedbacks
2021-01-23 23:52:01 +00:00
jneira
a0b3e4d946 Invalidate cache using versioning 2021-01-14 14:22:48 +01:00
jneira
a977f71597 Disable win 8.6.4 job 2021-01-12 09:56:00 +01:00
jneira
8f888c2a59 Update mergify checks 2021-01-11 10:04:35 +01:00
jneira
1b3dd7c5c9 Restore restore-keys 2021-01-11 10:03:46 +01:00
jneira
7779b1cd35 Remove ghc-lib from test conditions 2021-01-11 10:03:46 +01:00
jneira
19bc1f1213 Drop macOS tests 2021-01-11 10:03:45 +01:00
jneira
ecf1781909 Be strict in the restore cache key 2021-01-11 10:03:45 +01:00
jneira
e449ac3f40 Correct restore-key expression 2021-01-11 10:03:25 +01:00
jneira
21f8273c49 Set dirs for windows cabal cache 2021-01-11 09:18:35 +01:00
jneira
6356550631 Only test last ghc minor version 2021-01-11 09:18:35 +01:00
jneira
ec2c668261 Remove runs dropped by #1173
The mergify config is not completely updated and is required
to remove them to unblock
https://github.com/haskell/haskell-language-server/pull/1173
2021-01-11 07:39:00 +01:00
Pepe Iborra
8de2ca5244 Update nixpkgs to ghc 8.10.3 2021-01-10 12:11:57 +00:00
Pepe Iborra
3773010287
Benchmark improvements (#1178)
* [test-ci] fix wibble

* [ghcide-bench] fix scrambled output

* [ghcide-bench] add a new experiment: getDefinition after edit

* [ghcide-bench] refine the position used for identifiers

* [ghcide-bench] Support examples with multiple FOIs

* [ghcide-bench] Allow identifierP to be optional

* [ghcide-bench] experiments: do all edits first, then query

* [ghcide-bench] Add examples with multiple FOIs

* [ghcide-bench] add a completions (without edit) experiment

* [ghcide-bench] Fix indentation

* [ghcide-bench] Fix incomplete pattern match

* [ghcide-bench] Include the documentContents setup in the "startup" metric

* [ghcide-bench] fix wibble

* [ghcide-bench] add more verbose output

* [shake-bench] Consolidate -s code

* [bench-hist] Fix: depend on # samples

* [ghcide-bench] cache searchSymbol

* [cabal-bench] --no-clean
2021-01-10 08:03:31 +00:00
Javier Neira
dd28adae94
Merge branch 'master' into mergify/jneira/config-update 2021-01-04 17:11:40 +01:00
Javier Neira
e433dbe416
Merge branch 'master' into revert-1154-auto-cancel 2021-01-04 10:39:50 +01:00
Javier Neira
4ff9cf3c41
Merge branch 'master' into mergify/jneira/config-update 2021-01-04 10:39:28 +01:00
Pepe Iborra
21116e97a3 Revert "Auto cancel redundant workflows (attempt #2) (#1154)"
This reverts commit 7fa3ff6a64.
2021-01-04 07:04:37 +00:00
Javier Neira
ca5544179c
Merge branch 'master' into prepare-0.8.0-2 2021-01-03 23:14:18 +01:00
Javier Neira
47fb4ea1cf
Merge branch 'master' into mergify/jneira/config-update 2021-01-03 23:03:30 +01:00
Pepe Iborra
7fa3ff6a64
Auto cancel redundant workflows (attempt #2) (#1154)
* Auto cancel redundant workflows (attempt #2)

* empty commit to test
2021-01-03 20:12:02 +00:00
jneira
a6e9b696d6 Remove auto delete pr branches 2021-01-03 19:24:40 +01:00
jneira
eb48bf971d Fix build for macOS 2021-01-03 15:37:19 +01:00
Javier Neira
3d8e5e64da
Use squash as merge method 2021-01-03 15:14:36 +01:00
Javier Neira
142431bd17
Remove circleci cabal job 2021-01-03 14:12:47 +01:00
Javier Neira
aa52d7d895
Use smart+fasttrack for strict merges 2021-01-03 14:12:25 +01:00
jneira
c2860a9e41 Create mergify config 2021-01-03 08:42:05 +01:00
jneira
da47a3f209 Add ghc-8.10.3 to gihub actions 2021-01-01 21:51:54 +01:00
Pepe Iborra
aa7e9a377a
Ci fixes (#783)
* Drop macOS benchmarks

* Drop macOS tests

* Really exclude Windows 8.6.4

It occasionally becomes much slower than the others and times out after 6h

https://github.com/haskell/haskell-language-server/runs/1626173853?check_suite_focus=true

* switch to haskell/actions/setup

actions/setup-haskell has been archived, haskell/actions/setup is the replacement

* use coarser cache keys

We are getting very few cache hits because we have too many caches and are
running over the 5GB per repository limit.

Each node in the matrix weighs around 350MB, so we can have up to 15 nodes. The
current matrix (after dropping macOS but before adding 8.10.3) has 12 nodes.

The `**/*.cabal` hash is wrong, since it also captures cabal files in tests
The `**/cabal.project` is wrong for the same reason, but it can be easily
fixed.

* Use more precise .cabal paths in test cache

* Reuse build cache in bench workflows and viceversa

* Reduce Nix builds to the bare minimum

We simply need to check that the Nix derivation works

* remove enable-stack

* Auto cancel redundant workflows

* Enable tests fail-fast

* Remove ghc-lib from matrix

Created #784 to restore it
2021-01-01 19:31:31 +00:00
Pepe Iborra
1a34357f08
Invert the dependency between hls-plugin-api and ghcide (#701)
* Invert the dependency between ghcide and hls-plugin-api

This PR includes changes both to ghcide and HLS to implement the reorg described in https://github.com/haskell/ghcide/issues/936#issuecomment-751437853

To summarise:

- `hls-plugin-api` no longer depends on ghcide.
- `ghcide` now depends on `hls-plugin-api` and exposes:
  - The ghcide HLS plugin
  - The `asGhcIdePlugin` adaptor

The goals are:
- to be able to break the `ghcide` HLS plugin down
- to rewrite exe:ghcide on top of the HLS plugin model.

The ghcide side is reviewed in https://github.com/haskell/ghcide/pull/963

If this change is accepted there are two further considerations:
- This would be a good moment to merge the 2 repos, so that there is no history loss.
- `hls-plugin-api` will need to be released to Hackage prior to merging https://github.com/haskell/ghcide/pull/963

* clean up

* Fix the ghcide plugin to include the rules

* clean up PartialHandlers definition

The ghcide partial handlers for completions, code actions and hover are not
really being used, since they get overriden by the `<> ps` append. This is due
to the right-biased semantics of `PartialHandlers`

* Move ghcide LspConfig into Ide.Plugin.Config

* Use HLS plugins in ghcide

For now there is only one, the main ghcide plugin. But this will allow us to
break it down in more fine grained plugins with parallel semantics, both for
execution and error handling

* Fix hlints

* Revert "Temporarily disable the upstream branch for benchmarks"

This reverts commit 7bb3c6efae.

* Disable the Windows 8.6.4 test

* Fix unrelated hlints

Not sure why these are triggering now.

Linting should be restricted to the Diff ...
2020-12-30 23:48:17 +00:00
Pepe Iborra
7e86f1785c Fix paths in bench script 2020-12-29 13:22:04 +00:00
Pepe Iborra
df66518bd1 Run GitHub actions only on PR
With so many github actions (>60) we cannot afford to run on every push
2020-12-29 13:22:04 +00:00
Pepe Iborra
f2ef26ded5 Run the ghcide test suite first 2020-12-29 13:22:04 +00:00
Pepe Iborra
8544fc0bc1 Combine test and nix CI scripts 2020-12-29 13:22:04 +00:00
Pepe Iborra
a48a91074e Add ghcide bench CI action 2020-12-29 13:22:03 +00:00
Pasqualino Titto Assini
887cde9e11 Eval tests as proper subpackage (to add QuickCheck dependency) 2020-12-25 10:12:17 +01:00
jneira
2876c3dd01 Fix ghc version for windows 8.10.2.2 2020-12-18 11:01:45 +01:00
jneira
d447437d60 Fix windows 8.10.2 executable name 2020-12-17 13:21:29 +01:00
Pepe Iborra
46d1c7654c Upgrade to cachix-action@v8
Adds support for auth tokens
2020-12-01 23:11:49 +00:00
Pepe Iborra
b2d144911c Add a Github action to warm up the Cachix haskell-language-server 2020-12-01 23:11:49 +00:00
jneira
eed310c9fe Use inclusion instead exclusions 2020-11-24 09:48:01 +01:00
jneira
a1a02f7807 Use always last setup-haskell@v1 2020-11-24 09:34:49 +01:00
jneira
4f3f4c18f4 Add ghc-8.10.2.2 to windows build 2020-11-24 08:26:19 +01:00
jneira
46fecccf33 Correct formatting 2020-11-24 08:25:44 +01:00
Javier Neira
381b598296
Use correct version of ghc choco package
Excluding the version for the rest of os's
2020-11-23 23:50:52 +01:00
Javier Neira
fb91944a87
Enable ghc-8.10.2 for windows
As chocolatey applies the workaround: https://gitlab.haskell.org/ghc/ghc/-/issues/18550#note_309996
2020-11-23 22:29:56 +01:00
Javier Neira
1ef375f688
Remove workaround not longer needed
As https://github.com/actions/setup-haskell/issues/44 is closed
2020-11-20 07:27:38 +01:00
jneira
03f1e1553a Allow insecure commands temporary 2020-11-17 20:21:13 +01:00
Janek
0955c9ad24
Use comments & simplify issue template 2020-11-11 13:02:41 +01:00
Javier Neira
372a12e797
Merge pull request #584 from bubba/github-actions-tar-preserve-permissions
Preserve file permissions in tar bundles
2020-11-11 07:36:00 +01:00
Luke Lau
9689b83945 Preserve file permissions in tar bundles
Fixes #316
2020-11-11 01:35:37 +00:00
Luke Lau
946f0ac524 Replace deprecated set-env with temporary files 2020-11-11 01:33:20 +00:00
jneira
77b17d2f1a Retry wrapper-test twice 🤦 2020-11-05 11:42:48 +01:00
jneira
d5d3bb093c Retry nix build twice 2020-11-05 10:56:42 +01:00
jneira
ce96b4cb92 Separete test suites to fix --rerun 2020-11-05 08:00:09 +01:00
jneira
d19568f62b Use bash shell to allow its idioms 2020-10-29 20:28:11 +01:00
jneira
94b7a3ea6f Rerun test suite to avoid flaky tests 2020-10-28 22:26:43 +01:00
jneira
0fa74a4023 Comment the intent of retries 2020-10-19 23:29:50 +02:00
jneira
9cb25f13e3 Retry the build three times 2020-10-19 21:57:12 +02:00
Luke Lau
cdf50a6312
Add GitHub Actions CI for testing (#504)
* Add GitHub workflow for testing

* Add HLS_TEST_EXE env var to control which exe to test

* Pass -j1 flag to tasty when running tests on GitHub

* Enable stack in GitHub CI

* Update cabal

* Add HLS_WRAPPER_TEST_EXE

* Fix cache restore keys

* Try force language server to use utf8 locale

* Use patched hie-bios

* Remove debug print

* Lets find out what the windows locale encoding is

* Give up trying to fix the locale

* Add comment for -j1
2020-10-19 14:16:17 +01:00
Luke Lau
c4d16f8981 Fix folder structure of tarballs 2020-10-04 22:17:08 +01:00
Luke Lau
14497f2503 Fix how binaries are tarred together 2020-10-04 17:10:18 +01:00
Luke Lau
3ca2a6cd26 Rename tarfile extensions to .tar.gz 2020-10-03 19:33:03 +01:00
Luke Lau
2d8551db5c Fix tar job in GitHub Actions workflow 2020-10-03 18:10:26 +01:00
Luke Lau
1e4bfc523c Use actions/setup-haskell v1.1.3 2020-10-02 20:43:35 +01:00
Luke Lau
abe59d4c4b Generate .gz tars of all the binaries for macOS and Linux
Used by ghcup
2020-10-02 20:43:32 +01:00
Luke Lau
46502c884d Disable ghc-8.10.2 on windows due to linker path issue 2020-09-02 21:59:22 +01:00
Luke Lau
babe12562a Add 8.10.2 to github actions build 2020-09-02 21:15:50 +01:00
Fendor
96d930c655 Add ISSUE_TEMPLATE for github 2020-08-23 15:28:50 +02:00