haskell / haskell/cabal

use `--ignore-project` to install an unpacked package

Open
#9,126 0 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/install type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**
I'd like to use `--ignore-project` to install an unpacked package when this is unpacked within a project.

**To Reproduce**
```
$ git clone git@github.com:haskell/cabal.git
Cloning into 'cabal'...
remote: Enumerating objects: 126291, done.
remote: Counting objects: 100% (13879/13879), done.
remote: Compressing objects: 100% (1389/1389), done.
remote: Total 126291 (delta 12924), reused 12739 (delta 12425), pack-reused 112412
Receiving objects: 100% (126291/126291), 45.35 MiB | 25.92 MiB/s, done.
Resolving deltas: 100% (84268/84268), done.

$ cd cabal

$ cabal get hpack-0.35.3
Unpacking to hpack-0.35.3/

$ cd hpack-0.35.3/

$ cabal install --ignore-project
The package directory '.' does not contain any .cabal file.

$ ls *.cabal
hpack.cabal

$ cd ../..

$ cabal get hpack-0.35.3
Unpacking to hpack-0.35.3/

$ cd hpack-0.35.3/

$ cabal install --ignore-project --dry-run
Wrote tarball sdist to
/.../hpack-0.35.3/dist-newstyle/sdist/hpack-0.35.3.tar.gz
Resolving dependencies...
Build profile: -w ghc-9.4.5 -O1
In order, the following would be built (use -v for more details):
- integer-conversion-0.1 (lib) (requires download & build)
- text-iso8601-0.1 (lib) (requires download & build)
- aeson-2.2.0.0 (lib) (requires download & build)
- yaml-0.11.11.2 (lib) (requires download & build)
- hpack-0.35.3 (lib) (requires build)
- hpack-0.35.3 (exe:hpack) (requires build)

$ cabal --version
cabal-install version 3.10.1.0
compiled using version 3.10.1.0 of the Cabal library
```

**System information**
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported cabal get and cabal install --ignore-project commands from inside the Cabal checkout and the unpacked hpack-0.35.3 directory. Trace the cabal install command entry point for how it discovers the package directory; done means an unpacked package can be installed with --ignore-project while the reported dry-run behavior remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.