Creating projects without local packages
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
Currently `cabal-install` expects projects to have at least one local package listed in `cabal.project`. However, there are use-cases where one might want a project without any local packages (e.g. to create an environment for using a project-specific repository, e.g. to build a package from `head.hackage` with `cabal new-install`).
**To Reproduce**
```
$ cat >cabal.project <.cabal package file or cabal.project file. To
build packages locally you need at minimum a .cabal file. You can use
'cabal init' to create one.
For non-trivial projects you will also want a cabal.project file in the root
directory of your project. This file lists the packages in your project and
all other build configuration. See the Cabal user guide for full details.
```
**Expected behavior**
`cabal new-install` would build `aeson`.
Contributor guide
Research direction
Reproduce the example using the shown cabal.project and the cabal v2-install --lib aeson command, then trace how cabal-install discovers local packages. Done means a project containing only the repository configuration can install aeson successfully, with the relevant behavior covered by an appropriate test.
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
- 45/100