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

Incompatible API change in Cabal 1.24.1.0 / PVP Violation #4123

Closed
hvr opened this issue Nov 20, 2016 · 7 comments
Closed

Incompatible API change in Cabal 1.24.1.0 / PVP Violation #4123

hvr opened this issue Nov 20, 2016 · 7 comments

Comments

@hvr
Copy link
Member

hvr commented Nov 20, 2016

It appears as if Cabal 1.24.1.0 introduced a non-backward compatible change;

I noticed this because when cabal-install-1.24.0.0 is compiled with Cabal-1.24.1.0 one ends up with the following compile error:

[106 of 106] Compiling Main             ( Main.hs, /tmp/matrix-worker/1479637119/dist-newstyle/build/x86_64-linux/ghc-7.10.3/cabal-install-1.24.0.0/build/cabal/cabal-tmp/Main.o )

Main.hs:904:35:
    Couldn't match type ‘Cabal.HaddockTarget’ with ‘Bool’
    Expected type: Flag Bool
      Actual type: Flag Cabal.HaddockTarget
    In the second argument of ‘($)’, namely
      ‘haddockForHackage haddockFlags’
    In the first argument of ‘when’, namely
      ‘(fromFlagOrDefault False $ haddockForHackage haddockFlags)’

Main.hs:1106:69:
    Couldn't match expected type ‘Cabal.HaddockTarget’
                with actual type ‘Bool’
    In the first argument of ‘Flag’, namely ‘True’
    In the ‘haddockForHackage’ field of a record

Further investigation reveals that the culprit appears to be a0b4956

which changed the type-signatures in Distribution.Simple.BuildPaths:

-hscolourPref :: FilePath -> PackageDescription -> FilePath
+hscolourPref :: HaddockTarget -> FilePath -> PackageDescription -> FilePath
-haddockPref :: FilePath -> PackageDescription -> FilePath
+haddockPref :: HaddockTarget -> FilePath -> PackageDescription -> FilePath

This is a serious breach of API contract, especially since Setup.hs scripts are still rather fragile to such kinds of API breakages.

IMO, we should undo this API breakage, and release a Cabal 1.24.1.1 (& cabal-install-1.24.0.2) ASAP, and blacklist-deprecate Cabal 1.24.1.0

/cc @bgamari since depending on the resolution of this issue, GHC 8.0.2, may need to update to version different from Cabal 1.24.1.0

@hvr hvr added this to the 1.24.1.1 milestone Nov 20, 2016
@hvr
Copy link
Member Author

hvr commented Nov 20, 2016

I edited in a

build-depends: Cabal < 1.24.1.0 || > 1.24.1.0

to the cabal-install-1.24.0.0 meta-data: https://hackage.haskell.org/package/cabal-install-1.24.0.0/revisions/

@bgamari
Copy link
Contributor

bgamari commented Nov 21, 2016

It would be helpful for the GHC 8.0.2 release cycle if we could sort this out soon; I'd like to get another release candidate out later this week.

@23Skidoo
Copy link
Member

I'll try to.

@bgamari
Copy link
Contributor

bgamari commented Nov 29, 2016

Any movement here?

@23Skidoo
Copy link
Member

@bgamari See #4146.

@23Skidoo
Copy link
Member

23Skidoo commented Dec 2, 2016

Fixed by #4146, waiting for @rthomas to cut new 1.24 releases...

@23Skidoo 23Skidoo closed this as completed Dec 2, 2016
@23Skidoo
Copy link
Member

23Skidoo commented Dec 8, 2016

@bgamari New Cabal/cabal-install point releases from the 1.24 branch are now out.

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

No branches or pull requests

3 participants