cabal gen-bounds ignores project file
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
-
cabal3.10, HEAD
Same for cabal outdated
The documentation does not imply targets for gen-bound, but it does ([PACKAGES]) for outdated.
Documentation: --help, Manual is correct.
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...
Perhaps duplicate of:
- https://github.com/haskell/cabal/issues/7504
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.