ghcide/ghcide.cabal

299 lines
8.0 KiB
Plaintext
Raw Normal View History

cabal-version: 1.20
build-type: Simple
category: Development
name: ghcide
2020-02-04 18:15:03 +03:00
version: 0.1.0
license: Apache-2.0
license-file: LICENSE
author: Digital Asset
maintainer: Digital Asset
copyright: Digital Asset 2018-2019
synopsis: The core of an IDE
description:
A library for building Haskell IDE's on top of the GHC API.
homepage: https://github.com/digital-asset/ghcide#readme
bug-reports: https://github.com/digital-asset/ghcide/issues
tested-with: GHC==8.6.5
extra-source-files: include/ghc-api-version.h README.md CHANGELOG.md
test/data/GotoHover.hs
source-repository head
type: git
location: https://github.com/digital-asset/ghcide.git
flag ghc-lib
description: build against ghc-lib instead of the ghc package
default: False
manual: True
library
default-language: Haskell2010
build-depends:
aeson,
Support for interface files (#457) * Rules for loading interface files * Typechecking with interface files * Add a note in the README about the optimal project setup * Improve support for hs-boot files The branch was failing to load GHC because the module graph was missing edges between a .hs file and its .hs-boot file. This means the .hs-boot file was getting added into the HPT after the .hs file which led to confusing errors about variables being out of scope. The fix is to maintain a map from hs-boot to hs files and then add an edge for this case when calling `transitiveDependencies`. Also tidy up some code in setupEnv which I assume was attempting to fix this but in an incorrect manner. Add the -boot suffix when looking for hi-boot files. For some reason, the `hi` path is not set to the right thing for `hs-boot` files. I don't know why not perhaps it is ok to use an existing `.hi` file in place of an `hs-boot` file. More investigation needed. My experience is that GHC is quite bad a recompilation avoidance for hs-boot files anyway. For example: https://gitlab.haskell.org/ghc/ghc/issues/17434 Add the -boot suffix when writing interface files * Generate .hi and .hie files during type checking * Refactor GetModIface to not retain TypeChecked module in memory This improves memory performance on a cold cache. * Trailing whitespace * Turn debug log messages into diagnostics * Implement "hie" files for ghc-8.6.5 This means that the .hi files patch can also be used with 8.6.5 * Add tests for hover/definition on imported symbols * hlints * Generate .hie files when missing * Fix subtle bug in setDefaultHieDir * Simplify optimal project setup in README * Move interface loading diagnostics behind --test flag Reusing the --test flag for this seems harmless, I cannot justify introducing a new flag * Avoid expensive interface file generation for files of interest * avoid redundant arguments (thanks Moritz K) * qualify a DAML only comment * Skip module source when generating hie file thanks Moritz Kiefer for noting that we don't care for the generated .hie files to embed module sources * runGhcEnv <-> evalGhcEnv * Apply suggestions from code review Thanks Moritz Kiefer Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org> * Add suggested Show instance Co-Authored-By: Matthew Pickering <matthewtpickering@gmail.com> * Use Control.Exception.Safe This is to avoid accidentally capturing asynchronous exceptions * Rename atomicFileUpdate * Fix a flaky test We have to be careful with module naming in tests to avoid interference of .hi files across tests * Undo formatting of D.IDE.GHC.Util * follow changes in master Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com> Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-24 14:39:53 +03:00
array,
async,
base == 4.*,
binary,
bytestring,
containers,
data-default,
deepseq,
directory,
extra,
fuzzy,
filepath,
haddock-library >= 1.8,
hashable,
2020-05-13 15:59:51 +03:00
haskell-lsp-types == 0.22.*,
haskell-lsp == 0.22.*,
mtl,
network-uri,
prettyprinter-ansi-terminal,
prettyprinter-ansi-terminal,
prettyprinter,
regex-tdfa >= 1.3.1.0,
2019-06-14 02:12:34 +03:00
rope-utf16-splay,
safe-exceptions,
shake >= 0.18.4,
2019-06-14 02:12:34 +03:00
sorted-list,
stm,
syb,
text,
time,
transformers,
unordered-containers >= 0.2.10.0,
utf8-string,
hslogger
if flag(ghc-lib)
build-depends:
ghc-lib >= 8.8,
ghc-lib-parser >= 8.8
cpp-options: -DGHC_LIB
else
build-depends:
ghc-boot-th,
ghc-boot,
ghc >= 8.4
if os(windows)
build-depends:
Win32
else
build-depends:
unix
c-sources:
cbits/getmodtime.c
default-extensions:
BangPatterns
DeriveFunctor
DeriveGeneric
GeneralizedNewtypeDeriving
LambdaCase
NamedFieldPuns
OverloadedStrings
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
ViewPatterns
hs-source-dirs:
src
include-dirs:
include
exposed-modules:
Development.IDE.Compat
Development.IDE.Core.Debouncer
Development.IDE.Core.FileStore
Development.IDE.Core.IdeConfiguration
Development.IDE.Core.OfInterest
Development.IDE.Core.PositionMapping
Development.IDE.Core.Rules
Development.IDE.Core.RuleTypes
Development.IDE.Core.Service
Development.IDE.Core.Shake
Development.IDE.GHC.Error
Development.IDE.GHC.Util
Development.IDE.Import.DependencyInformation
Development.IDE.LSP.HoverDefinition
Development.IDE.LSP.LanguageServer
Development.IDE.LSP.Outline
Development.IDE.LSP.Protocol
Development.IDE.LSP.Server
Development.IDE.Spans.Common
Development.IDE.Types.Diagnostics
Development.IDE.Types.Location
Development.IDE.Types.Logger
Development.IDE.Types.Options
Development.IDE.Plugin
Development.IDE.Plugin.Completions
Development.IDE.Plugin.CodeAction
other-modules:
Development.IDE.Core.Compile
Development.IDE.Core.Preprocessor
Development.IDE.Core.FileExists
Development.IDE.GHC.Compat
Development.IDE.GHC.CPP
Development.IDE.GHC.Orphans
Development.IDE.GHC.Warnings
Development.IDE.GHC.WithDynFlags
Development.IDE.Import.FindImports
Development.IDE.LSP.Notifications
Development.IDE.Spans.AtPoint
Development.IDE.Spans.Calculate
Development.IDE.Spans.Documentation
Development.IDE.Spans.Type
Development.IDE.Plugin.CodeAction.PositionIndexed
Development.IDE.Plugin.CodeAction.Rules
Development.IDE.Plugin.CodeAction.RuleTypes
Development.IDE.Plugin.Completions.Logic
Development.IDE.Plugin.Completions.Types
if (impl(ghc > 8.7) && impl(ghc < 8.10)) || flag(ghc-lib)
hs-source-dirs: src-ghc88
other-modules:
Development.IDE.GHC.HieAst
if (impl(ghc > 8.9))
hs-source-dirs: src-ghc810
Support for interface files (#457) * Rules for loading interface files * Typechecking with interface files * Add a note in the README about the optimal project setup * Improve support for hs-boot files The branch was failing to load GHC because the module graph was missing edges between a .hs file and its .hs-boot file. This means the .hs-boot file was getting added into the HPT after the .hs file which led to confusing errors about variables being out of scope. The fix is to maintain a map from hs-boot to hs files and then add an edge for this case when calling `transitiveDependencies`. Also tidy up some code in setupEnv which I assume was attempting to fix this but in an incorrect manner. Add the -boot suffix when looking for hi-boot files. For some reason, the `hi` path is not set to the right thing for `hs-boot` files. I don't know why not perhaps it is ok to use an existing `.hi` file in place of an `hs-boot` file. More investigation needed. My experience is that GHC is quite bad a recompilation avoidance for hs-boot files anyway. For example: https://gitlab.haskell.org/ghc/ghc/issues/17434 Add the -boot suffix when writing interface files * Generate .hi and .hie files during type checking * Refactor GetModIface to not retain TypeChecked module in memory This improves memory performance on a cold cache. * Trailing whitespace * Turn debug log messages into diagnostics * Implement "hie" files for ghc-8.6.5 This means that the .hi files patch can also be used with 8.6.5 * Add tests for hover/definition on imported symbols * hlints * Generate .hie files when missing * Fix subtle bug in setDefaultHieDir * Simplify optimal project setup in README * Move interface loading diagnostics behind --test flag Reusing the --test flag for this seems harmless, I cannot justify introducing a new flag * Avoid expensive interface file generation for files of interest * avoid redundant arguments (thanks Moritz K) * qualify a DAML only comment * Skip module source when generating hie file thanks Moritz Kiefer for noting that we don't care for the generated .hie files to embed module sources * runGhcEnv <-> evalGhcEnv * Apply suggestions from code review Thanks Moritz Kiefer Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org> * Add suggested Show instance Co-Authored-By: Matthew Pickering <matthewtpickering@gmail.com> * Use Control.Exception.Safe This is to avoid accidentally capturing asynchronous exceptions * Rename atomicFileUpdate * Fix a flaky test We have to be careful with module naming in tests to avoid interference of .hi files across tests * Undo formatting of D.IDE.GHC.Util * follow changes in master Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com> Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-24 14:39:53 +03:00
other-modules:
Development.IDE.GHC.HieAst
ghc-options: -Wall -Wno-name-shadowing
executable ghcide-test-preprocessor
default-language: Haskell2010
hs-source-dirs: test/preprocessor
ghc-options: -Wall -Wno-name-shadowing
main-is: Main.hs
build-depends:
base == 4.*
executable ghcide
if flag(ghc-lib)
buildable: False
default-language: Haskell2010
hs-source-dirs: exe
2020-01-17 18:27:39 +03:00
ghc-options:
-threaded
-Wall
-Wno-name-shadowing
-- allow user RTS overrides
-rtsopts
-- disable idle GC
-- disable parallel GC
-- increase nursery size
Fix -with-rtsopts flags (#333) Before this change: [nix-shell:~/scratch/ghcide]$ /home/pepe/scratch/ghcide/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ghcide-0.0.6/x/ghcide/build/ghcide/ghcide +RTS --info [("GHC RTS", "YES") ,("GHC version", "8.8.1") ,("RTS way", "rts_thr_p") ,("Build platform", "x86_64-unknown-linux") ,("Build architecture", "x86_64") ,("Build OS", "linux") ,("Build vendor", "unknown") ,("Host platform", "x86_64-unknown-linux") ,("Host architecture", "x86_64") ,("Host OS", "linux") ,("Host vendor", "unknown") ,("Target platform", "x86_64-unknown-linux") ,("Target architecture", "x86_64") ,("Target OS", "linux") ,("Target vendor", "unknown") ,("Word size", "64") ,("Compiler unregisterised", "NO") ,("Tables next to code", "YES") ,("Flag -with-rtsopts", "-A128M") ] After this change: [nix-shell:~/scratch/ghcide]$ /home/pepe/scratch/ghcide/dist-newstyle/build/x86_64-linux/ghc-8.8.1/ghcide-0.0.6/x/ghcide/build/ghcide/ghcide +RTS --info [("GHC RTS", "YES") ,("GHC version", "8.8.1") ,("RTS way", "rts_thr") ,("Build platform", "x86_64-unknown-linux") ,("Build architecture", "x86_64") ,("Build OS", "linux") ,("Build vendor", "unknown") ,("Host platform", "x86_64-unknown-linux") ,("Host architecture", "x86_64") ,("Host OS", "linux") ,("Host vendor", "unknown") ,("Target platform", "x86_64-unknown-linux") ,("Target architecture", "x86_64") ,("Target OS", "linux") ,("Target vendor", "unknown") ,("Word size", "64") ,("Compiler unregisterised", "NO") ,("Tables next to code", "YES") ,("Flag -with-rtsopts", "-I0 -qg -A128M") ]
2020-01-19 19:06:12 +03:00
"-with-rtsopts=-I0 -qg -A128M"
main-is: Main.hs
build-depends:
hslogger,
aeson,
base == 4.*,
binary,
base16-bytestring >=0.1.1 && <0.2,
bytestring,
containers,
cryptohash-sha1 >=0.11.100 && <0.12,
data-default,
deepseq,
directory,
extra,
filepath,
2020-05-17 17:01:19 +03:00
ghc-check >= 0.3.0.1 && < 0.4,
ghc-paths,
ghc,
gitrev,
hashable,
2019-06-14 02:12:34 +03:00
haskell-lsp,
haskell-lsp-types,
hie-bios >= 0.5.0 && < 0.6,
ghcide,
optparse-applicative,
shake,
text,
unordered-containers
other-modules:
Arguments
Paths_ghcide
Rules
RuleTypes
Util
default-extensions:
BangPatterns
DeriveFunctor
DeriveGeneric
GeneralizedNewtypeDeriving
LambdaCase
NamedFieldPuns
OverloadedStrings
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
2019-06-14 02:12:34 +03:00
ViewPatterns
test-suite ghcide-tests
if flag(ghc-lib)
buildable: False
type: exitcode-stdio-1.0
default-language: Haskell2010
build-tool-depends:
ghcide:ghcide,
ghcide:ghcide-test-preprocessor
build-depends:
aeson,
base,
bytestring,
containers,
directory,
extra,
filepath,
--------------------------------------------------------------
-- The MIN_GHC_API_VERSION macro relies on MIN_VERSION pragmas
-- which require depending on ghc. So the tests need to depend
-- on ghc if they need to use MIN_GHC_API_VERSION. Maybe a
-- better solution can be found, but this is a quick solution
-- which works for now.
ghc,
--------------------------------------------------------------
ghcide,
ghc-typelits-knownnat,
haddock-library,
haskell-lsp,
haskell-lsp-types,
network-uri,
lens,
lsp-test >= 0.11.0.1 && < 0.12,
parser-combinators,
QuickCheck,
quickcheck-instances,
rope-utf16-splay,
Support for interface files (#457) * Rules for loading interface files * Typechecking with interface files * Add a note in the README about the optimal project setup * Improve support for hs-boot files The branch was failing to load GHC because the module graph was missing edges between a .hs file and its .hs-boot file. This means the .hs-boot file was getting added into the HPT after the .hs file which led to confusing errors about variables being out of scope. The fix is to maintain a map from hs-boot to hs files and then add an edge for this case when calling `transitiveDependencies`. Also tidy up some code in setupEnv which I assume was attempting to fix this but in an incorrect manner. Add the -boot suffix when looking for hi-boot files. For some reason, the `hi` path is not set to the right thing for `hs-boot` files. I don't know why not perhaps it is ok to use an existing `.hi` file in place of an `hs-boot` file. More investigation needed. My experience is that GHC is quite bad a recompilation avoidance for hs-boot files anyway. For example: https://gitlab.haskell.org/ghc/ghc/issues/17434 Add the -boot suffix when writing interface files * Generate .hi and .hie files during type checking * Refactor GetModIface to not retain TypeChecked module in memory This improves memory performance on a cold cache. * Trailing whitespace * Turn debug log messages into diagnostics * Implement "hie" files for ghc-8.6.5 This means that the .hi files patch can also be used with 8.6.5 * Add tests for hover/definition on imported symbols * hlints * Generate .hie files when missing * Fix subtle bug in setDefaultHieDir * Simplify optimal project setup in README * Move interface loading diagnostics behind --test flag Reusing the --test flag for this seems harmless, I cannot justify introducing a new flag * Avoid expensive interface file generation for files of interest * avoid redundant arguments (thanks Moritz K) * qualify a DAML only comment * Skip module source when generating hie file thanks Moritz Kiefer for noting that we don't care for the generated .hie files to embed module sources * runGhcEnv <-> evalGhcEnv * Apply suggestions from code review Thanks Moritz Kiefer Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org> * Add suggested Show instance Co-Authored-By: Matthew Pickering <matthewtpickering@gmail.com> * Use Control.Exception.Safe This is to avoid accidentally capturing asynchronous exceptions * Rename atomicFileUpdate * Fix a flaky test We have to be careful with module naming in tests to avoid interference of .hi files across tests * Undo formatting of D.IDE.GHC.Util * follow changes in master Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com> Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-24 14:39:53 +03:00
shake,
tasty,
tasty-expected-failure,
tasty-hunit,
tasty-quickcheck,
tasty-rerun,
text
hs-source-dirs: test/cabal test/exe test/src
include-dirs: include
ghc-options: -threaded -Wall -Wno-name-shadowing
main-is: Main.hs
other-modules:
Development.IDE.Test
Development.IDE.Test.Runfiles
default-extensions:
BangPatterns
DeriveFunctor
DeriveGeneric
GeneralizedNewtypeDeriving
LambdaCase
NamedFieldPuns
OverloadedStrings
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
ViewPatterns