Skip to content

cabal file not found despite --cabal-file #6880

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

Closed
ghost opened this issue Jun 6, 2020 · 7 comments
Closed

cabal file not found despite --cabal-file #6880

ghost opened this issue Jun 6, 2020 · 7 comments

Comments

@ghost
Copy link

ghost commented Jun 6, 2020

Describe the bug
I expect to be able to use cabal files at an abnormal path by pointing Cabal at it with the --cabal-file argument.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a package that builds normally with Cabal.
  2. Move [package name].cabal outside of the directory or change the extension.
  3. Run cabal v2-build --cabal-file [new path].

Expected behavior
Cabal builds the package as if the Cabal file was at its original path.

Actual behavior
Cabal reports the following:

No cabal.project file or cabal file matching the default glob './*.cabal' was found.
Please create a package description file <pkgname>.cabal or a cabal.project file referencing the packages you want to build.

System information

  • Operating system: NixOS 20.03
  • cabal version: 3.2.0.0
@phadej
Copy link
Collaborator

phadej commented Jun 6, 2020

--cabal-file is used for testing.

We should remove that flag from public interface.

cc @ezyang

@ezyang
Copy link
Contributor

ezyang commented Jun 7, 2020

IIRC, --cabal-file does the right thing if you're using the Setup.hs interface. But it doesn't make any sense on the high level v2 interface. Agree it should be removed from there.

@jneira
Copy link
Member

jneira commented Jul 13, 2021

@hyperfekt as the decision was remove the flag and no "fix" it, I would close this one and open a new one tracking the flag deletion itself
will do if you don't disagree

@ulysses4ever
Copy link
Collaborator

Agree with @jneira's comment above. Let's act on it?

@ulysses4ever
Copy link
Collaborator

Same for #7225 (a dup).

@Mikolaj
Copy link
Member

Mikolaj commented Aug 18, 2022

Agree with @jneira's comment above. Let's act on it?

Let's do it. :)

@ulysses4ever
Copy link
Collaborator

Done! #8395

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

5 participants