1 synopsis: Redesign 'cabal path' command to account for projects
2 packages: cabal-install
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.
10 Additionally, we add support for multiple output formats, such as key-value pairs and json.
12 The key-value pair output prints a line for each queried key and its respective value:
17 If only a single key is queried, we print only the value, for example:
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".
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.