Skip to content

Commit

Permalink
Try using --pvp-bounds both
Browse files Browse the repository at this point in the history
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:

  commercialhaskell/stack#2262
  • Loading branch information
wincent committed Jun 18, 2016
1 parent 65c8615 commit 29650e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docvim.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -231,7 +231,7 @@ executable docvim
default-language: Haskell2010

library
build-depends: base
build-depends: base < 5
, containers
, directory
, filepath
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 29650e2

Please sign in to comment.