Feature request: absolute paths in ghc errors
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
ghc will report errors and warnings in files relative to the `hs-source-dirs` that is declared in the `.cabal` file. This typically results in minimal output relative to the location of the `.cabal` file.
However, there are many workflows where this can result in problems, especially if the user invokes `cabal build` from a different directory which is common in multi-project builds.
It would be good if there was a `cabal.project{.local}` option made available that caused cabal to construct the absolute path of `hs-source-dirs` prior to invoking `ghc`.
Contributor guide
Research direction
Start by tracing how cabal.project and cabal.project.local options are parsed during cabal build, then follow the path to the ghc invocation. Check existing handling of hs-source-dirs and path resolution; done means an option can make GHC diagnostics use absolute source paths regardless of the directory from which the build is invoked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100