2022-08-25 17:08:57 +03:00
|
|
|
cabal-version: 3.0
|
2020-09-08 10:12:02 +03:00
|
|
|
category: Development
|
|
|
|
name: haskell-language-server
|
2022-09-12 12:59:35 +03:00
|
|
|
version: 1.8.0.0
|
2020-09-08 10:12:02 +03:00
|
|
|
synopsis: LSP server for GHC
|
|
|
|
description:
|
|
|
|
Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
|
|
|
|
|
|
|
|
homepage: https://github.com/haskell/haskell-language-server#readme
|
|
|
|
bug-reports: https://github.com/haskell/haskell-language-server/issues
|
2021-01-20 10:35:11 +03:00
|
|
|
author: The Haskell IDE Team
|
2020-09-08 10:12:02 +03:00
|
|
|
maintainer: alan.zimm@gmail.com
|
2021-01-20 10:35:11 +03:00
|
|
|
copyright: The Haskell IDE Team
|
2020-09-08 10:12:02 +03:00
|
|
|
license: Apache-2.0
|
|
|
|
license-file: LICENSE
|
|
|
|
build-type: Simple
|
2022-10-19 00:12:53 +03:00
|
|
|
tested-with: GHC == 8.10.7 || == 9.0.2 || == 9.2.3 || == 9.2.4
|
2020-01-25 17:33:53 +03:00
|
|
|
extra-source-files:
|
2020-09-08 10:12:02 +03:00
|
|
|
README.md
|
|
|
|
ChangeLog.md
|
2021-03-23 20:01:15 +03:00
|
|
|
test/testdata/**/*.project
|
|
|
|
test/testdata/**/*.cabal
|
|
|
|
test/testdata/**/*.yaml
|
|
|
|
test/testdata/**/*.hs
|
2022-09-28 16:22:21 +03:00
|
|
|
bindist/wrapper.in
|
2020-01-25 17:33:53 +03:00
|
|
|
|
2020-01-28 01:43:28 +03:00
|
|
|
flag pedantic
|
2020-09-08 10:12:02 +03:00
|
|
|
description: Enable -Werror
|
|
|
|
default: False
|
|
|
|
manual: True
|
2020-01-28 01:43:28 +03:00
|
|
|
|
2020-01-25 17:33:53 +03:00
|
|
|
source-repository head
|
2020-09-08 10:12:02 +03:00
|
|
|
type: git
|
2020-02-01 12:01:13 +03:00
|
|
|
location: https://github.com/haskell/haskell-language-server
|
2020-01-25 17:33:53 +03:00
|
|
|
|
2020-09-08 09:05:59 +03:00
|
|
|
common common-deps
|
|
|
|
build-depends:
|
2020-09-08 10:12:02 +03:00
|
|
|
, base >=4.12 && <5
|
2020-09-08 09:05:59 +03:00
|
|
|
, directory
|
|
|
|
, extra
|
|
|
|
, filepath
|
|
|
|
, text
|
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
2022-02-21 00:50:28 +03:00
|
|
|
, prettyprinter
|
2020-09-08 09:05:59 +03:00
|
|
|
|
2021-12-08 19:06:09 +03:00
|
|
|
-- Default warnings in HLS
|
|
|
|
common warnings
|
|
|
|
ghc-options: -Wall -Wredundant-constraints -Wno-name-shadowing -Wno-unticked-promoted-constructors
|
|
|
|
|
|
|
|
-- Allow compiling in pedantic mode
|
|
|
|
common pedantic
|
|
|
|
if flag(pedantic)
|
|
|
|
ghc-options: -Werror
|
|
|
|
|
2021-01-09 17:16:30 +03:00
|
|
|
-- Plugin flags are designed for 'cabal install haskell-language-server':
|
|
|
|
-- - Bulk flags should be default:False
|
|
|
|
-- - Individual flags should be default:True
|
|
|
|
|
2022-01-17 04:18:04 +03:00
|
|
|
-- The intent of this flag is being able to keep the ghc condition for hackage
|
|
|
|
-- but skip it via flags in cabal.project as plugins for new ghcs usually
|
|
|
|
-- are buildable using cabal.project tweaks
|
2021-11-03 11:09:46 +03:00
|
|
|
flag ignore-plugins-ghc-bounds
|
|
|
|
description: Force the inclusion of plugins even if they are not buildable by default with a specific ghc version
|
2021-01-09 17:16:30 +03:00
|
|
|
default: False
|
2020-12-17 16:12:11 +03:00
|
|
|
manual: True
|
|
|
|
|
2020-12-09 20:49:05 +03:00
|
|
|
flag class
|
|
|
|
description: Enable class plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2021-03-07 09:54:52 +03:00
|
|
|
manual: True
|
2020-12-09 20:49:05 +03:00
|
|
|
|
2021-07-28 00:40:04 +03:00
|
|
|
flag callHierarchy
|
|
|
|
description: Enable call hierarchy plugin
|
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
2021-01-07 14:58:36 +03:00
|
|
|
flag haddockComments
|
|
|
|
description: Enable haddockComments plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2021-03-07 09:54:52 +03:00
|
|
|
manual: True
|
2021-01-07 14:58:36 +03:00
|
|
|
|
2020-12-17 16:12:11 +03:00
|
|
|
flag eval
|
|
|
|
description: Enable eval plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2021-03-07 09:54:52 +03:00
|
|
|
manual: True
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
flag importLens
|
|
|
|
description: Enable importLens plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2021-03-07 09:54:52 +03:00
|
|
|
manual: True
|
2020-12-17 16:12:11 +03:00
|
|
|
|
2021-04-30 05:32:19 +03:00
|
|
|
flag refineImports
|
|
|
|
description: Enable refineImports plugin
|
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
2021-08-21 21:06:53 +03:00
|
|
|
flag rename
|
|
|
|
description: Enable rename plugin
|
2022-04-04 00:30:40 +03:00
|
|
|
default: True
|
2021-08-21 21:06:53 +03:00
|
|
|
manual: True
|
|
|
|
|
2020-12-17 16:12:11 +03:00
|
|
|
flag retrie
|
|
|
|
description: Enable retrie plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2021-03-07 09:54:52 +03:00
|
|
|
manual: True
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
flag tactic
|
|
|
|
description: Enable tactic plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2021-03-07 09:54:52 +03:00
|
|
|
manual: True
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
flag hlint
|
|
|
|
description: Enable hlint plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2021-03-07 09:54:52 +03:00
|
|
|
manual: True
|
2020-12-17 16:12:11 +03:00
|
|
|
|
2022-07-28 02:11:31 +03:00
|
|
|
flag stan
|
|
|
|
description: Enable stan plugin
|
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
2020-12-17 16:12:11 +03:00
|
|
|
flag moduleName
|
|
|
|
description: Enable moduleName plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2020-12-17 16:12:11 +03:00
|
|
|
manual: True
|
|
|
|
|
|
|
|
flag pragmas
|
|
|
|
description: Enable pragmas plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2020-12-17 16:12:11 +03:00
|
|
|
manual: True
|
|
|
|
|
2021-01-05 18:34:06 +03:00
|
|
|
flag splice
|
|
|
|
description: Enable splice plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2021-03-07 09:54:52 +03:00
|
|
|
manual: True
|
2021-01-05 18:34:06 +03:00
|
|
|
|
2021-12-01 17:12:06 +03:00
|
|
|
flag alternateNumberFormat
|
|
|
|
description: Enable Alternate Number Format plugin
|
2021-12-22 08:59:16 +03:00
|
|
|
default: True
|
2021-12-01 17:12:06 +03:00
|
|
|
manual: True
|
|
|
|
|
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 20:58:25 +03:00
|
|
|
flag qualifyImportedNames
|
|
|
|
description: Enable qualifyImportedNames plugin
|
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
2022-07-11 07:24:35 +03:00
|
|
|
flag codeRange
|
|
|
|
description: Enable Code Range plugin
|
2022-01-24 16:13:56 +03:00
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
Change Type Signature Plugin (#2660)
* 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>
2022-03-04 02:08:42 +03:00
|
|
|
flag changeTypeSignature
|
|
|
|
description: Enable changeTypeSignature plugin
|
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
2022-05-26 12:13:09 +03:00
|
|
|
flag gadt
|
|
|
|
description: Enable gadt plugin
|
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
2022-08-11 18:48:18 +03:00
|
|
|
flag explicitFixity
|
|
|
|
description: Enable explicitFixity plugin
|
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
2020-12-17 16:12:11 +03:00
|
|
|
-- formatters
|
|
|
|
|
|
|
|
flag floskell
|
|
|
|
description: Enable floskell plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2020-12-17 16:12:11 +03:00
|
|
|
manual: True
|
|
|
|
|
|
|
|
flag fourmolu
|
|
|
|
description: Enable fourmolu plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2020-12-17 16:12:11 +03:00
|
|
|
manual: True
|
|
|
|
|
|
|
|
flag ormolu
|
|
|
|
description: Enable ormolu plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2020-12-17 16:12:11 +03:00
|
|
|
manual: True
|
|
|
|
|
|
|
|
flag stylishHaskell
|
|
|
|
description: Enable stylishHaskell plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2020-12-17 16:12:11 +03:00
|
|
|
manual: True
|
|
|
|
|
|
|
|
flag brittany
|
|
|
|
description: Enable brittany plugin
|
2021-01-09 17:16:30 +03:00
|
|
|
default: True
|
2020-12-17 16:12:11 +03:00
|
|
|
manual: True
|
|
|
|
|
2022-08-04 15:42:38 +03:00
|
|
|
flag refactor
|
|
|
|
description: Enable refactor plugin
|
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
2022-02-01 16:30:20 +03:00
|
|
|
flag dynamic
|
|
|
|
description: Build with the dyn rts
|
|
|
|
default: True
|
|
|
|
manual: True
|
|
|
|
|
2020-12-09 20:49:05 +03:00
|
|
|
common class
|
2022-10-16 18:56:43 +03:00
|
|
|
if flag(class)
|
2022-09-12 12:59:35 +03:00
|
|
|
build-depends: hls-class-plugin ^>= 1.1
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_class
|
2020-12-09 20:49:05 +03:00
|
|
|
|
2021-07-28 00:40:04 +03:00
|
|
|
common callHierarchy
|
2022-09-02 22:11:43 +03:00
|
|
|
if flag(callHierarchy)
|
2022-09-12 12:59:35 +03:00
|
|
|
build-depends: hls-call-hierarchy-plugin ^>= 1.1
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_callHierarchy
|
2021-07-28 00:40:04 +03:00
|
|
|
|
2021-01-07 14:58:36 +03:00
|
|
|
common haddockComments
|
2022-05-01 16:50:12 +03:00
|
|
|
if flag(haddockComments) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
|
2022-09-12 12:59:35 +03:00
|
|
|
build-depends: hls-haddock-comments-plugin ^>= 1.1
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_haddockComments
|
2021-01-07 14:58:36 +03:00
|
|
|
|
2020-12-17 16:12:11 +03:00
|
|
|
common eval
|
2022-06-27 09:28:43 +03:00
|
|
|
if flag(eval) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-09-12 12:59:35 +03:00
|
|
|
build-depends: hls-eval-plugin ^>= 1.3
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_eval
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
common importLens
|
2022-09-02 22:11:43 +03:00
|
|
|
if flag(importLens)
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-explicit-imports-plugin ^>= 1.1
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_importLens
|
2020-12-17 16:12:11 +03:00
|
|
|
|
2021-04-30 05:32:19 +03:00
|
|
|
common refineImports
|
2022-09-02 22:11:43 +03:00
|
|
|
if flag(refineImports)
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-refine-imports-plugin ^>=1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_refineImports
|
2021-04-30 05:32:19 +03:00
|
|
|
|
2021-08-21 21:06:53 +03:00
|
|
|
common rename
|
2022-06-27 09:28:43 +03:00
|
|
|
if flag(rename) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-rename-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_rename
|
2021-08-21 21:06:53 +03:00
|
|
|
|
2020-12-17 16:12:11 +03:00
|
|
|
common retrie
|
2022-09-07 20:58:05 +03:00
|
|
|
if flag(retrie) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-retrie-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_retrie
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
common tactic
|
2022-04-28 20:36:25 +03:00
|
|
|
if flag(tactic) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
|
2022-09-12 12:59:35 +03:00
|
|
|
build-depends: hls-tactics-plugin ^>= 1.7
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_tactic
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
common hlint
|
2022-06-27 09:28:43 +03:00
|
|
|
if flag(hlint) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-09-12 12:59:35 +03:00
|
|
|
build-depends: hls-hlint-plugin ^>= 1.1
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_hlint
|
2020-12-17 16:12:11 +03:00
|
|
|
|
2022-07-28 02:11:31 +03:00
|
|
|
common stan
|
2022-10-19 00:12:53 +03:00
|
|
|
if flag(stan) && (impl(ghc >= 8.10) && impl(ghc < 9.0))
|
2022-07-28 02:11:31 +03:00
|
|
|
build-depends: hls-stan-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_stan
|
2022-07-28 02:11:31 +03:00
|
|
|
|
2020-12-17 16:12:11 +03:00
|
|
|
common moduleName
|
2022-09-02 22:11:43 +03:00
|
|
|
if flag(moduleName)
|
2022-09-12 12:59:35 +03:00
|
|
|
build-depends: hls-module-name-plugin ^>= 1.1
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_moduleName
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
common pragmas
|
2022-09-02 22:11:43 +03:00
|
|
|
if flag(pragmas)
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-pragmas-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_pragmas
|
2020-12-17 16:12:11 +03:00
|
|
|
|
2021-01-05 18:34:06 +03:00
|
|
|
common splice
|
2021-11-03 11:09:46 +03:00
|
|
|
if flag(splice) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
|
2021-07-30 08:45:34 +03:00
|
|
|
build-depends: hls-splice-plugin ^>=1.0.0.1
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_splice
|
2021-01-05 18:34:06 +03:00
|
|
|
|
2021-12-01 17:12:06 +03:00
|
|
|
common alternateNumberFormat
|
2022-10-16 18:56:43 +03:00
|
|
|
if flag(alternateNumberFormat)
|
2022-09-12 12:59:35 +03:00
|
|
|
build-depends: hls-alternate-number-format-plugin ^>= 1.2
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_alternateNumberFormat
|
2021-12-01 17:12:06 +03:00
|
|
|
|
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 20:58:25 +03:00
|
|
|
common qualifyImportedNames
|
2022-09-02 22:11:43 +03:00
|
|
|
if flag(qualifyImportedNames)
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-qualify-imported-names-plugin ^>=1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_qualifyImportedNames
|
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 20:58:25 +03:00
|
|
|
|
2022-07-11 07:24:35 +03:00
|
|
|
common codeRange
|
2022-09-06 12:23:29 +03:00
|
|
|
if flag(codeRange)
|
2022-07-11 07:24:35 +03:00
|
|
|
build-depends: hls-code-range-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_codeRange
|
2022-01-24 16:13:56 +03:00
|
|
|
|
Change Type Signature Plugin (#2660)
* 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>
2022-03-04 02:08:42 +03:00
|
|
|
common changeTypeSignature
|
2022-09-05 05:22:26 +03:00
|
|
|
if flag(changeTypeSignature)
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-change-type-signature-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_changeTypeSignature
|
Change Type Signature Plugin (#2660)
* 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>
2022-03-04 02:08:42 +03:00
|
|
|
|
2022-05-26 12:13:09 +03:00
|
|
|
common gadt
|
2022-06-27 09:28:43 +03:00
|
|
|
if flag(gadt) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-05-26 12:13:09 +03:00
|
|
|
build-depends: hls-gadt-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_gadt
|
2022-05-26 12:13:09 +03:00
|
|
|
|
2022-08-11 18:48:18 +03:00
|
|
|
common explicitFixity
|
2022-09-02 22:11:43 +03:00
|
|
|
if flag(explicitFixity)
|
2022-08-11 18:48:18 +03:00
|
|
|
build-depends: hls-explicit-fixity-plugin ^>= 1.0
|
|
|
|
cpp-options: -DexplicitFixity
|
|
|
|
|
2020-12-17 16:12:11 +03:00
|
|
|
-- formatters
|
|
|
|
|
|
|
|
common floskell
|
2022-06-27 09:28:43 +03:00
|
|
|
if flag(floskell) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-floskell-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_floskell
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
common fourmolu
|
2022-06-27 09:28:43 +03:00
|
|
|
if flag(fourmolu) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-09-12 12:59:35 +03:00
|
|
|
build-depends: hls-fourmolu-plugin ^>= 1.1
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_fourmolu
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
common ormolu
|
2022-06-27 09:28:43 +03:00
|
|
|
if flag(ormolu) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-ormolu-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_ormolu
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
common stylishHaskell
|
2022-06-27 09:28:43 +03:00
|
|
|
if flag(stylishHaskell) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-stylish-haskell-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_stylishHaskell
|
2020-12-17 16:12:11 +03:00
|
|
|
|
|
|
|
common brittany
|
2022-01-28 12:06:56 +03:00
|
|
|
if flag(brittany) && (impl(ghc < 9.0.2) || flag(ignore-plugins-ghc-bounds))
|
2022-04-18 10:16:11 +03:00
|
|
|
build-depends: hls-brittany-plugin ^>= 1.0
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_brittany
|
2020-02-10 23:59:19 +03:00
|
|
|
|
2022-08-04 15:42:38 +03:00
|
|
|
common refactor
|
2022-06-27 09:28:43 +03:00
|
|
|
if flag(refactor) && (impl(ghc < 9.4.1) || flag(ignore-plugins-ghc-bounds))
|
2022-08-04 15:42:38 +03:00
|
|
|
build-depends: hls-refactor-plugin ^>= 1.0
|
|
|
|
cpp-options: -Dhls_refactor
|
|
|
|
|
2022-09-14 00:14:59 +03:00
|
|
|
library
|
|
|
|
import: common-deps
|
2021-12-08 19:06:09 +03:00
|
|
|
-- configuration
|
2022-09-14 00:14:59 +03:00
|
|
|
, warnings
|
|
|
|
, pedantic
|
|
|
|
-- plugins
|
|
|
|
, callHierarchy
|
|
|
|
, changeTypeSignature
|
|
|
|
, class
|
|
|
|
, haddockComments
|
|
|
|
, eval
|
|
|
|
, importLens
|
|
|
|
, refineImports
|
|
|
|
, rename
|
|
|
|
, retrie
|
|
|
|
, tactic
|
|
|
|
, hlint
|
|
|
|
, stan
|
|
|
|
, moduleName
|
|
|
|
, pragmas
|
|
|
|
, splice
|
|
|
|
, alternateNumberFormat
|
|
|
|
, qualifyImportedNames
|
|
|
|
, codeRange
|
|
|
|
, gadt
|
|
|
|
, explicitFixity
|
|
|
|
, floskell
|
|
|
|
, fourmolu
|
|
|
|
, ormolu
|
|
|
|
, stylishHaskell
|
|
|
|
, brittany
|
|
|
|
, refactor
|
|
|
|
|
|
|
|
exposed-modules:
|
|
|
|
Ide.Arguments
|
|
|
|
Ide.Main
|
|
|
|
Ide.Version
|
|
|
|
HlsPlugins
|
|
|
|
|
|
|
|
other-modules: Paths_haskell_language_server
|
|
|
|
autogen-modules: Paths_haskell_language_server
|
|
|
|
hs-source-dirs: src
|
|
|
|
build-depends:
|
|
|
|
, async
|
|
|
|
, base16-bytestring
|
|
|
|
, bytestring
|
|
|
|
, containers
|
|
|
|
, cryptohash-sha1
|
|
|
|
, data-default
|
|
|
|
, ghc
|
|
|
|
, ghcide ^>=1.8
|
|
|
|
, githash >=0.1.6.1
|
|
|
|
, lsp
|
|
|
|
, hie-bios
|
|
|
|
, hiedb
|
|
|
|
, hls-plugin-api ^>=1.5
|
|
|
|
, optparse-applicative
|
|
|
|
, optparse-simple
|
|
|
|
, process
|
|
|
|
, hls-graph
|
|
|
|
, safe-exceptions
|
|
|
|
, sqlite-simple
|
|
|
|
, unordered-containers
|
|
|
|
, aeson-pretty
|
2022-08-25 17:08:57 +03:00
|
|
|
|
|
|
|
default-language: Haskell2010
|
|
|
|
default-extensions: DataKinds, TypeOperators
|
2020-12-17 16:12:11 +03:00
|
|
|
|
2022-08-25 17:08:57 +03:00
|
|
|
executable haskell-language-server
|
|
|
|
import: common-deps
|
|
|
|
-- configuration
|
|
|
|
, warnings
|
|
|
|
, pedantic
|
2020-09-08 10:12:02 +03:00
|
|
|
main-is: Main.hs
|
2020-12-17 16:12:11 +03:00
|
|
|
hs-source-dirs: exe
|
2020-09-08 10:12:02 +03:00
|
|
|
|
2020-01-25 22:45:32 +03:00
|
|
|
ghc-options:
|
2021-12-08 19:06:09 +03:00
|
|
|
-threaded
|
2020-09-08 10:12:02 +03:00
|
|
|
-- allow user RTS overrides
|
|
|
|
-rtsopts
|
|
|
|
-- disable idle GC
|
|
|
|
-- increase nursery size
|
2021-12-20 08:12:17 +03:00
|
|
|
-- Enable collection of heap statistics
|
|
|
|
"-with-rtsopts=-I0 -A128M -T"
|
|
|
|
-Wno-unticked-promoted-constructors
|
|
|
|
if flag(pedantic)
|
|
|
|
ghc-options: -Werror
|
2022-02-01 16:30:20 +03:00
|
|
|
if !os(windows) && flag(dynamic)
|
|
|
|
-- We want to link against the dyn rts just like official GHC binaries do;
|
|
|
|
-- the linked rts determines how external libs are loaded dynamically by TH.
|
|
|
|
-- The standard way of doing this is via the --enable-dynamic-executables Cabal option
|
|
|
|
-- Unfortunately it doesnt' work, see https://github.com/haskell/haskell-language-server/issues/2659
|
|
|
|
-- One can use --ghc-options=-dynamic but this gets applied to the dependencies as well,
|
|
|
|
-- which results in massive rebuilds and incompatibilities with profiling.
|
|
|
|
-- So instead we set the -dynamic flag diretly here.
|
|
|
|
ghc-options: -dynamic
|
2020-09-08 10:12:02 +03:00
|
|
|
|
2020-01-25 17:33:53 +03:00
|
|
|
build-depends:
|
2020-09-06 20:03:24 +03:00
|
|
|
, aeson
|
2021-01-30 14:27:32 +03:00
|
|
|
, async
|
|
|
|
, base16-bytestring
|
2020-02-19 01:05:38 +03:00
|
|
|
, binary
|
2020-09-06 20:03:24 +03:00
|
|
|
, bytestring
|
2020-01-25 22:45:32 +03:00
|
|
|
, containers
|
2021-01-30 14:27:32 +03:00
|
|
|
, cryptohash-sha1
|
2020-09-06 20:03:24 +03:00
|
|
|
, deepseq
|
2020-01-25 22:45:32 +03:00
|
|
|
, ghc
|
2020-09-06 20:03:24 +03:00
|
|
|
, ghc-boot-th
|
2020-11-10 12:29:49 +03:00
|
|
|
, ghcide
|
2020-02-19 01:05:38 +03:00
|
|
|
, hashable
|
2020-09-08 09:05:59 +03:00
|
|
|
, haskell-language-server
|
2021-02-14 22:04:07 +03:00
|
|
|
, lsp
|
2021-01-30 14:27:32 +03:00
|
|
|
, hie-bios
|
|
|
|
, hiedb
|
2020-09-06 20:03:24 +03:00
|
|
|
, lens
|
|
|
|
, regex-tdfa
|
2020-09-16 22:27:57 +03:00
|
|
|
, optparse-applicative
|
|
|
|
, hls-plugin-api
|
|
|
|
, lens
|
|
|
|
, mtl
|
|
|
|
, regex-tdfa
|
2020-06-13 20:16:03 +03:00
|
|
|
, safe-exceptions
|
2021-04-18 18:55:12 +03:00
|
|
|
, hls-graph
|
2021-01-30 14:27:32 +03:00
|
|
|
, sqlite-simple
|
2021-12-06 01:04:56 +03:00
|
|
|
, stm
|
2020-09-06 20:03:24 +03:00
|
|
|
, temporary
|
|
|
|
, transformers
|
2020-02-14 02:19:29 +03:00
|
|
|
, unordered-containers
|
2020-09-08 10:12:02 +03:00
|
|
|
|
2020-01-25 17:33:53 +03:00
|
|
|
default-language: Haskell2010
|
2021-02-14 22:04:07 +03:00
|
|
|
default-extensions: DataKinds, TypeOperators
|
2020-01-25 17:33:53 +03:00
|
|
|
|
2020-02-01 12:01:13 +03:00
|
|
|
executable haskell-language-server-wrapper
|
2021-03-08 08:07:38 +03:00
|
|
|
import: common-deps
|
2021-12-08 19:06:09 +03:00
|
|
|
, warnings
|
|
|
|
, pedantic
|
2020-09-08 10:12:02 +03:00
|
|
|
main-is: Wrapper.hs
|
|
|
|
hs-source-dirs: exe
|
|
|
|
other-modules: Paths_haskell_language_server
|
|
|
|
autogen-modules: Paths_haskell_language_server
|
2020-01-31 00:35:36 +03:00
|
|
|
ghc-options:
|
2021-12-08 19:06:09 +03:00
|
|
|
-threaded
|
2020-09-08 10:12:02 +03:00
|
|
|
-- allow user RTS overrides
|
|
|
|
-rtsopts
|
|
|
|
-- disable idle GC
|
|
|
|
-- increase nursery size
|
2021-01-10 18:03:33 +03:00
|
|
|
"-with-rtsopts=-I0 -A128M"
|
2020-09-08 10:12:02 +03:00
|
|
|
|
2020-01-31 00:35:36 +03:00
|
|
|
build-depends:
|
2021-02-17 16:28:53 +03:00
|
|
|
, data-default
|
2020-01-31 00:35:36 +03:00
|
|
|
, ghc
|
|
|
|
, ghc-paths
|
2020-12-09 15:42:04 +03:00
|
|
|
, ghcide
|
2020-09-08 10:12:02 +03:00
|
|
|
, gitrev
|
2020-09-08 09:05:59 +03:00
|
|
|
, haskell-language-server
|
2022-06-26 14:39:07 +03:00
|
|
|
, hslogger
|
2020-01-31 00:35:36 +03:00
|
|
|
, hie-bios
|
2022-06-26 14:39:07 +03:00
|
|
|
, hls-plugin-api
|
|
|
|
, lsp
|
|
|
|
, lsp-types
|
|
|
|
, mtl
|
2020-01-31 00:35:36 +03:00
|
|
|
, optparse-applicative
|
2020-09-08 10:12:02 +03:00
|
|
|
, optparse-simple
|
2020-01-31 00:35:36 +03:00
|
|
|
, process
|
2022-06-26 14:39:07 +03:00
|
|
|
, transformers
|
|
|
|
, unliftio-core
|
2022-02-11 10:54:09 +03:00
|
|
|
if !os(windows)
|
|
|
|
build-depends:
|
|
|
|
unix
|
|
|
|
, containers
|
2020-09-08 10:12:02 +03:00
|
|
|
|
|
|
|
default-language: Haskell2010
|
2020-01-29 23:21:32 +03:00
|
|
|
|
2020-05-27 00:15:30 +03:00
|
|
|
|
2020-05-09 23:37:37 +03:00
|
|
|
test-suite func-test
|
2021-03-23 13:45:45 +03:00
|
|
|
import: common-deps
|
2021-12-08 19:06:09 +03:00
|
|
|
, warnings
|
|
|
|
, pedantic
|
2022-08-31 19:07:09 +03:00
|
|
|
, refactor
|
2020-09-08 10:12:02 +03:00
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
default-language: Haskell2010
|
|
|
|
build-tool-depends:
|
|
|
|
haskell-language-server:haskell-language-server -any,
|
|
|
|
ghcide:ghcide-test-preprocessor -any
|
|
|
|
|
|
|
|
build-depends:
|
|
|
|
, bytestring
|
|
|
|
, data-default
|
2020-12-28 00:21:06 +03:00
|
|
|
, hspec-expectations
|
2020-09-08 10:12:02 +03:00
|
|
|
, lens
|
2022-01-12 19:24:53 +03:00
|
|
|
, lens-aeson
|
2021-01-05 18:34:06 +03:00
|
|
|
, ghcide
|
2022-09-21 20:36:19 +03:00
|
|
|
, ghcide-test-utils
|
2022-09-12 12:59:35 +03:00
|
|
|
, hls-test-utils ^>=1.4
|
2021-03-23 13:45:45 +03:00
|
|
|
, lsp-types
|
|
|
|
, aeson
|
2021-04-10 23:28:36 +03:00
|
|
|
, hls-plugin-api
|
|
|
|
, lsp-test
|
2021-03-23 13:45:45 +03:00
|
|
|
, containers
|
|
|
|
, unordered-containers
|
2020-09-08 10:12:02 +03:00
|
|
|
|
2021-03-25 07:04:17 +03:00
|
|
|
hs-source-dirs: test/functional test/utils
|
2020-10-03 09:53:59 +03:00
|
|
|
|
2020-09-08 10:12:02 +03:00
|
|
|
main-is: Main.hs
|
|
|
|
other-modules:
|
|
|
|
Command
|
|
|
|
Completion
|
2020-12-22 16:13:38 +03:00
|
|
|
Config
|
2020-09-08 10:12:02 +03:00
|
|
|
Deferred
|
|
|
|
Definition
|
|
|
|
Diagnostic
|
|
|
|
Format
|
|
|
|
FunctionalBadProject
|
|
|
|
FunctionalCodeAction
|
|
|
|
HieBios
|
|
|
|
Highlight
|
|
|
|
Progress
|
|
|
|
Reference
|
|
|
|
Symbol
|
|
|
|
TypeDefinition
|
2021-03-25 07:04:17 +03:00
|
|
|
Test.Hls.Command
|
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 c465a1e51aaaabf56dc7ef8f7fa801ef0abf8fdc.
* 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:
https://gitlab.haskell.org/ghc/ghc/commit/18757cab04c5c5c48eaceea19469d4811c5d0371
* Revert "setSessionDynamicFlags to prevent ghc9 from crashing"
This reverts commit 4065ac8394065f8aa15b1b36e0d56e3ba7762e44.
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 20:16:29 +03:00
|
|
|
Test.Hls.Flags
|
2020-09-08 10:12:02 +03:00
|
|
|
|
2021-02-14 22:04:07 +03:00
|
|
|
default-extensions: OverloadedStrings
|
2020-09-08 10:12:02 +03:00
|
|
|
ghc-options:
|
2021-12-08 19:06:09 +03:00
|
|
|
-threaded -rtsopts -with-rtsopts=-N
|
Distributable binaries (#165)
Update ghcide to obtain the GHC lib dir at runtime, rather than at compile time with ghc-paths. This means that the binaries can be moved about since the lib dir is obtained on the fly
Share the exe/main.hs logic between ghcide and hls: the session setup logic which previously took up most of exe/main.hs now resides inside the ghcide library, and is used by both ghcide and hls's executables
Add a --project-ghc-version option to the wrapper which spits out the project's ghc version to stdout. This is useful for the vscode extension which can then use it to download the corresponding version of binary that the wrapper would have otherwise attempted to launch
Make the wrapper check to see if the correct tool is installed beforehand. For example, if it detects a stack project but stack isn't on the path, it will report an error then and there, rather than having hls/ghcide confusingly fail later on. The vscode extension uses this new error message as well to provide a pop up message linking the user to a website to install the missing tool
Remove cabal-helper from the wrapper, so that the implicit cradle logic is the same between ghcide/hls/hls-wrapper
And of course, add a GitHub action workflow that runs whenever a release is created on GitHub that builds static binaries on Linux, and distributable enough binaries on macOS and windows. This is documented a bit more in docs/releases.md
* WIP
* WIP 2
* WIP 3
* WIP 4
* WIP 5
* WIP 6
* WIP 7
* WIP 8
* WIP 9 Use patched hie-bios to get libdir dynamically
* Try building the wrapper
* Try to fix build_wrapper env variable not being picked up
* Try again
* Give up on the env var idea
* Try out static optimised builds?
* Try squashing the working dir
* Woops
* Try squashing the builddir
* Try going into the parent directory
* Radical approach - don't use such a long name for the wrapper
* Use dist-binary flag
* Debug why floskell fails to build on windows
* haskell-language-server => hls on CI
I hate that I have to do this
* Employ extreme path saving measures
* sed time :(
* Try making sed command portable
* Compress artefacts
* Tidy up wrapper logging
* Use version checking logic in hie-bios
* Add documentation on the releases process
* Remove unused code
* Append .exe to windows binaries
* Try out building remaining supported ghc configurations
* Add wrapper tests and update hie-bios
* Use index timestamp that exists on hackage
Fixes warning
* Update hie-bios
* Update hie-bios
* Try building windows jobs on -j1
* Skip windows 8.8.2
* Update ghc-check to use hie-bios runtime ghc libdir
* Upload binaries as an artifact too
* Try flicking on enable-executable-static
I don't expect this to work, puffnfresh has already tried this and had
to fork ghcup
* Fix artifact upload
* Update to latest ghcide and reuse loadSession
* Check if the tool is installed in --project-ghc-version in the wrapper
* Fix wrapper tests by copying to temporary directory
* Try caching
* Tidy up and switch back to cabal helper implicit cradle
* use split sections
* Remove cabal-helper and replace it with hie-bios implicit logic
The cabal-helper cradle was only used by the wrapper for detecting the
project GHC version in the absence of an explicit hie.yaml file, whilst
ghcide itself used the hie-bios implicit cradle logic. This brings the
two in sync so the wrapper should behave more predictably now.
* Undo agpl common stanza change
* Add release number
Co-authored-by: amesgen <amesgen@amesgen.de>
2020-07-20 22:28:52 +03:00
|
|
|
|
2021-11-03 11:09:46 +03:00
|
|
|
-- Duplicating inclusion plugin conditions until tests are moved to their own packages
|
|
|
|
if flag(eval)
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_eval
|
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 c465a1e51aaaabf56dc7ef8f7fa801ef0abf8fdc.
* 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:
https://gitlab.haskell.org/ghc/ghc/commit/18757cab04c5c5c48eaceea19469d4811c5d0371
* Revert "setSessionDynamicFlags to prevent ghc9 from crashing"
This reverts commit 4065ac8394065f8aa15b1b36e0d56e3ba7762e44.
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 20:16:29 +03:00
|
|
|
-- formatters
|
2022-01-12 19:24:53 +03:00
|
|
|
if flag(floskell) && (impl(ghc < 9.2.1) || flag(ignore-plugins-ghc-bounds))
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_floskell
|
2022-01-17 04:18:04 +03:00
|
|
|
if flag(fourmolu)
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_fourmolu
|
2021-11-03 11:09:46 +03:00
|
|
|
if flag(ormolu)
|
2022-07-29 13:28:31 +03:00
|
|
|
cpp-options: -Dhls_ormolu
|
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 c465a1e51aaaabf56dc7ef8f7fa801ef0abf8fdc.
* 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:
https://gitlab.haskell.org/ghc/ghc/commit/18757cab04c5c5c48eaceea19469d4811c5d0371
* Revert "setSessionDynamicFlags to prevent ghc9 from crashing"
This reverts commit 4065ac8394065f8aa15b1b36e0d56e3ba7762e44.
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 20:16:29 +03:00
|
|
|
|
Distributable binaries (#165)
Update ghcide to obtain the GHC lib dir at runtime, rather than at compile time with ghc-paths. This means that the binaries can be moved about since the lib dir is obtained on the fly
Share the exe/main.hs logic between ghcide and hls: the session setup logic which previously took up most of exe/main.hs now resides inside the ghcide library, and is used by both ghcide and hls's executables
Add a --project-ghc-version option to the wrapper which spits out the project's ghc version to stdout. This is useful for the vscode extension which can then use it to download the corresponding version of binary that the wrapper would have otherwise attempted to launch
Make the wrapper check to see if the correct tool is installed beforehand. For example, if it detects a stack project but stack isn't on the path, it will report an error then and there, rather than having hls/ghcide confusingly fail later on. The vscode extension uses this new error message as well to provide a pop up message linking the user to a website to install the missing tool
Remove cabal-helper from the wrapper, so that the implicit cradle logic is the same between ghcide/hls/hls-wrapper
And of course, add a GitHub action workflow that runs whenever a release is created on GitHub that builds static binaries on Linux, and distributable enough binaries on macOS and windows. This is documented a bit more in docs/releases.md
* WIP
* WIP 2
* WIP 3
* WIP 4
* WIP 5
* WIP 6
* WIP 7
* WIP 8
* WIP 9 Use patched hie-bios to get libdir dynamically
* Try building the wrapper
* Try to fix build_wrapper env variable not being picked up
* Try again
* Give up on the env var idea
* Try out static optimised builds?
* Try squashing the working dir
* Woops
* Try squashing the builddir
* Try going into the parent directory
* Radical approach - don't use such a long name for the wrapper
* Use dist-binary flag
* Debug why floskell fails to build on windows
* haskell-language-server => hls on CI
I hate that I have to do this
* Employ extreme path saving measures
* sed time :(
* Try making sed command portable
* Compress artefacts
* Tidy up wrapper logging
* Use version checking logic in hie-bios
* Add documentation on the releases process
* Remove unused code
* Append .exe to windows binaries
* Try out building remaining supported ghc configurations
* Add wrapper tests and update hie-bios
* Use index timestamp that exists on hackage
Fixes warning
* Update hie-bios
* Update hie-bios
* Try building windows jobs on -j1
* Skip windows 8.8.2
* Update ghc-check to use hie-bios runtime ghc libdir
* Upload binaries as an artifact too
* Try flicking on enable-executable-static
I don't expect this to work, puffnfresh has already tried this and had
to fork ghcup
* Fix artifact upload
* Update to latest ghcide and reuse loadSession
* Check if the tool is installed in --project-ghc-version in the wrapper
* Fix wrapper tests by copying to temporary directory
* Try caching
* Tidy up and switch back to cabal helper implicit cradle
* use split sections
* Remove cabal-helper and replace it with hie-bios implicit logic
The cabal-helper cradle was only used by the wrapper for detecting the
project GHC version in the absence of an explicit hie.yaml file, whilst
ghcide itself used the hie-bios implicit cradle logic. This brings the
two in sync so the wrapper should behave more predictably now.
* Undo agpl common stanza change
* Add release number
Co-authored-by: amesgen <amesgen@amesgen.de>
2020-07-20 22:28:52 +03:00
|
|
|
test-suite wrapper-test
|
2021-12-08 19:06:09 +03:00
|
|
|
import: common-deps
|
|
|
|
, warnings
|
|
|
|
, pedantic
|
2020-09-08 10:12:02 +03:00
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
build-tool-depends:
|
2021-05-02 23:26:53 +03:00
|
|
|
haskell-language-server:haskell-language-server-wrapper -any,
|
|
|
|
haskell-language-server:haskell-language-server -any
|
2020-09-08 10:12:02 +03:00
|
|
|
|
|
|
|
default-language: Haskell2010
|
|
|
|
build-depends:
|
2021-12-08 19:06:09 +03:00
|
|
|
process
|
2021-03-23 13:45:45 +03:00
|
|
|
, hls-test-utils
|
2020-09-08 10:12:02 +03:00
|
|
|
|
|
|
|
hs-source-dirs: test/wrapper
|
|
|
|
main-is: Main.hs
|
2022-08-25 17:08:57 +03:00
|
|
|
|
|
|
|
benchmark benchmark
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
default-language: Haskell2010
|
|
|
|
ghc-options: -Wall -Wno-name-shadowing -threaded
|
|
|
|
main-is: Main.hs
|
|
|
|
hs-source-dirs: bench
|
|
|
|
build-tool-depends:
|
|
|
|
ghcide-bench:ghcide-bench,
|
|
|
|
hp2pretty:hp2pretty,
|
|
|
|
implicit-hie:gen-hie
|
|
|
|
default-extensions:
|
|
|
|
BangPatterns
|
|
|
|
DeriveFunctor
|
|
|
|
DeriveGeneric
|
|
|
|
FlexibleContexts
|
|
|
|
GeneralizedNewtypeDeriving
|
|
|
|
LambdaCase
|
|
|
|
NamedFieldPuns
|
|
|
|
RecordWildCards
|
|
|
|
ScopedTypeVariables
|
|
|
|
StandaloneDeriving
|
|
|
|
TupleSections
|
|
|
|
TypeApplications
|
|
|
|
ViewPatterns
|
|
|
|
|
|
|
|
build-depends:
|
|
|
|
aeson,
|
|
|
|
base == 4.*,
|
|
|
|
containers,
|
|
|
|
data-default,
|
|
|
|
directory,
|
|
|
|
extra,
|
|
|
|
filepath,
|
|
|
|
ghcide-bench,
|
2022-09-14 00:14:59 +03:00
|
|
|
haskell-language-server,
|
2022-08-25 17:08:57 +03:00
|
|
|
hls-plugin-api,
|
|
|
|
lens,
|
|
|
|
lens-aeson,
|
|
|
|
optparse-applicative,
|
|
|
|
shake,
|
|
|
|
shake-bench == 0.1.*,
|
|
|
|
text,
|
|
|
|
yaml
|