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
{{ message }}
Repository navigation
Attempting to install a non-existent dependency does not suggest the package doesn't exist #2179
If we try to directly install a non-existent package we get a warning that the package doesn't exist:
> cabal install blergh
cabal: There is no package named 'blergh'.
You may need to run 'cabal update' to get the latest list of available
packages.
However, if we add the same non-existent package as a dependency, the warning we get is obscured:
> cabal install --only-dep
Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: foo (user goal)
rejecting: foo-1.0 (global constraint requires ==0.1.0.0)
trying: foo-0.1.0.0
next goal: blergh (dependency of foo-0.1.0.0)
Dependency tree exhaustively searched.
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
My proposal is to change the wording (in the case where no rejections were made) of the failure thus:
> cabal install --only-dep
Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: foo (user goal)
rejecting: foo-1.0 (global constraint requires ==0.1.0.0)
trying: foo-0.1.0.0
next goal: blergh (dependency of foo-0.1.0.0)
There is no package named 'blergh'.
You may need to run 'cabal update' to get the latest list of available
packages.
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
Activity
23Skidoo commentedon Oct 24, 2014
/cc @kosmikus
Always warn when 'cabal install' cannot find a dependency (fixes hask…
sebright commentedon Jan 29, 2016
The warning is a little better after #2853:
23Skidoo commentedon Jan 29, 2016
I guess this can be closed then.