Commit Graph

64 Commits

Author SHA1 Message Date
Pepe Iborra
3ef4ef99c4
Prepare for archiving the Github project (#965) 2020-12-30 18:07:58 +00:00
Jan Hrcek
9d0fc445a4
Update URLs after move to haskell github org (#950) 2020-12-13 07:56:38 +00:00
Pepe Iborra
92db8207e2
Deprecate ghcide tool and delete the VSCode extension (#939)
* Delete the extension and deprecate ghcide as an end user tool

* Link to this PR
2020-12-08 21:33:07 +00:00
Samuel Ainsworth
51f70d410a
Update README.md (#924) 2020-11-28 16:21:02 +00:00
Pepe Iborra
90b859b202
Add a GitHub action for the Nix build (#918)
* Add an action to build and cache the nix-shell

* [nix] ghc-paths must always be in the package set

Otherwise ghc-check will not get the Nix libdir and fail at compile time

* [nix] extract the nixpkgs instantiation to nix/default.nix

* [nix] niv init

* [nix] switch to haskell-updates

* Mention the Cachix binary cache in the README

* [nix] pin the version used to set up Cachix

* [nix] disable tests and jailbreak 8.10.x packages

* [nix] rely on cabal2nix to enumerate the dependencies

* [nix] install haskell tools from the Nix cache
2020-11-23 09:38:15 +00:00
Pepe Iborra
03e89d9b47
GitHub test action (#903)
* Add github test action

* Disable unreliable test

Does not work reliably on all platforms.

Reenable when #861 lands

* Add hlint and -Werror

* Explicit timeout

6h is the default and also the maximum:

https://docs.github.com/en/free-pro-team@latest/actions/reference/usage-limits-billing-and-administration

* Experiment tests to use Cabal instead of Stack

* Fix an unreliable test

* Trim down matrix

* Add ghc-lib to the test matrix

* Address broken hie-compat ghc-lib build

* Drop stack descriptor family

We keep two stack descriptors:

- One for Nightly
- One for Windows (stuck in GHC 8.10.1)

To ensure that `stack test` doesn't break, we keep running the stack tests in CI

* Update README to point end users to HLS

* Drop support for `stack test`
2020-11-15 23:08:17 +00:00
Pepe Iborra
0d7cae9846
Improve hist benchmarks driver and add to CI (#770)
* Remove hardcoded --stack-yaml and upstream/master assumption

* support Cabal in bench suite

* add benchmark run to CI

Even if the time measurements are unreliable in a shared CI environment, the
memory usage will be an accurate indicator of space leaks

* Update bench/README

* use origin/master

* default to stack in benchmarks (for CI)

* ignore ghcide-bench and ghcide-preprocessor binaries too

* Review feedbacks

* Add the v0.3.0 tag in bench/hist.yaml

commented out to keep the CI time as tight as possible

* Add .artifactignore file to avoid publishing binaries in azure bench pipeline

* use default stack.yaml
2020-09-06 21:54:45 +01:00
wz1000
b4589aebe6
Typecheck entire project on Initial Load and typecheck reverse dependencies of a file on saving (#688)
* Add new command to GetModuleGraph for a session and propate changes to
modules

Only propagate changes to parent modules when saving

Typecheck files when they are opened, don't TC FOI

Add known files rule

Don't save ifaces for files with defered errors

Co-authored-by: Zubin Duggal <zubin@cmi.ac.in>

* Add configuration for parent typechecking

* hlint ignore

* Use targets to filter located imports (#10)

* Use targets to filter located imports

* Remove import paths from the GHC session

Otherwise GHC will prioritize source files found in the import path

* Update session-loader/Development/IDE/Session.hs

Co-authored-by: Pepe Iborra <pepeiborra@me.com>

* Add session-loader to hie.yaml (#714)

* move known files rule to RuleTypes

* Disable checkParents on open and close document (#12)

* Really disable expensive checkParents

* Add an option to check parents on close

Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
Co-authored-by: Pepe Iborra <pepeiborra@me.com>
Co-authored-by: Luke Lau <luke_lau@icloud.com>
2020-09-02 18:06:04 +01:00
Pepe Iborra
6128c74ba2
Prepare release of ghcide 0.3.0 (#753)
* Prepare release of ghcide 0.3.0

* Add ghcide contributors to copyright
2020-09-02 17:34:28 +01:00
Pepe Iborra
bd51ad0a63
Make BenchHist non buildable by default and save logs (#666)
* [bench-hist] save messages to log file

And fix the commitid rule to always rerun the git query

* Do not build benchHist by default

Hopefully avoiding the additional dependencies for charts

* Simplify with FileStdout

* Add a flag for bench-hist

Could benchHist be a benchmark instead of an executable, removing the need
for this flag?

Almost. `stack bench` fails because `benchHist` cannot find `ghcide-bench`
in the path. It seems like a bad idea to have a benchmark that fails out of
the box

* Turn benchHist into a benchmark and ghcide-bench into an exe

This works out nicely because:

1. benchHist already runs ghcide-bench,
2. benchHist has additional deps, but ghcide-bench does not.
   (benchmark deps don't get built by default)
3. This is the only way I've found to get ghcide-bench in the PATH for benchHist

* Remove redundant dep on applicative-combinators

* Bump versions in stack-ghc-lib.yaml

* update lower bounds for extra in benchHist executable

* Update README guideline on benchmarks

* [benchHist] Fix the commitid rule to always rerun the git query

* fix caps
2020-06-29 11:00:53 +02:00
Pepe Iborra
5b8d7fa661
Add a note on differential benchmarks (#647) 2020-06-22 10:22:07 +02:00
Matthew Pickering
373c4060df
Multi Component (#522)
* Multi component support

In this commit we add support for loading multiple components into one
ghcide session.

The current behaviour is that each component is loaded lazily into the
session. When a file from an unrecognised component is loaded, the
cradle is consulted again to get a new set of options for the new
component. This will cause all the currently loaded files to be
reloaded into a new HscEnv which is shared by all the currently known
components. The result of this is that functions such as go-to
definition work between components if they have been loaded into the
same session but you have to open at least one file from each component
before it will work.

Only minimal changes are needed to the internals to ghcide to make the
file searching logic look in include directories for all currently
loaded components. The main changes are in exe/Main.hs which has been
heavily rewritten to avoid shake indirections. A global map is created
which maps a filepath to the HscEnv which should be used to compile it.
When a new component is created this map is completely refreshed so each
path maps to a new

Which paths belong to a componenent is determined by the targets listed
by the cradle. Therefore it is important that each cradle also lists all
the targets for the cradle. There are some other choices here as well
which are less accurate such as mapping via include directories  which
is the aproach that I implemented in haskell-ide-engine.

The commit has been tested so far with cabal and hadrian.

Also deleted the .ghci file which was causing errors during testing and
seemed broken anyway.

Co-authored-by: Alan Zimmerman <alan.zimm@gmail.com>
Co-authored-by: fendor <power.walross@gmail.com>

* Final tweaks?

* Fix 8.4 build

* Add multi-component test

* Fix hlint

* Add cabal to CI images

* Modify path

* Set PATH in the right place (hopefully)

* Always generate interface files and hie files

* Use correct DynFlags in mkImportDirs

You have to use the DynFlags for the file we are currently compiling to
get the right packages in the package db so that lookupPackage doesn't
always fail.

* Revert "Always generate interface files and hie files"

This reverts commit 820aa24189.

* remove traces

* Another test

* lint

* Unset env vars set my stack

* Fix extra-source-files

As usual, stack doesn’t understand Cabal properly and doesn’t seem to
like ** wildcards so I’ve enumerated it manually.

* Unset env locally

Co-authored-by: Alan Zimmerman <alan.zimm@gmail.com>
Co-authored-by: fendor <power.walross@gmail.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-06-02 14:44:16 +02:00
Aodhnait Étaín
95faeebfba
Add Kakoune section to the README (#592)
* Add kakoune installation instructions

* Add additional files to roots field
2020-06-02 10:00:19 +02:00
maralorn
5ac6e200c0
Extend nix explanations in README (#549)
* Extend nix explanations in README

* Correct ghcide-nix url

Co-authored-by: Domen Kožar <domen@enlambda.com>

Co-authored-by: Domen Kožar <domen@enlambda.com>
2020-05-13 19:46:45 +02:00
Carlo Hamalainen
f080f67d0e
Update README with link to Docker build for Neovim and ghcide (#541)
* Add some troubleshooting notes.

* Update README with link to docker-ghcide-neovim instructions.

* Update README
2020-05-04 10:02:31 +02:00
Neil Mitchell
397323807b
#510, mention haskell-language-server in the README (#513) 2020-04-27 10:02:29 +02:00
Pepe Iborra
f804b138dc
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 12:39:53 +01:00
Alan Zimmerman
111b6855e2
Use tasty-rerun to allow rerunning failed tests only (#484)
Use by

  stack --stack-yaml=stack84.yaml test --test-arguments "--rerun"
2020-03-16 09:07:50 +01:00
Neil Mitchell
967f901560
Add a note about hacking on ghcide from Windows (#463)
* Add a note about hacking on ghcide from Windows

See https://github.com/digital-asset/ghcide/pull/435#issuecomment-592504569 for context

* Update README.md

Co-Authored-By: Javier Neira  <atreyu.bbb@gmail.com>

Co-authored-by: Javier Neira  <atreyu.bbb@gmail.com>
2020-03-02 09:08:27 +01:00
Andy
1929fde73c Readme: Consistent language server command (#332)
Solves #331
2020-01-19 16:18:28 +01:00
Nikos Baxevanis
31edb5b010 Add Sublime Text section on the README (#287) 2019-12-20 09:47:00 +01:00
Neil Mitchell
81f78a403b Add Atom plugin link (#278)
* Add Atom plugin link

* Fix typo
2019-12-18 23:00:43 +01:00
tomjaguarpaw
876df26c6a Clarify that eglot requires Emacs 26.1+ (#217)
(according to https://github.com/joaotavora/eglot#1-2-3)
2019-12-01 18:15:36 +01:00
Moritz Kiefer
78aa974579
Remove organize imports from the supported features (#202)
We never supported this and still don’t so for now let’s remove it.
2019-11-18 09:37:16 +01:00
Aniket Deshpande
19c4a6b38f Add configuration example for SpaceVim (#184)
...using its default configuration layers
2019-11-04 20:04:53 +01:00
Moritz Kiefer
58b997d1aa
Prepare for new releases (#173)
* Prepare for new releases

* More accurate changelog
2019-10-20 17:57:34 -04:00
Jacek Generowicz
3d34065ad4 Add eglot instruction to Emacs section of README (#169) 2019-10-16 16:56:02 +02:00
Neil Mitchell
e7d3d129ae #129, add a very basic setup guide (#142) 2019-09-30 08:54:57 +02:00
Moritz Kiefer
833c18c876
Point to the VSCode marketplace in the readme (#134)
* Point to the VSCode marketplace in the readme

* Move instructions for building the VSCode extension to Hacking section
2019-09-25 15:25:32 +02:00
Neil Mitchell
f929681493 #9, mention the CLA in the readme (#128) 2019-09-25 08:16:33 +02:00
maralorn
06bde2bf3a Add type signature inserting to feature list (#95) 2019-09-20 07:21:43 +02:00
Matthew Pickering
8fb63de063 Update link (#97) 2019-09-20 07:21:24 +02:00
Dmitry Dzhus
7adc3bc131 Fix a typo (#93) 2019-09-19 19:43:15 +02:00
maralorn
54633c9229 Improve and extend feature list (#84)
* Improve and extend feature list

* Fix typo in feature table
2019-09-19 19:39:27 +02:00
Neil Mitchell
eba0185710 Add section on history and relationship to other IDE's (#78) 2019-09-17 08:52:58 +02:00
maralorn
01d423749b
Add organze imports feature to feature list 2019-09-14 15:37:35 +02:00
maralorn
8e0a2cb798
Add display definitions feature 2019-09-14 15:30:40 +02:00
maralorn
fd17b17a23
Add go-to-definition in feature list 2019-09-14 15:26:15 +02:00
maralorn
4d460c43a6
Add feature list
This is a certainly incomplete list of features already implemented. Please expand!
2019-09-14 15:24:26 +02:00
Moritz Kiefer
938a3c6f18
Merge pull request #63 from maralorn/patch-1
Delete non-ghcide options from coc.nvim example
2019-09-14 13:33:27 +02:00
Moritz Kiefer
855c18ea93
Merge pull request #58 from hercules-ci/extension-update
migrate to new @types/vscode, add vsce devDependency
2019-09-14 12:52:35 +02:00
maralorn
17d6dcb880
Delete non-ghcide options from coc.nvim example
These options don‘t work with ghcide as far as I can tell. I believe they stem from copying the config used for hie-wrapper. As ghcide does not support hlint yet I believe this infos to be misleading. That‘s why I suggest deleting it.
2019-09-14 12:36:39 +02:00
Robert Hensing
0fc96368d3 migrate to new @types/vscode, add vsce devDependency
The vscode library is deprecated in favor of @types/vscode.
See https://code.visualstudio.com/api/working-with-extensions/testing-extension#migrating-from-vscode

This also add vsce as a devDependency, so you don't need to install
it globally. Instead you can run it via npm run vscepackage. This
simplifies the README (or future "hacking" instructions when the
extension is published)
2019-09-13 13:16:38 +02:00
2mol
a8d31ce7fa
fix type in README 2019-09-13 11:53:53 +02:00
Robin Krom
3589042a3f Added setup instructions for vim/coc to README
Instructions to setup https://github.com/neoclide/coc.nvim and neovim
together with ghcide.
2019-09-11 15:45:15 +02:00
Alexander Diemand
d5c44cca50
building extension in correct path
Signed-off-by: Alexander Diemand <codieplusplus@apax.net>
2019-09-11 12:09:49 +02:00
Moritz Kiefer
a1e8bea46d Update README 2019-09-10 16:21:10 +02:00
Moritz Kiefer
5da86c3e44 Rename hie-core to ghcide (#2820)
* Rename hie-core to ghcide

The name `hie-core` has caused a lot of confusion as to how we relate
to haskell-ide-engine so changing it should hopefully help with that.
I also think that ghcide is still a good name once we hopefully
integrate with haskell-ide-engine more closely.

The name ghcide seems to have a reasonable amount of support on
Twitter https://twitter.com/ndm_haskell/status/1170681262987710464
which is of course the only good way to come up with names.

* Add a readme that points people to the new directory.

* Fix bogus replacements

* Use a proper link

* links are hard
2019-09-10 15:01:29 +02:00
Domen Kožar
42461d1c2a README: add notes for Nix installation (#2805) 2019-09-10 14:52:17 +02:00
Tobias Pflug
bbb1ffc543 Add languageclient-neovim info to README (#2806) 2019-09-10 14:52:17 +02:00