This still makes sure that ghc has been compiled with the same core
libraries as hls while it allows runtime environments where other
packages have been added to the ghc-pkg database.
This commit also adds that file to the sdist, so that distro
packagers can use it.
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Use hiedb from hackage
gitlab-ci: remove workaround for windows 9.2.2
gitlab-ci: remove workaround for windows 9.2.2
hie-bios
update hie bios
update hie bios
bounds
hie-bios fixes
hie-bios fixes
lsp 1.6
cabal.project fixes
hie-bios fixes
lsp and hie-bios from hackage
Mark hie-bios error as expectFail
hie-bios fixes
hie-bios fixes
Stack
Stack
stack fixes
* Update hls-retrie-plugin to be usable with 9.2.4.
This is the first pass at getting hls-retrie-plugin enabled. Much of the
changes were updating to match the changes in the upstream `retrie`
package.
* Replace GHC.Paths.libdir by querying a ModSummary for the LibDir
* Looks like formatting was missed
* Revert "Looks like formatting was missed"
This reverts commit 4f6eee5a6f.
* Don't build retrie for 9.4
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
All code actions have been moved to hls-refactor-plugin
Mostly straightforward, only slight complication was that completion auto imports
depends on exactprint, but I didn't want to remove all completion logic from ghcide
just for this.
Instead, I added logic to dynamically lookup the plugin that provides
the extend import command, so that auto imports work as expected when you have
hls-refactor-plugin enabled.
Move lookupPluginId out of loop
Replace code actions with lenses in benchmarks
Allow plugins to use GetAnnotatedParsedSource by linking it in when depended on
Move lookupPluginId to IdePlugins
Add default extensions
Move traceAst
* extract ghcide:experiments-types
* extract haskell-language-server:plugins and let go of examples
The main goal here is to move the Plugins module into an internal
library so that it can be reused from the benchmark suite.
In order to
make that easier, and since they hardly serve a purpose in a repository
with 25 plugins, I delete the Example and Example2 plugin descriptors
and their dependencies.
* HLS benchmark suite
Port the ghcide benchmark suite to HLS and benchmark plugin
"configurations" independently.
This includes the following changes to the ghcide benchmark suite and
HLS:
- Support for "configurations" which are defined as sets of plugin ids.
The benchmark will be run with only these plugins enabled and all
others disabled
- Support for configurable concurrency. This relies on RTS -ol and -po
flags to place the RTS traces in the target location rather than in
the cwd
This change requires two commits, the next one places
ghcide/bench/hist/Main.hs into its final location to help 'git'
recognize the change as a file move
* ghcide/bench/hist/Main.hs -> bench/Main.hs
* CI - fix artifact names for uniqueness
* disable shorten HLS step
* Do not store eventlogs to avoid out of disk space
* render durations up to milliseconds
* shorten titles
Goal is to display the formatted CSV (via column) one row per line
* exclude formatting plugin configurations
* Extract ghcide-bench to a standalone package
* ghcide-bench: fix stderr capturing
* Fix mem stats
We parse maxResidency and allocatedBytes from the RTS -S output, but runSessionWithHandles kills the server without waiting for it to exit and these stats don't get logged.
The solution is to use runSessionWithHandles', but unfortunately it is internal and not exposed. I have raised a PR to expose it and in the meantime we need a source repo package.
* feedbacks
* delete Example plugins
* init hls-explicit-fixity-plugin
* Update dependencies
* Refactor: Prevent block on startup
* Run pre-commit
* Compatibility: Add emptyMessages
* Remove unused ModIface
* Comment why to make this plugin a lower priority
* Provide hover content while testing fail
* Avoid lambda
* 4 space indent
* Pass Text instead of Name
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* 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>
* Make wrapper a LSP on failure
* Fix incorrect imports
* revert import block for smaller diff
* add missing imports
* Fix: callProcess on win32 machines not called
* import container only on win32
* add missing liftIO
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* hls-haddock-comments does not support ghc-exactprint >= 1.0
And should be marked as such otherwise `cabal install haskell-language-server` generates an unbuildable plan
* Try to make CI happy
Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
* Insert Language Extensions when required
- Add new function that converts a NextPragmaInfo (identifies the
location to insert a new Pragma) into an Insertion that will insert
the new Extension
- Provide all format choices instead of only currently active extensions
* Update Test Suite
* Update Documentation
* Miscellaneous Cleanup
* Push extraneous functions into where bindings
* Remove unneeded logging
* Add Haskell2010 pragma to fix 9.2 tests
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
* First go
* Match against specific error message.
* Basic Change Type Signature implementation.
This implementation only matches a single GHC Error message:
```
• Couldn't match type ‘Int’
with ‘Data.HashSet.Internal.HashSet Int’
Expected type: Int -> Int
Actual type: Data.HashSet.Internal.HashSet Int -> Int
• In the expression: head . toList
In an equation for ‘test’: test = head . toList
```
Specifically on `Expected type: ...`, `Actual type:...` and `In an equation ...`.
There are plenty of error messages that match this format but aren't actually valid.
* GHC 9.2.0 compat change
* Lift expectedError message into a separate binding
* Move ChangeTypeAction into it's own plugin
* Add New Error Message parsing.
- Add new regex for matching extra errors message types
- Revamp original regex to match more.
- Add basic test suite.
- Begin adding `tidyActualType` semantics to provide slightly prettier
TyVars
* Added Error Message Validation to ignore bad Messages.
- Add Pretty Printing for Types
- Added a few test scenarios
* Miscellaneous Cleanup.
* Update Tide Type Signature logic.
- Be able to tidy signatures with operators in it
- Use T.words instead of regex matching to split tyVars
* Remove locA (defaults to id in 8.10) to satisfy 9.0+
* Touch up 9.2.1
* Clean up review notes
* Update stack.yamls
* Fix copy-paste error
* Fix Local Signature resolution
* Improve logging (#2558)
* convert to contravariant logging style part 1, uses additional hardcoded log file to see it side by side with original logging
* convert Session to contravariant logging style
* convert Plugin/HLS and FireStore to contravariant logging style
* convert Rules (and most of the universe) to contravariant logging style
* fix tests, allow old style logging and contravariant logging to write to same log file
* fix import inside wrong CPP
* add CPP for LogTactic constructor
* remove redundant import
* fix ghcide tests
* remove unused import
* fix plugin tests
* LSP_TEST_STDERR should apply to contra logger as well
* fix tactic plugin test
* use CPP for Log datatype plugin constructors, remove unused imports
* add a few Pretty instances, add prettyprinter to haskell-language-sever and hls-plugin-api dependencies
* add Pretty Log instances for Session, FileStore, Notifications
* add remaining Pretty Log instances
* add logToPriorities
* fix slight interleaving issue with hslogger and logger both logging, have default logger be mutex stderr or file handle, use stderr if failing to open log file
* forgot to add .cabal files with hslogger dep
* dont use UnliftIO file IO helpers because they are too new
* remove log helper comments, use Doc instead of Text as final console/file logger input, renaming, export Log constructors
* remove accidentally added useless file, removed prettyprinter dep from hls-plugin-api because stack ghc8.6.5 doesnt have it?
* use deprecated prettyprint modules import for the sake of circleci ghc-8.6.5
* use dummy stderr logger for plugin cli commands, use priorityToHsLoggerPriority function instead of manual mapping
* remove old plugin detritus that somehow got committed
* fix prettyprinter imports for 8.6.5
* try enforcing prettyprinter bounds?
* enforcing bound makes no sense
* maybe changing stack yamls does trick
* filter out warnings when their diags are empty to more closely match original
* add ability to select wanted logging columns, match prev ghcide exe logging behaviour
* dont log anything when diags are empty in some defineEarlyCutoff versions
* use non-deprecated prettyprinter imports
* fix ghcide test module
* change logWith to accept priority at call site, remove all logToPriority functions, add cmapWithPrio that contramaps through WithPriority
* remove useless hiding import list, add comments to default recorder makers
* make cradleToOptsAndLibDir take concrete cradle to remove existential type var in Log constructor
* Types.Logger now re-exports prettyprinter, remove unused dependencies on prettyprinter and hslogger
* existential type var to remove boilerplate in Plugins.hs, remove a few Show instances
* add SourceLoc logging column, inline logToDoc functions, add comment explaining hslogger setup existence
* qualify a name to match original source
* fix -WError
* Delete the Telemetry log level (#2727)
It's a bit non-standard, and moreover it's entirely dead.
* Wall and 9.2 fix
* Remove unneeded comments/code
Co-authored-by: J. S <shenjonathan0@gmail.com>
Co-authored-by: Michael Peyton Jones <me@michaelpj.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
* convert to contravariant logging style part 1, uses additional hardcoded log file to see it side by side with original logging
* convert Session to contravariant logging style
* convert Plugin/HLS and FireStore to contravariant logging style
* convert Rules (and most of the universe) to contravariant logging style
* fix tests, allow old style logging and contravariant logging to write to same log file
* fix import inside wrong CPP
* add CPP for LogTactic constructor
* remove redundant import
* fix ghcide tests
* remove unused import
* fix plugin tests
* LSP_TEST_STDERR should apply to contra logger as well
* fix tactic plugin test
* use CPP for Log datatype plugin constructors, remove unused imports
* add a few Pretty instances, add prettyprinter to haskell-language-sever and hls-plugin-api dependencies
* add Pretty Log instances for Session, FileStore, Notifications
* add remaining Pretty Log instances
* add logToPriorities
* fix slight interleaving issue with hslogger and logger both logging, have default logger be mutex stderr or file handle, use stderr if failing to open log file
* forgot to add .cabal files with hslogger dep
* dont use UnliftIO file IO helpers because they are too new
* remove log helper comments, use Doc instead of Text as final console/file logger input, renaming, export Log constructors
* remove accidentally added useless file, removed prettyprinter dep from hls-plugin-api because stack ghc8.6.5 doesnt have it?
* use deprecated prettyprint modules import for the sake of circleci ghc-8.6.5
* use dummy stderr logger for plugin cli commands, use priorityToHsLoggerPriority function instead of manual mapping
* remove old plugin detritus that somehow got committed
* fix prettyprinter imports for 8.6.5
* try enforcing prettyprinter bounds?
* enforcing bound makes no sense
* maybe changing stack yamls does trick
* filter out warnings when their diags are empty to more closely match original
* add ability to select wanted logging columns, match prev ghcide exe logging behaviour
* dont log anything when diags are empty in some defineEarlyCutoff versions
* use non-deprecated prettyprinter imports
* fix ghcide test module
* change logWith to accept priority at call site, remove all logToPriority functions, add cmapWithPrio that contramaps through WithPriority
* remove useless hiding import list, add comments to default recorder makers
* make cradleToOptsAndLibDir take concrete cradle to remove existential type var in Log constructor
* Types.Logger now re-exports prettyprinter, remove unused dependencies on prettyprinter and hslogger
* existential type var to remove boilerplate in Plugins.hs, remove a few Show instances
* add SourceLoc logging column, inline logToDoc functions, add comment explaining hslogger setup existence
* qualify a name to match original source
* fix -WError
* 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
* 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>
* 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>
* 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>
* 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
* 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>
* 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
* 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>