Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cabal-helper 1.0 #26

Merged
merged 33 commits into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
52940fb
Use cabal-helper 1.0
fendor Oct 3, 2019
26d0ddd
Update .gitmodules to use DanielG's cabal-helper
fendor Oct 11, 2019
a1bac07
Re-implement cabal-helper cradle
fendor Oct 13, 2019
294c401
Update hie-bios
fendor Oct 13, 2019
52b60ba
Fix builds for stack
fendor Oct 13, 2019
ae844a0
Change HaRe submodule to use different remote
fendor Oct 14, 2019
7def514
Update .gitmodules
fendor Oct 14, 2019
799bfd6
Fix multi-component support for cabal-helper cradle
fendor Oct 14, 2019
408b0b5
Add real error messages
fendor Oct 14, 2019
2fdcb3a
Add none-cradle if file does not belong to any package
fendor Oct 15, 2019
c41eed0
Fix cabal-helper multi-packages support
fendor Oct 15, 2019
2ffb17e
More Documentation
fendor Oct 15, 2019
b72e606
Refactor functions and add Documentation
fendor Oct 16, 2019
91a56b0
Improve comments
fendor Oct 25, 2019
b28e944
Upgrade stack version in circleci to 2.1.3
fendor Oct 25, 2019
c84b33f
.gitmodules, use https instead of ssh
fendor Oct 25, 2019
ed6d66b
Fix stack for ghc 8.6.5
fendor Oct 26, 2019
83c5090
Bump cabal-helper version to latest master a1c4a37
fendor Oct 26, 2019
cc40b6f
Implement perfect match for c-h-h cradle discovery
fendor Oct 28, 2019
7e7bd1d
Remove unused Language Pragma
fendor Oct 28, 2019
92add4e
Fix stripFilePath function
fendor Oct 29, 2019
c45714e
Remove comments from .gitmodules
fendor Oct 29, 2019
0517eaa
Implement the ancestors function
fendor Oct 29, 2019
97e6617
If not package can be found, return none-cradle
fendor Oct 29, 2019
b775f13
Prefer canonicalisePath over normalise
fendor Oct 29, 2019
b4f2326
Remove redundant check for stack installation
fendor Oct 29, 2019
9ceec1e
Move function relativeTo to the bottom of the file
fendor Oct 29, 2019
4309653
Move utility functions to the bottom of Cradle.hs
fendor Oct 31, 2019
9ee8156
Add exhautive documentation for Cabal-Helper-Helper implementation
fendor Oct 31, 2019
232e7d6
Update Documentation, e.g. fix typos and add explanations
fendor Nov 1, 2019
3ed7833
Fix typo in documentation of the project root discovery
fendor Nov 5, 2019
a19ff9c
Catch exceptions on initialisation and add explicit import list
fendor Nov 5, 2019
4a80ec3
Rework comments that do not make sense
fendor Nov 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ defaults: &defaults
- stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "stack-build.txt" }}
- stack-cache-{{ .Environment.HIE_CACHE }}-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "resolver.txt" }}

# - run:
# name: Stack upgrade
# command: stack upgrade
- run:
name: Stack upgrade
command: stack upgrade

- run:
name: Stack setup
Expand Down
10 changes: 2 additions & 8 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,16 @@

[submodule "submodules/HaRe"]
path = submodules/HaRe
# url = https://github.com/bubba/HaRe.git
url = https://github.com/wz1000/HaRe.git

[submodule "submodules/cabal-helper"]
path = submodules/cabal-helper
# url = https://github.com/arbor/cabal-helper.git
url = https://github.com/alanz/cabal-helper.git
# url = https://github.com/DanielG/cabal-helper.git
url = https://github.com/DanielG/cabal-helper.git

[submodule "submodules/ghc-mod"]
path = submodules/ghc-mod
# url = https://github.com/arbor/ghc-mod.git
url = https://github.com/alanz/ghc-mod.git
#url = https://github.com/mpickering/ghc-mod.git
url = https://github.com/fendor/ghc-mod.git
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this dependency used for now?

Copy link
Collaborator Author

@fendor fendor Oct 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ghc-project-types, which depends on c-h and hie-plugin-api depends on https://github.com/mpickering/haskell-ide-engine/blob/hie-bios/hie-plugin-api/Haskell/Ide/Engine/Ghc.hs#L301 which is exposed in ghc-project-types and HaRe uses this function.
We need this ghc-mod dep, because c-h has a minor change in the API. The diff in ghc-mod has like 3 changes, like, bumping c-h version, removing unknown type and adding instances for some type.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can eventually move ghc-project-types into another location if needed, possibly into hie itself.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I would love that! This would actually enable us to go to hackage, once c-h version 1.0 has been published!


[submodule "hie-bios"]
path = hie-bios
url = https://github.com/mpickering/hie-bios.git
branch = multi-cradle
2 changes: 0 additions & 2 deletions app/MainHie.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import System.IO
import Haskell.Ide.Engine.Plugin.ApplyRefact
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.Bios
import Haskell.Ide.Engine.Plugin.HaRe
Expand All @@ -55,7 +54,6 @@ plugins includeExamples = pluginDescToIdePlugins allPlugins
[ applyRefactDescriptor "applyrefact"
, baseDescriptor "base"
, brittanyDescriptor "brittany"
, buildPluginDescriptor "build"
, haddockDescriptor "haddock"
, hareDescriptor "hare"
, hoogleDescriptor "hoogle"
Expand Down
3 changes: 1 addition & 2 deletions haskell-ide-engine.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ library
Haskell.Ide.Engine.Options
Haskell.Ide.Engine.Plugin.ApplyRefact
Haskell.Ide.Engine.Plugin.Brittany
Haskell.Ide.Engine.Plugin.Build
Haskell.Ide.Engine.Plugin.Example2
Haskell.Ide.Engine.Plugin.Floskell
Haskell.Ide.Engine.Plugin.Bios
Expand Down Expand Up @@ -58,7 +57,7 @@ library
, brittany
, bytestring
, Cabal
, cabal-helper >= 0.8.0.4
, cabal-helper >= 1.0 && < 1.1
, containers
, data-default
, directory
Expand Down
Loading