-
Notifications
You must be signed in to change notification settings - Fork 207
Implement the HIE Bios #1126
Implement the HIE Bios #1126
Changes from 120 commits
b054fe9
3ff19ba
f163539
fac0e95
4231b0b
8fe05bb
3e907c8
ab595a0
94eaa52
0f0c250
671d5ef
19a106d
e001a1b
8cd96b1
5180d25
973d4a2
ed9fefa
4ec8a13
3b41a98
9e7af09
0f507e6
e132d54
5373788
b9ebbec
ca06bd6
4f886df
daf0be5
8e44c14
30fb1e7
5ab587c
40342a0
cd882b6
ca53013
6f905aa
a305239
580b188
2c8b51b
0438ac0
9c7365f
c5f7d28
775eca2
d25984c
2bd16d8
f5a0308
94c3bcf
092c7a2
805961d
0d3af55
2feab0a
c619b66
3d96c12
a78b6a3
1b1bf14
1cbae78
0bfd54f
fb61925
373a474
a112dbb
6d8bd90
65d700b
7eb37df
2e36879
c243b50
98d8668
e83022e
6d9df0f
0738eb4
4031ac6
03473c9
5a5648d
5e09ef9
9039bcf
e631b58
c401bb2
4ff9a38
df764c3
50f4fe9
1cc08c4
6df6c64
46a986a
52601c9
80270ff
f91070d
f41edf2
d7403d2
54becfd
07f1dcd
3fb0985
4c96f82
3f84a89
794aa9a
bc5ff6f
57737df
4afb084
3752ac9
a7ec5fc
568cca1
7fbacf7
db18602
dd9cbdd
15037a4
48d29b1
10355fe
fdb4696
3be0213
40b6073
2505e45
c1824ed
f9756db
87eb220
5642252
9e3a4e0
5b56c15
2f006c7
fa65724
4f61966
eb3d32e
48958d8
c52a982
2ff3893
8dae303
172a557
f561472
582ff05
1cf6ab7
3dcedf8
89f8d83
52940fb
26d0ddd
a1bac07
294c401
52b60ba
ae844a0
7def514
799bfd6
408b0b5
2fdcb3a
c41eed0
2ffb17e
b72e606
91a56b0
b28e944
c84b33f
ed6d66b
83c5090
cc40b6f
7e7bd1d
92add4e
c45714e
0517eaa
97e6617
b775f13
b4f2326
9ceec1e
4309653
9ee8156
232e7d6
e1da603
3ed7833
a19ff9c
4a80ec3
d79e033
6a9b727
52691a6
e3fa438
3bfd965
e0a30bf
d109948
e8b4bee
b0a01e7
9fc2dcc
73fcf4b
702a5f5
1ca4e0a
d228c02
523da4d
dc8dab1
714f42a
dcf81a1
3795616
532aa60
61b6ba8
d30d058
32a6739
c2e4bfc
c6e7f31
924de7c
d467264
a0296ae
58c4019
8c3c350
4c5308b
7541d1e
7c206de
c983469
4bd1e75
90e1444
7681038
e212df1
d3d8ac2
41b9cab
8701f8b
9f5ef1b
fea7271
62267a5
361f6ef
ec3d362
b0b0c95
16f2580
31209a6
9ce648a
a173297
25bcde6
43cf0d1
bc079e9
bd40ac3
03d9bf2
0d44704
3ff767e
0effcf4
305b2d5
67d0903
8e91d80
9819903
ae8aa22
b7dfd2b
1b9767d
8e0241c
49582c2
3476f19
1a05e42
501cb28
cd0d1eb
a79ec33
c5b8a4b
b1363df
c4c04ce
89fe99d
20255f2
84e645c
c94b45e
cd3cd02
c193254
df1ac8a
6cbadc7
5dfc446
6f1c220
8e9bb3d
58ac672
bfedd03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ module Main where | |
import Control.Monad | ||
import Data.Monoid ((<>)) | ||
import Data.Version (showVersion) | ||
import qualified GhcMod.Types as GM | ||
import Haskell.Ide.Engine.MonadFunctions | ||
import Haskell.Ide.Engine.MonadTypes | ||
import Haskell.Ide.Engine.Options | ||
|
@@ -18,6 +17,7 @@ import qualified Paths_haskell_ide_engine as Meta | |
import System.Directory | ||
import System.Environment | ||
import qualified System.Log.Logger as L | ||
import HIE.Bios.Types | ||
|
||
-- --------------------------------------------------------------------- | ||
-- plugins | ||
|
@@ -27,7 +27,7 @@ import Haskell.Ide.Engine.Plugin.Base | |
import Haskell.Ide.Engine.Plugin.Brittany | ||
import Haskell.Ide.Engine.Plugin.Build | ||
import Haskell.Ide.Engine.Plugin.Example2 | ||
import Haskell.Ide.Engine.Plugin.GhcMod | ||
import Haskell.Ide.Engine.Plugin.Bios | ||
import Haskell.Ide.Engine.Plugin.HaRe | ||
import Haskell.Ide.Engine.Plugin.Haddock | ||
import Haskell.Ide.Engine.Plugin.HfaAlign | ||
|
@@ -37,6 +37,7 @@ import Haskell.Ide.Engine.Plugin.Liquid | |
import Haskell.Ide.Engine.Plugin.Package | ||
import Haskell.Ide.Engine.Plugin.Pragmas | ||
import Haskell.Ide.Engine.Plugin.Floskell | ||
import Haskell.Ide.Engine.Plugin.Generic | ||
|
||
-- --------------------------------------------------------------------- | ||
|
||
|
@@ -52,7 +53,7 @@ plugins includeExamples = pluginDescToIdePlugins allPlugins | |
, baseDescriptor "base" | ||
, brittanyDescriptor "brittany" | ||
, buildPluginDescriptor "build" | ||
, ghcmodDescriptor "ghcmod" | ||
-- , ghcmodDescriptor "ghcmod" | ||
, haddockDescriptor "haddock" | ||
, hareDescriptor "hare" | ||
, hoogleDescriptor "hoogle" | ||
|
@@ -61,6 +62,8 @@ plugins includeExamples = pluginDescToIdePlugins allPlugins | |
, packageDescriptor "package" | ||
, pragmasDescriptor "pragmas" | ||
, floskellDescriptor "floskell" | ||
, biosDescriptor "bios" | ||
, genericDescriptor "generic" | ||
] | ||
examplePlugins = | ||
[example2Descriptor "eg2" | ||
|
@@ -121,16 +124,15 @@ run opts = do | |
d <- getCurrentDirectory | ||
logm $ "Current directory:" ++ d | ||
|
||
let vomitOptions = GM.defaultOptions { GM.optOutput = oo { GM.ooptLogLevel = GM.GmVomit}} | ||
oo = GM.optOutput GM.defaultOptions | ||
let defaultOpts = if optGhcModVomit opts then vomitOptions else GM.defaultOptions | ||
let initOpts = defaultCradleOpts { cradleOptsVerbosity = verbosity } | ||
fendor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
verbosity = if optBiosVerbose opts then Verbose else Silent | ||
-- Running HIE on projects with -Werror breaks most of the features since all warnings | ||
-- will be treated with the same severity of type errors. In order to offer a more useful | ||
-- experience, we make sure warnings are always reported as warnings by setting -Wwarn | ||
ghcModOptions = defaultOpts { GM.optGhcUserOptions = ["-Wwarn"] } | ||
-- ghcModOptions = defaultOpts { GM.optGhcUserOptions = ["-Wwarn"] } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also done in mpickering#14 |
||
|
||
when (optGhcModVomit opts) $ | ||
logm "Enabling --vomit for ghc-mod. Output will be on stderr" | ||
when (optBiosVerbose opts) $ | ||
logm "Enabling verbose mode for hie-bios. Output will be on stderr" | ||
|
||
when (optExamplePlugin opts) $ | ||
logm "Enabling Example2 plugin, will insert constant diagnostics etc." | ||
|
@@ -139,8 +141,8 @@ run opts = do | |
|
||
-- launch the dispatcher. | ||
if optJson opts then do | ||
scheduler <- newScheduler plugins' ghcModOptions | ||
scheduler <- newScheduler plugins' initOpts | ||
jsonStdioTransport scheduler | ||
else do | ||
scheduler <- newScheduler plugins' ghcModOptions | ||
scheduler <- newScheduler plugins' initOpts | ||
lspStdioTransport scheduler origDir plugins' (optCaptureFile opts) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
packages: | ||
./ | ||
./hie-plugin-api/ | ||
./hie-bios/ | ||
./haskell-lsp/ | ||
./lsp-test | ||
|
||
./submodules/HaRe | ||
./submodules/brittany | ||
./submodules/cabal-helper/ | ||
./submodules/floskell | ||
./submodules/ghc-mod/ | ||
./submodules/ghc-mod/core/ | ||
./submodules/floskell | ||
|
||
allow-newer: floskell:all | ||
|
||
executable-dynamic: True | ||
|
||
ghc-options: -Werror | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: haskell-ide-engine | ||
version: 0.8.0.0 | ||
version: 1.0.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this take us to 1.0? I suspect not. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is certainly a "new era" for the project but it depends what semantics you attach to a version number. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would leave the version bump till after the merge. I think it is a definitely a worthwhile change but there's probably still some ironing out to do once it lands in master There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No strong opinion, but changing it to 1.0.0.0 now shows that something big happened. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have been thinking about this. My mental model says the first digit is for big things, like architectural changes. So a 1.0 bump is appropriate. So long as people do not think it is now in some sense |
||
synopsis: Provide a common engine to power any Haskell IDE | ||
description: Please see README.md | ||
homepage: http://github.com/githubuser/haskell-ide-engine#readme | ||
|
@@ -29,7 +29,7 @@ library | |
Haskell.Ide.Engine.Plugin.Build | ||
Haskell.Ide.Engine.Plugin.Example2 | ||
Haskell.Ide.Engine.Plugin.Floskell | ||
Haskell.Ide.Engine.Plugin.GhcMod | ||
Haskell.Ide.Engine.Plugin.Bios | ||
Haskell.Ide.Engine.Plugin.HaRe | ||
Haskell.Ide.Engine.Plugin.Haddock | ||
Haskell.Ide.Engine.Plugin.HfaAlign | ||
|
@@ -39,6 +39,7 @@ library | |
Haskell.Ide.Engine.Plugin.Package | ||
Haskell.Ide.Engine.Plugin.Package.Compat | ||
Haskell.Ide.Engine.Plugin.Pragmas | ||
Haskell.Ide.Engine.Plugin.Generic | ||
Haskell.Ide.Engine.Scheduler | ||
Haskell.Ide.Engine.Support.Fuzzy | ||
Haskell.Ide.Engine.Support.HieExtras | ||
|
@@ -65,21 +66,18 @@ library | |
, fold-debounce | ||
, ghc >= 8.0.1 | ||
, ghc-exactprint | ||
, ghc-mod >= 5.9.0.0 | ||
, ghc-mod-core >= 5.9.0.0 | ||
, gitrev >= 1.1 | ||
, haddock-api | ||
, haddock-library | ||
, haskell-lsp == 0.9.* | ||
, haskell-lsp-types == 0.9.* | ||
, haskell-lsp == 0.10.* | ||
, haskell-lsp-types == 0.10.* | ||
, haskell-src-exts | ||
, hie-plugin-api | ||
, hlint >= 2.0.11 | ||
, hoogle >= 5.0.13 | ||
, hsimport | ||
, hslogger | ||
, lens >= 4.15.2 | ||
, monad-control | ||
, monoid-subclasses > 0.4 | ||
, mtl | ||
, optparse-simple >= 0.0.3 | ||
|
@@ -95,6 +93,9 @@ library | |
, vector | ||
, yaml >= 0.8.31 | ||
, yi-rope | ||
, hie-bios | ||
, bytestring-trie | ||
, unliftio | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unliftio dependency is unused I think? It was intended to replace monad-control as the monad stack is now a RIO. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to remove the |
||
ghc-options: -Wall -Wredundant-constraints | ||
if flag(pedantic) | ||
ghc-options: -Werror | ||
|
@@ -106,7 +107,7 @@ executable hie | |
other-modules: Paths_haskell_ide_engine | ||
build-depends: base | ||
, directory | ||
, ghc-mod-core | ||
, hie-bios | ||
, haskell-ide-engine | ||
, haskell-lsp | ||
, hie-plugin-api | ||
|
@@ -125,7 +126,7 @@ executable hie-wrapper | |
other-modules: Paths_haskell_ide_engine | ||
build-depends: base | ||
, directory | ||
, ghc-mod-core | ||
, hie-bios | ||
, haskell-ide-engine | ||
, haskell-lsp | ||
, hie-plugin-api | ||
|
@@ -144,14 +145,14 @@ library hie-test-utils | |
build-depends: base | ||
, haskell-ide-engine | ||
, haskell-lsp | ||
, hie-bios | ||
, hie-plugin-api | ||
, aeson | ||
, blaze-markup | ||
, containers | ||
, data-default | ||
, directory | ||
, filepath | ||
, ghc-mod-core | ||
, hslogger | ||
, hspec | ||
, hspec-core | ||
|
@@ -187,7 +188,7 @@ test-suite unit-test | |
, filepath | ||
, free | ||
, haskell-ide-engine | ||
, haskell-lsp-types >= 0.4 | ||
, haskell-lsp-types | ||
, hie-test-utils | ||
, hie-plugin-api | ||
, hoogle > 5.0.11 | ||
|
@@ -263,6 +264,7 @@ test-suite func-test | |
, HaReSpec | ||
, HighlightSpec | ||
, HoverSpec | ||
, ProgressSpec | ||
, ReferencesSpec | ||
, RenameSpec | ||
, SymbolsSpec | ||
|
@@ -275,9 +277,9 @@ test-suite func-test | |
, data-default | ||
, directory | ||
, filepath | ||
, lsp-test >= 0.5.1.1 && < 0.5.2 | ||
, lsp-test >= 0.5.1.3 | ||
, haskell-ide-engine | ||
, haskell-lsp-types >= 0.4 | ||
, haskell-lsp-types == 0.10.* | ||
, hie-test-utils | ||
, hie-plugin-api | ||
, hspec | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# NB: don't set `language: haskell` here | ||
fendor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for. | ||
env: | ||
- CABALVER=1.24 GHCVER=8.0.2 | ||
- CABALVER=2.0 GHCVER=8.2.2 | ||
- CABALVER=2.2 GHCVER=8.4.4 | ||
- CABALVER=2.4 GHCVER=8.6.3 | ||
- CABALVER=head GHCVER=head # see section about GHC HEAD snapshots | ||
|
||
matrix: | ||
allow_failures: | ||
- env: CABALVER=head GHCVER=head | ||
|
||
# Note: the distinction between `before_install` and `install` is not important. | ||
before_install: | ||
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc | ||
- travis_retry sudo apt-get update | ||
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER happy alex | ||
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH | ||
|
||
install: | ||
- cabal --version | ||
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]" | ||
- travis_retry cabal update | ||
- cabal install --only-dependencies --enable-tests --enable-benchmarks | ||
|
||
# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail. | ||
script: | ||
- if [ -f configure.ac ]; then autoreconf -i; fi | ||
- cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging | ||
- cabal build # this builds all libraries and executables (including tests/benchmarks) | ||
- cabal test | ||
- cabal check |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
2018-12-18 v0.0.0 | ||
* First release |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Copyright (c) 2009, IIJ Innovation Institute Inc. | ||
fendor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions | ||
are met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above copyright | ||
notice, this list of conditions and the following disclaimer in | ||
the documentation and/or other materials provided with the | ||
distribution. | ||
* Neither the name of the copyright holders nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in mpickering#14