Fix bench for newer ghc versions
The following have been done:
1. No longer use the implicit-hie to generate the hie.yaml for the bench examples and in favor of using "cradle:\n cabal:\n", seems to be working with modern cabal.
2. upgrade benchmark to use 9.6, 9.8 (The latest two we support for now).
3. upgrade bench examples to `Cabal version: 3.10.2.1, lsp-types version: 2.1.1.0`
4. fix minor error that `*.hp` files duplicates its extension name
---------
Co-authored-by: fendor <fendor@users.noreply.github.com>
* Remove bitrotted CPP gated code
A lot of the HLINT_ON_GHC_LIB gated code has been bitrotting since this
flag was removed. This could be reintroduced if we wanted to directly
work on the same parsed AST, but as the hlint ghc plugin showed this
may not make much difference: https://www.haskellforall.com/2023/09/ghc-plugin-for-hlint.html
* Reintroduce ghc-lib flag for hlint plugin
The ghc-lib flag was removed in haskell#3015, but it's still useful to
be able to compile hls-hlint-plugin using the GHC API if you've done so
for hlint and ghc-lib-parser-ex, rather than using ghc-lib-parser as it
simplifies the build and dependencies.
Even though we copy test files into temporary directories, we used to
reuse the same cache directory for build artefacts, hiedb and
compilation artefacts. While there is practially no chance this causes
any issues for the test runs themselves, it litters the cache directory
with a lot of files. So, we create one main directory in the temporary
directory, and generate all caches and in there. This makes it trivial
to delete all test caches, without risking deleting the cache that is
still used.
* Exit with non-zero exitcode if wrapper fails to launch
Only when in LSP mode, we want to launch the LSP server that offers the
restart capability.
* Install recommended GHC version for release wrapper tests
---------
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Remove more workarounds for GHCs < 9.0
* String, not [String]
* Remove GHC810 and GHC90 enum constants
* Fix logic mistake in windows tests
* Inline thDollarIdx
* Troubleshoot wrapper-test
* Troubleshoot
* Try free disk space action
* Run free-space in individual test jobs
* Only run the disk cleanup on ubuntu
* Revert troubleshooting code
* Revert free-disk-space workaround
* Reintroduce workaround
* Revert "Reintroduce workaround"
This reverts commit ec6e8da8c44d0130f0c23aac75df5e461c8f88e2.
* Don't install stack in tests?
* Revert "Don't install stack in tests?"
This reverts commit f53e9932f60eb6789ddef12f370ef81acf65fc58.
* Make the test use ghcup-managed stack
* More maintainable version of stack test
* Use *only* incoming range to determine which code actions are in scope
Rather than doing a full compare with incoming `Diagnostic` objects from
the client. This brings the "remove redundant imports/exports" code
actions more in line with behavior described in #4056, and has the
pleasant side-effect of fixing broken code actions in neovim (#3857).
* Remove redundant imports ;)
* Rename param for clarity
---------
Co-authored-by: fendor <fendor@users.noreply.github.com>
* Bump to ghc 9.6.4 based lts-22.9
* Try more recent haskell image
* Fool around
* Cleanup and rename back to nightly
---------
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
* Bump lsp versions
Broadly:
- A few places where we need to pipe `ProgressToken`s around.
- I also just removed the progress reporting from resolve commands,
since it's going to often be costly to do progress reporting on
something that short. Possibly we could revisit after https://github.com/haskell/lsp/issues/549
- Some changes to the registration options we infer
- A few places where we need to adapt to ignoring registrations or not
- Adapting to use the ghcide verison of `getCompletionPrefix` everywhere
- Adapting to use the new mixed rope format
* stack
* More fixes
* Add -Wunused-packages to common warnings
* Get rid of common deps
* Wrapper needs process on windows
* Refine
* Does it work like this?
* More cleanups in ghcide
* Fix build with stack
* Also fix stack --test
* Less noisy workaround
* Fix new warnings
A follow up of #3958 , we have added a tokenizor to walk the hieAst along with the file rope, it means we no longer need to do the detour of storing temperal result as Map Range (Set identifier), instead we can optimize by fusing most of the logic into tokenizer and return [(Range, HsSemanticTokenType)] directly.
* Bump ghcide-test-utils to 2.0.0.0
We need this so we can release a version compatible with 2.6.0.0
I will need to make hackage revisions to all the plugin packages that depend on it
* update ghcide-test-utils tested with