Skip to content

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

Closed

Description

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

Activity

  1. phadej commented on Jun 6, 2020

    @phadej
    Collaborator

    --cabal-file is used for testing.

    We should remove that flag from public interface.

    cc @ezyang

  2. ezyang commented on Jun 7, 2020

    @ezyang
    Contributor

    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.

  3. jneira commented on Jul 13, 2021

    @jneira
    Member

    @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

  4. added
    cabal-install: v2-build system
    on Jul 13, 2021
  5. ulysses4ever commented on Aug 18, 2022

    @ulysses4ever
    Collaborator

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

  6. ulysses4ever commented on Aug 18, 2022

    @ulysses4ever
    Collaborator

    Same for #7225 (a dup).

  7. Mikolaj commented on Aug 18, 2022

    @Mikolaj
    Member

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

    Let's do it. :)

  8. ulysses4ever commented on Aug 18, 2022

    @ulysses4ever
    Collaborator

    Done! #8395

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cabal-install: v2-build systemresolution: wontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions