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

Cabal omits true branch in conditional #9

Closed
cstrahan opened this issue Apr 4, 2015 · 14 comments
Closed

Cabal omits true branch in conditional #9

cstrahan opened this issue Apr 4, 2015 · 14 comments
Labels

Comments

@cstrahan
Copy link

cstrahan commented Apr 4, 2015

Pandoc's cabal file gets mangled by jailbreak-cabal; this:

Executable make-pandoc-man-pages
  Main-Is:       make-pandoc-man-pages.hs
  Hs-Source-Dirs: man
  Build-Depends: pandoc,
                 base >= 4.2 && < 5,
                 directory >= 1 && < 1.3,
                 filepath >= 1.1 && < 1.4,
                 old-time >= 1.0 && < 1.2,
                 time >= 1.2 && < 1.6
  Default-Language: Haskell98
  if flag(make-pandoc-man-pages)
    Buildable:   True
  else
    Buildable:   False

is turned into this:

executable make-pandoc-man-pages

    if flag(make-pandoc-man-pages)
    else
        buildable: False
    main-is: make-pandoc-man-pages.hs
    build-depends:
        pandoc -any,
        base -any,
        directory -any,
        filepath -any,
        old-time -any,
        time -any
    default-language: Haskell98
    hs-source-dirs: man

Note: this is using jailbreak-cabal compiled with GHC 7.10.

(for reference: http://hackage.haskell.org/package/pandoc-1.13.2/revision/2.cabal)

@abbradar
Copy link
Member

This also breaks cheapskate build, which is needed for Idris.

@abbradar
Copy link
Member

haskell/cabal#2598

@cstrahan
Copy link
Author

@abbradar Thank you for submitting the issue upstream.

@peti peti added the bug label May 19, 2015
@peti
Copy link
Member

peti commented May 19, 2015

Interestingly enough, the problem doesn't seem to occur when building jailbreak-cabal with Cabal 1.18.x.

@abbradar
Copy link
Member

One possible workaround for now can be using jailbreak-cabal from packages.ghc784; would it be hard/too hacky?

@peti
Copy link
Member

peti commented May 19, 2015

It's possible. It would just trigger a lot of re-builds, I suppose, so it's kind-of expensive.

@abbradar
Copy link
Member

Yeah, already noticed that. I have come with a rather hacky solution instead: abbradar/nixpkgs@c877e29 . Do we want this ugly thing mainlined or rather wait till the proper fix? OTOH this allows us to build affected packages.

@abbradar
Copy link
Member

NM, I looked at how pandoc problem is avoided and think I'll just use sed too.

@peti
Copy link
Member

peti commented May 19, 2015

I pushed peti/nixpkgs@daeefd2 to have test builds run at http://hydra.cryp.to/jobset/nixpkgs/haskell-updates.

@peti
Copy link
Member

peti commented May 19, 2015

I've edited the jailbreak-cabal page on Hackage to constrain the Cabal version to 1.18.x: http://hackage.haskell.org/package/jailbreak-cabal-1.3/revisions/.

@peti
Copy link
Member

peti commented May 20, 2015

Well, the version built with Cabal 1.18.x causes build failures, too: http://hydra.cryp.to/eval/457274#tabs-still-fail. The refcount package illustrates the issue: http://hydra.cryp.to/build/870257/log/raw. I'm not yet sure what's going on there, but those packages built correctly when we were using jailbreak-cabal with Cabal 1.22.x.

@abbradar
Copy link
Member

Ouch! Does using Cabal 1.20.x fix this? If not, I can investigate! (fix: this should have been an exclamation)

Another fix: Tested on refcount; looks like it's good now.

peti added a commit to peti/nixpkgs that referenced this issue May 21, 2015
@peti
Copy link
Member

peti commented May 21, 2015

OK, building jailbreak-cabal with Cabal 1.20.x gives us the best performance for the time being. I'll merge the updates to master in a minute.

@peti
Copy link
Member

peti commented Aug 6, 2015

Contrary to what commit haskell/cabal@e6bff69 says, this issue does not appear to be fixed in Cabal 1.22.4.0. When I build jailbreak-cabal with GHC 7.10.2, then it breaks the pandoc.cabal file just like old versions used to.

@peti peti reopened this Aug 6, 2015
@peti peti changed the title Omits true branch in conditional Cabal omits true branch in conditional Aug 6, 2015
peti added a commit to NixOS/nixpkgs that referenced this issue Aug 7, 2015
NixOS/jailbreak-cabal#9 forced us to use a
binary version of jailbreak-cabal built with ghc 7.8.x in the 7.10.x
package set, which is awkward. Upstream fixed the underlying issue
in haskell/cabal#2598, but unfortunately
that fix didn't make it into the Cabal 1.22.4.0 release shipped by
ghc 7.10.2.

Now, we work around that issue by building jailbreak-cabal with an
unreleased development snapshot of Cabal in the ghc 7.10.x package
set.

Closes #8901.
@peti peti closed this as completed in 243ecf0 Jan 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants