haskell / haskell/cabal

Cabal should include build targets in `--list-options`

Open
#1,382 3 comments 1 reaction 0 assignees View on GitHub
cabal-install: other old-milestone: ⊥ type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

This would simplify implementing [`(bash)Programmable Completion`](http://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html) for commands taking a build target, such as `cabal build`, `cabal test` or `cabal run`, as the current state would require to reinvent `cabal`'s strategy for locating the `.cabal` file and parsing the cabal file for potential targets (while not being able to detect currently disabled targets)

So basically this just requires to include the targets where applicable in the `--list-options` output.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Cabal CLI handling for --list-options and the target discovery used by commands such as cabal build, cabal test, and cabal run. Trace how the .cabal file and disabled targets are handled, then verify that applicable build targets appear in the --list-options output.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.