hackworthltd / primer

A pedagogical functional programming language.
GNU Affero General Public License v3.0
14 stars 1 forks source link

Tracking issue: spurious cabal "extraneous version range" warning #121

Open brprice opened 3 years ago

brprice commented 3 years ago

See https://github.com/haskell/cabal/issues/5119

Tracking this here as I keep seeing this and being annoyed by it. At least I now know why!


When configuring the backend testsuite (but not the executable), I see

Warning: The package has an extraneous version range for a dependency on an
internal library: vonnegut -any && ==1.0.0.0, vonnegut -any && ==1.0.0.0. This
version range includes the current package but isn't needed as the current
package's library will always be used.

but this is a lie: we have not got any version range on the vonnegut dep of vonnegut-test.

hmac commented 3 years ago

This has started to annoy me as well, haha. I'm somewhat amazed that this bug has been around since 2018 and still isn't fixed...

dhess commented 3 years ago

Is this indeed a Cabal bug, and not something I've specified incorrectly in our .cabal file?

hmac commented 3 years ago

I'm almost certain it's the cabal bug Ben linked above. We specify vonnegut (the library) as a dependency for the vonnegut executable, without any version bounds. Removing it entirely causes the build to fail, it has to be there. Cabal seems to think we've added the ==1.0.0.0 bound when we definitely haven't.