Skip to content

Conversation

@ulidtko
Copy link

@ulidtko ulidtko commented Mar 9, 2020

Fixes half of #94: specifically, build breakage caused by https://gitlab.haskell.org/ghc/packages/Cabal/commit/3d9a49073d71b2597662a389406a94fcb9b399b2 — some deprecations are finally being removed in Cabal 3.0.0.

@ulidtko
Copy link
Author

ulidtko commented Mar 9, 2020

Travis isn't happy with this:

src/Cabal.hs:48:8:
    Could not find module ‘Distribution.Types.LocalBuildInfo’
    Perhaps you meant
      Distribution.Simple.LocalBuildInfo (from Cabal-1.18.1.5)

... on GHC 7.8 Cabal 1.18, and on stack < lts-10.

Hmmm. That sounds about right, but I'm not sure how to properly reimplement componentNameCLBIs for older Cabal...

@ulidtko ulidtko force-pushed the fix-cabal-3.0-deprecations branch 3 times, most recently from ec1fcc0 to fd0f874 Compare March 10, 2020 19:56
@ulidtko ulidtko force-pushed the fix-cabal-3.0-deprecations branch from fd0f874 to 61f85b7 Compare March 10, 2020 20:38
@brailsmt
Copy link

Any update to this? I just tried stack install hdevtools and got the same error. [1]. I clone the hdevtools repo and updated the base dependency to '4.12.*' and i just successfully built it. I have no idea if that is the right fix as I'm fairly new to haskell.

diff --git a/hdevtools.cabal b/hdevtools.cabal
index 0b2ed6d..f835f15 100644
--- a/hdevtools.cabal
+++ b/hdevtools.cabal
@@ -64,7 +64,7 @@ executable hdevtools
                        Util,
                        Paths_hdevtools
 
-  build-depends:       base == 4.*,
+  build-depends:       base == 4.12.*,
                        cmdargs,
                        directory,
                        filepath,

[1] https://gist.github.com/brailsmt/f1511785d112dd31113114778c016ec2

@ulidtko
Copy link
Author

ulidtko commented May 20, 2020

@brailsmt nope, not much progress here on my side.

updated the base dependency to '4.12.*' and i just successfully built it.

Well that's not an update; you've pinned the base to an older version. Since you don't give any of detail on how exactly you built it locally, I'd guess that you ended up using an older GHC, perhaps 8.6.5.

When hdevtools does fail to compile — is with GHC 8.8.*, because it's a major update, they intentionally brake the GHC API (and the Cabal API) between major updates. E.g. removing deprecated stuff, like in this case.

stack lts-15.13 has GHC 8.8.3, and base 4.13.0.0.

So this is certainly not a proper fix for the package; just a workaround-downgrade.

The proper fix would adapt the usage of Cabal and GHC APIs by hdevtools, so that deprecated (and recently removed) functions are not used.

I did attempt some of that — but as you can see, it took too long, and I'd stopped on the tracks. Any help would be appreciated.

@ulidtko
Copy link
Author

ulidtko commented May 20, 2020

Here's one helpful table to clarify GHC version issues: https://www.fosskers.ca/en/blog/base

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants