-
Notifications
You must be signed in to change notification settings - Fork 25
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
Couldn't match type ‘ComponentLocalBuildInfo -> String’ with ‘[Char]’ #17
Comments
Not a bug per se, just an API change in Up until autogenModulesDir :: LocalBuildInfo -> String But in the HEAD version of autogenModulesDir :: LocalBuildInfo -> ComponentLocalBuildInfo -> String That's why the error message gripes about Keep in mind that
|
That's grand, so. I've downgraded to an earlier version of Cabal and cabal-install. |
Hey guys. Cabal is willing to update code to make the BC break less severe. The reason So, I could imagine reverting In the particular case here, it's a pretty easy refactor to use the new API: calculate dir with |
If at all possible I'd like to be able to build code across old and new versions of cabal. Beyond that I care very little about what goes into the sausage we make. Reopening this because unless there is a change, or a workaround we figure out, or something then this really will be an issue. |
when GHC 8.2 comes around, will your support window assume a cabal-install that knows how to deal with custom-setup? Then you can start macros and things are easy. |
I'd really like to be able to keep supporting older GHCs and distributions with this package in particular, because otherwise I have to commit to cutting off support for everything I write on older GHCs. In the absence of breaking builds on older cabals, if I put a |
Yes, if you add a custom-setup, for all versions of cabal-install which understand it, you will get a Cabal version macro. |
But, if I add the tag to my cabal file, I have to bring the |
No, custom-setup specifically doesn't require you to bump cabal-version (it was specifically to avoid this problem). So the worst that will happen is that old Cabal users will see a "not understood stanza" error. |
Also, if you want to quickly work around this problem when building diff --git a/Setup.lhs b/Setup.lhs
index 46dc623..51fd42a 100644
--- a/Setup.lhs
+++ b/Setup.lhs
@@ -24,10 +24,10 @@ main = defaultMainWithHooks simpleUserHooks
generateBuildModule :: Verbosity -> PackageDescription -> LocalBuildInfo -> IO ()
generateBuildModule verbosity pkg lbi = do
- let dir = autogenModulesDir lbi
- createDirectoryIfMissingVerbose verbosity True dir
withLibLBI pkg lbi $ \_ libcfg -> do
withTestLBI pkg lbi $ \suite suitecfg -> do
+ let dir = autogenModulesDir lbi suitecfg
+ createDirectoryIfMissingVerbose verbosity True dir
rewriteFile (dir </> "Build_" ++ testName suite ++ ".hs") $ unlines
[ "module Build_" ++ testName suite ++ " where"
, "" |
I've started a |
This might also be of interest: haskell/cabal#3576 |
Yes please. This change broke half the internet for me. |
OK, well, here you go. |
@ezyang: For those who want to expunge deprecation warnings from their code: is it sufficient to simply change |
Absolutely not. You should look at the use-site of |
Ah, thanks for clearing that up. I'll make it a point not to use And I agree that we should be working on porting these scripts to use |
Well, the reason why |
I think I can adapt a trick from @glguy to make this work portably. |
hvr's Ubuntu GHC PPA now has a GHC HEAD build that incorporates this commit, which restores the (now-deprecated) We still need to port over all of @ekmett's |
Note that I'm using cabal-install version 1.25.0.0 (from the git repo) and ghc 7.10.3. Perhaps this is a bug in the new cabal-install? Unfortunately, I don't understand the error message well enough to tell.
The text was updated successfully, but these errors were encountered: