Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build a lone package with --ignore-project #10556

Open
philderbeast opened this issue Nov 19, 2024 · 1 comment
Open

Build a lone package with --ignore-project #10556

philderbeast opened this issue Nov 19, 2024 · 1 comment

Comments

@philderbeast
Copy link
Collaborator

philderbeast commented Nov 19, 2024

I wanted to try cabal build with a test package for cabal-testsuite so changed to its folder and tried building it there. I was surprised that I couldn't --ignore-project. I reached for --project-dir instead and this did seem to help ignore projects higher in the directory tree.

Could we please enable --ignore-project for cabal build?

$ cd cabal-testsuite/PackageTests/Check/PackageFiles/VersionBounds

$ ls
cabal.out  cabal.test.hs  pkg.cabal

$ cabal build all --dry-run
Warning: this is a debug build of cabal-install with assertions enabled.
Configuration is affected by the following files:
- cabal.project
Resolving dependencies...
Error: [Cabal-7107]
Could not resolve dependencies:
[__0] trying: cabal-testsuite-3 (user goal)
[__1] unknown package: Cabal-hooks (dependency of cabal-testsuite)
[__1] fail (backjumping, conflict set: Cabal-hooks, cabal-testsuite)
After searching the rest of the dependency tree exhaustively,
these were the goals I've had most trouble fulfilling: cabal-testsuite, Cabal-hooks

$ cabal build all --dry-run --ignore-project
Error: cabal: unrecognized 'build' option `--ignore-project'

$ cabal build all --dry-run --project-dir=.
Warning: this is a debug build of cabal-install with assertions enabled.
Resolving dependencies...
Build profile: -w ghc-9.10.1 -O1
In order, the following would be built (use -v for more details):
 - pkg-0 (lib) (first run)
@ulysses4ever
Copy link
Collaborator

That's, unfortunately, a long-standing issue and a duplicate of #7057

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

No branches or pull requests

2 participants