Skip to content

cabal gen-bounds ignores project file #9752

Closed

Description

@alt-romes

Describe the bug

Running cabal gen-bounds in a project whose cabal package is not in the root will fail to recognize the package:

To Reproduce
Steps to reproduce the behavior:

cd $(mktemp -d)
cabal init -m -n --exe bad
echo 'packages: bad' > cabal.project
cabal gen-bounds bad

Results in

Error: cabal: No cabal file found.
Please create a package description file <pkgname>.cabal

Expected behavior
Should gen-bounds for the bad package (which is located in the bad directory)

System information

  • cabal 3.10, HEAD

Activity

  1. alt-romes commented on Feb 28, 2024

    @alt-romes
    CollaboratorAuthor

    Same for cabal outdated

  2. ffaf1 commented on Feb 28, 2024

    @ffaf1
    Collaborator

    The documentation does not imply targets for gen-bound, but it does ([PACKAGES]) for outdated.

  3. ffaf1 commented on Feb 28, 2024

    @ffaf1
    Collaborator

    Documentation: --help, Manual is correct.

  4. alt-romes commented on Feb 28, 2024

    @alt-romes
    CollaboratorAuthor

    I see. Do you think it would be reasonable to make it work with projects?

    This came up because I'm unable to do cabal gen-bounds for a package in a project whose dependencies are local...

  5. ulysses4ever commented on Feb 28, 2024

    @ulysses4ever
    Collaborator
  6. ffaf1 commented on Feb 28, 2024

    @ffaf1
    Collaborator

    It would be welcome, the only drawbacks that come to mind are:

    • possibly breaking old workflows (shouldn't be the case)
    • having to update tests by adding an empty cabal.project.
  7. added a commit that references this issue on May 27, 2025
  8. added a commit that references this issue on Jun 14, 2025
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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions