Data Dir for `Paths_` modules do no get named properly with cabal multi repl
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
Say I have a cabal project with two packages `a` and `b` where
- each of them has a library
- `b` depends on `a`
- `a` has a module `Paths_a`
Then, if we load `b` in `cabal repl --enable-multi-repl`, the data directory in `Paths_a` points to `~/.cabal/share` which is wrong, since there's no such directory.
When running `cabal repl --disable-multi-repl`, it works as expected.
**Expected behavior**
`getDataDir` should be the valid path, independently of whether we use cabal multi repl
**System information**
- Operating system: NixOS 25.05
- `cabal`, `ghc` versions; 3.14.1.0, 9.8.4
**Additional context**
When running with `-v3`, we can see that `cabal` *tries* to set the environment to the right value
```
Including the following environment variable overrides:
- a_datadir=/path/to/a/.
```
But it isn't getting picked up, it appears.
Contributor guide
Assessment
This issue has not been assessed yet.