Support subdirectories with remote tarball deps in cabal.project
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Related to: https://github.com/haskell/cabal/issues/2189
Currently, one can add
```
source-repository-package
type: git
location: git://...
tag: ...
```
to use a git repo to download a project to use as a dependency. I would like to explicitly specify a URL to a tarball that can be unzipped and used.
This is useful because when making a PR from a forked repo, GitHub adds the commit to the original repo's set of commits. For example, if I fork `user1/my-repo` to `user2/my-repo`, add commit A to the `user2/my-repo` fork, and make a PR, GitHub allows downloading the commit from `https://github.com/user1/my-repo/archive/A.tar.gz`. However, cloning the original `user1/my-repo` repo and doing `git checkout A` does not work.
One could workaround this with
```
packages:
https://github.com/owner/repo/commit.tar.gz
```
which works in most use-cases, but doesn't work if the Cabal project is within a subdirectory of the archive (e.g. a monorepo)
This is already supported in Stack: https://docs.haskellstack.org/en/stable/yaml_configuration/#extra-deps
Contributor guide
Assessment
This issue has not been assessed yet.