Skip to content

Attempting to install a non-existent dependency does not suggest the package doesn't exist #2179

Closed

Description

@owst

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

  1. 23Skidoo commented on Oct 24, 2014

    @23Skidoo
    Member
  2. added this to the milestone on Apr 24, 2015
  3. added a commit that references this issue on Oct 4, 2015
    1ea1d66
  4. sebright commented on Jan 29, 2016

    @sebright
    Collaborator

    The warning is a little better after #2853:

    $ cabal install --only-dep
    Resolving dependencies...
    cabal: Could not resolve dependencies:
    trying: foo-1.0 (user goal)
    next goal: blergh (dependency of foo-1.0)
    fail (unknown package: blergh)
    Dependency tree exhaustively searched.
    
  5. 23Skidoo commented on Jan 29, 2016

    @23Skidoo
    Member

    I guess this can be closed then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions