2

A common problem with upper bounds is that package authors being uncertain opt for conservative upper bounds of their dependencies (e.g. base). This tends to be an unpopular choice for users which may be prevented from using such packages in the future.

I recently realized that this problem might have a solution where author pushes metadata changes to otherwise unchange package as seen here. How can users take advantage of this new feature? Is it documented somewhere in detail or is it experimental?

sevo
  • 4,559
  • 1
  • 15
  • 31

1 Answers1

2

Users can only take advantage of that exact feature by asking the package maintainer to make such a dependency-revision on Hackage. By all means do that when you're sure a dependency is unnecessarily conservative, but be prepared that it won't happen right away.

But you don't need this just to install a package on your machine with newer dependencies than the “officially supported” ones. Just use

cabal install token-bucket --allow-newer base

Alternatively, you can instead of installing straight from Hackage pull the source code (most typically from Github) into a local repository

git clone git@github.com:hvr/token-bucket.git
cd token-bucket

...apply any changes to the dependencies you want

sed -i 's/\(base[^<]*\)<4.10/\1<4.11/' token-bucket.cabal

...and install from that local copy:

cabal install

If nothing else, you can simply get the exact hackage version of the source through cabal fetch, but IMO one should always use the native version-control system when making changes to any codebase.

leftaroundabout
  • 117,950
  • 5
  • 174
  • 319