haskell / haskell/cabal

program-locations is undocumented

Open
#8,476 0 comments 1 reaction 0 assignees View on GitHub
attention: pr-welcome documentation re: project-file
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

**Describe the bug**

I cannot find any documentation on the cabal.project reference about the `program-locations` stanza.

Sample usage:

```
program-locations
gcc-location: /usr/bin/clang
```

**To Reproduce**

```
co/cabal - [master] » rg program-locations
cabal-install/src/Distribution/Client/ProjectConfig.hs
1446: ++ "specify the path in a global 'program-locations' section."

cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
1384: sectionName = "program-locations",
1392: syntaxError lineno "the section 'program-locations' takes no arguments"

cabal-install/src/Distribution/Client/Sandbox/PackageEnvironment.hs
220: isKnownSection (ParseUtils.Section _ "program-locations" _ _) = True
246: (ParseUtils.Section _ "program-locations" name fs)
250: warning "The 'program-locations' section should be unnamed"

cabal-install/src/Distribution/Client/Config.hs
1153: isKnownSection (ParseUtils.Section _ "program-locations" _ _) = True
1232: (ParseUtils.Section _ "program-locations" name fs)
1236: warning "The 'program-locations' section should be unnamed"
1304: $+$ configFlagsSection "program-locations" withProgramsFields
1391:-- | Fields for the 'program-locations' section.
```

Contributor guide

Open the contributing guide

Research direction

Start by reading the cabal.project reference and the existing `program-locations` handling in `cabal-install/src/Distribution/Client/ProjectConfig.hs`, `cabal-install/src/Distribution/Client/Config.hs`, and `cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs`. Document the stanza, including the `gcc-location` field and path value, so the reference explains the sample usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.