Skip to content

Commit 58fcbb7

Browse files
committed
Add changelog.d entry
1 parent bca688d commit 58fcbb7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

changelog.d/pr-9583

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
synopsis: Redesign 'cabal path' command to account for projects
2+
packages: cabal-install
3+
prs: #9673
4+
5+
description: {
6+
7+
Previously, `cabal path` was only able to query from the global configuration file, e.g., `~/.cabal/config` or the XDG equivalent.
8+
We take the foundations and enhance `cabal path` to take project configuration, such as `cabal.project`, into account.
9+
10+
Additionally, we add support for multiple output formats, such as key-value pairs and json.
11+
12+
The key-value pair output prints a line for each queried key and its respective value:
13+
14+
key1: value2
15+
key2: value2
16+
17+
If only a single key is queried, we print only the value, for example:
18+
19+
value1
20+
21+
The json output format is versioned by the cabal-install version, which is part of the json object.
22+
Thus, all result objects contain at least the key "cabal-install-version".
23+
24+
We expand the `cabal path` to also produce information of the compiler that is going to be used in a `cabal build` or `cabal repl` invocation.
25+
To do that, we re-configure the compiler program, and outputs the location, version and compiler flavour.
26+
This is helpful for downstream tools, such as HLS, to figure out the GHC version required to compile a project with, without dependency solving.
27+
28+
}

0 commit comments

Comments
 (0)