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

cabal build ./pkgfoo doesn't work #7328

Open
andreabedini opened this issue Mar 13, 2021 · 3 comments
Open

cabal build ./pkgfoo doesn't work #7328

andreabedini opened this issue Mar 13, 2021 · 3 comments

Comments

@andreabedini
Copy link
Collaborator

Describe the bug

Hi Cabal maintainers, thank you for your work.

Accorting to the documentation provided by --help, I can tell cabal to build a package held in a specific directory.

$ cabal build --help
[snip]
Examples:
  cabal build
    Build the package in the current directory or all packages in the project
  cabal build pkgname
    Build the package named pkgname in the project
  cabal build ./pkgfoo
    Build the package in the ./pkgfoo directory

But this doesn't seem to work. See below for reproducible steps.

To Reproduce
Steps to reproduce the behavior:

$ mkdir cabal-build-pkgfoo-test
$ cd cabal-build-pkgfoo-test
$ cabal init --minimal --non-interactive

Guessing dependencies...

Generating LICENSE...
Warning: unknown license type, you must put a copy in LICENSE yourself.
Generating CHANGELOG.md...
Generating app/Main.hs...
Generating cabal-build-pkgfoo-test.cabal...

Warning: no synopsis given. You should edit the .cabal file and add one.
You may want to edit the .cabal file and add a Description field.

$ cd ..
$ cabal v2-build ./cabal-build-pkgfoo-test
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.

Expected behavior

I expect the package in ./cabal-build-pkgfoo-test to be built. Likely the equivalent of cd ./cabal-build-pkgfoo-test && cabal v2-build && cd ...

System information

  • macOS Catalina, 10.15.7
  • cabal-install version 3.4.0.0 (compiled using version 3.4.0.0 of the Cabal library)
  • ghc version 8.10.4
@fgaz
Copy link
Member

fgaz commented Mar 13, 2021

Since something similar also happened in #7321 (comment) I suspect this is a regression. Could you check whether this also happened on 3.2?

@andreabedini
Copy link
Collaborator Author

Thanks for looking at it @fgaz, I'll try with 3.2 and report back

@andreabedini
Copy link
Collaborator Author

@fgaz

I can reproduce with 3.2 following the same instructions as above

$ cabal-3.2.0.0 v2-build ./cabal-build-pkgfoo-test
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.

(now on ubuntu 20.04.2, cabal 3.2.0.0, ghc 8.10.4)

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

3 participants