commercialhaskell / commercialhaskell/stack
Feature Request: Expose Cabal components in ls dependencies json
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
**Feature Request**
I would like the output of `stack ls dependencies json` to contain the Cabal components of a package, e.g. `lib`, `exe:xyz`.
**Motivation**
The upcoming release of `stack` contains the new [`stack ls dependencies json`](https://github.com/commercialhaskell/stack/pull/4424) feature which returns the package dependency graph and some additional package metadata for a given project (package names, versions, locations, dependencies) in a JSON format. This is very useful for build tools that would like to call out to `stack` to determine how to build Stackage dependencies. However, some packages contain executable components that other packages depend on, or don't contain library components at all, e.g. `alex`. At present it is difficult to determine which components a package provides. The motivating use-case is Bazel with `rules_haskell`, see https://github.com/tweag/rules_haskell/issues/1306.
This feature request is similar to https://github.com/commercialhaskell/stack/issues/5274, however it seemed sufficiently independent to warrant its own issue.
Contributor guide
Assessment
This issue has not been assessed yet.