haskell / haskell/cabal

Feature request: get sources without extraction

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

Description

It would be very useful for the UX of editor tooling to be able to download source code (or ensure that source code is downloaded) to the `~/.cabal/packages` directory without doing the extraction.

A workaround is to do this:

```
cabal get base-4.12.0.0 -d /var/empty
```

but it is not cross-platform and means we cannot tell if the command succeeded.

My primary usecase for wanting to use `cabal get` is to obtain the sources of wired-in packages such as base and ghc. It would be good if there was a command that could grab all of them. It is somewhat posisble to do this using the `ghc --show-packages` feature but of course the "environment injection" of `cabal exec ghc` means that the results are wrong so the user must know the exact path to `ghc`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.