cabal new-run with global extra-include-dirs outputs malformed arguments
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
When updating my `~/.cabal/config` with something like the following:
```
extra-include-dirs:
/usr/local/include/
, /usr/local/include/TH
, /usr/local/include/THC
<...etc...>
```
and running `cabal new-run foo`, I get a malformed output:
```
/usr/bin/ghc --make -fbuilding-cabal-package -O -static -dynamic-too <...etc...> -I/home/stites/git/hasktorch/dist-newstyle/build/x86_64-linux/ghc-8.2.2/hasktorch-classes-0.0.1.0/build '-I/usr/local/include/
, /usr/local/include/TH
, /usr/local/include/THS
, /usr/local/include/THNN
, /usr/local/include/THC
, /usr/local/include/THCS
, /usr/local/include/THCUNN' -optP-DCUDA -optP-include -optP/home/stites/git/hasktorch/dist-newstyle/build/x86_64-linux/ghc-8.2.2/hasktorch-classes-0.0.1.0/<...etc...>
```
Different permutations (comma separated, comma separated with spaces, newline separated) in the `extra-include-dirs` field wont fix this and the `-I` flag continues to treat the entire list as a single string path.
I believe this is a bug because [Nix-style Local Builds Section 5.5.4.4][nslb] says that this field should take a newline or comma-separated list, and all of the permutations I tried seem like they fit that bill. That said, I can include fix this bug by duplicating the `extra-include-dirs`, once for each path.
For reference, I'm working off master from 9 days ago:
```
c151e0207 - Merge pull request #5263 from haskell/target-selector-loop (2018-04-18 @ 9 days ago)
```
I'd love to fix this bug myself if someone can confirm that this isn't expected, is still broken, and is beginner-friendly!
Thanks,
Sam
[nslb]: https://www.haskell.org/cabal/users-guide/nix-local-build.html#cfg-field-extra-include-dirs
Contributor guide
Assessment
This issue has not been assessed yet.