You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running cabal format duplicates the build-depends section and duplicates dependencies in that section. For example, with this Cabal file:
name: example
version: 0
cabal-version: >=1.22.0.0
build-type: Simple
license: MIT
license-file: LICENSE.txt
maintainer: Taylor Fausak <[email protected]>
synopsis: TODO
description:
TODO
category: Other
library
build-depends:
base ==4.*
default-language: Haskell2010
Repeatedly running cabal format produces this:
build-depends:
base ==4.*
build-depends:
base ==4.*
build-depends:
base ==4.*,
base ==4.*
build-depends:
base ==4.*,
base ==4.*
build-depends:
base ==4.*,
base ==4.*,
base ==4.*,
base ==4.*
build-depends:
base ==4.*,
base ==4.*,
base ==4.*,
base ==4.*
I would expect cabal format to not make any changes to the given Cabal file. I'm using GHC version 7.8.3 and Cabal version 1.22.0.0.
On Mon, Jan 12, 2015 at 4:33 PM, Taylor Fausak [email protected]
wrote:
Running cabal format duplicates the build-depends section and duplicates
dependencies in that section. For example, with this Cabal file:
name: example
version: 0
cabal-version: >=1.22.0.0
build-type: Simple
license: MIT
license-file: LICENSE.txt
maintainer: Taylor Fausak [email protected]
synopsis: TODO
description:
TODO
category: Other
library
build-depends:
base ==4.*
default-language: Haskell2010
Repeatedly running cabal format produces this:
build-depends:
base ==4.*
build-depends:
base ==4.*
build-depends:
base ==4.*,
base ==4.*
build-depends:
base ==4.*,
base ==4.*
build-depends:
base ==4.*,
base ==4.*,
base ==4.*,
base ==4.*
build-depends:
base ==4.*,
base ==4.*,
base ==4.*,
base ==4.*
I would expect cabal format to not make any changes to the given Cabal
file. I'm using GHC version 7.8.3 and Cabal version 1.22.0.0.
—
Reply to this email directly or view it on GitHub #2353.
Activity
tibbe commentedon Jan 12, 2015
/cc @benarmston
On Mon, Jan 12, 2015 at 4:33 PM, Taylor Fausak [email protected]
wrote:
tfausak commentedon Mar 6, 2015
I think the problem is in
showGenericPackageDescription, but I'm not at all familiar with Cabal. I used this script to try some things out:Running that gave me this output:
The package description contains a lot of things, but this part looked interesting:
There appears to only be one dependency. That tells me that it's being parsed correctly but it's being displayed incorrectly.
tfausak commentedon Apr 1, 2015
This still happens with cabal-install 1.22.0.1. From what I can tell, it only affects Cabal on OS X.
tfausak commentedon Apr 17, 2015
This does not happen anymore with cabal-install 1.22.2.0. One of these changes fixed it: cabal-install-v1.22.0.1...cabal-install-v1.22.2.0.