]> git.wincent.com - docvim.git/commitdiff
Try using --pvp-bounds both
authorGreg Hurrell <greg@hurrell.net>
Sat, 18 Jun 2016 01:01:11 +0000 (18:01 -0700)
committerGreg Hurrell <greg@hurrell.net>
Sat, 18 Jun 2016 01:01:11 +0000 (18:01 -0700)
Squash of `bounds` branch:

- https://github.com/wincent/docvim/tree/bounds
  (commit 22e92335248334b33d791c179b25fc53a16aafb2)

Based on discussion here:

  http://stackoverflow.com/a/37876041/2103996

Trying this:

- (Almost) no constraints in docvim.cabal file.
- Upload using --pvp-bounds, which produces a docvim.cabal file something like
  this: https://gist.github.com/wincent/145d35bbc75cff2a491fd33fe81d39b0

This effectively means we'll upload something more constrained than what we
tested in Travis, and that is probably OK.

Note that I had to add base upper bounds as noted here:

  https://travis-ci.org/wincent/docvim/jobs/138374403

> ++cabal check
> The following errors will cause portability problems on other environments: *
> The dependency 'build-depends: base' does not specify an upper bound on the
> version number. Each major release of the 'base' package changes the API in
> various ways and most packages will need some changes to compile with it. The
> recommended practise is to specify an upper bound on the version of the 'base'
> package. This ensures your package will continue to build when a new major
> version of the 'base' package is released. If you are not sure what upper
> bound to use then use the next major version. For example if you have tested
> your package with 'base' version 2 and 3 then use 'build-depends: base
> >= 2 && < 4'.
>
> Hackage would reject this package.

See also:

  https://github.com/commercialhaskell/stack/issues/2262

README.md
docvim.cabal

index dbda2b5bcb91ac18fb5b924083108374681fcc8b..20edc07d58f93cc13cc219c5592800d8729860d2 100644 (file)
--- a/README.md
+++ b/README.md
@@ -222,10 +222,8 @@ hlint src               # If you have HLint installed under $PATH.
 ```bash
 vim docvim.cabal # update version number in two places
 git commit -p # git tag, git push --follow-tags etc...
-cabal check
-cabal sdist
-open dist # upload candidate to https://hackage.haskell.org/packages/candidates/upload
-cabal upload dist/docvim-$VERSION.tar.gz
+stack sdist --pvp-bounds both
+stack upload --pvp-bounds both
 ```
 
 ## Links
index b0645f315f443169a83efa13a9803bdc42ed69fc..56c31c82b8a0ca494881a592ff00ee52d20d02cf 100644 (file)
@@ -219,7 +219,7 @@ executable docvim
   -- other-extensions:
 
   -- Other library packages from which modules are imported.
-  build-depends:       base >=4.6 && <5
+  build-depends:       base 5
                ,       docvim
 
   ghc-options:         -W -Wall
@@ -231,7 +231,7 @@ executable docvim
   default-language:    Haskell2010
 
 library
-  build-depends:    base
+  build-depends:    base < 5
                ,    containers
                ,    directory
                ,    filepath
@@ -274,7 +274,7 @@ library
   hs-source-dirs:   lib
 
 test-suite hlint
-  build-depends:    base
+  build-depends:    base < 5
                ,    hlint
   default-language: Haskell2010
   ghc-options:      -W -Wall
@@ -283,7 +283,7 @@ test-suite hlint
   type:             exitcode-stdio-1.0
 
 test-suite tasty
-  build-depends:    base >= 4 && < 5
+  build-depends:    base < 5
                ,    bytestring
                ,    containers
                ,    deepseq