haskell / haskell/cabal

Filename case on macOS

Open
#4,739 11 comments 8 reactions 0 assignees View on GitHub
platform: mac type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

In a [project](https://github.com/ivan-m/jbi) I'm working on, I have some directories in the module path consisting solely of capital letters.

When I try and build this project, I get the following warning:
```
:17:10: error:
warning: non-portable path to file '"dist/build/JBI/autogen/cabal_macros.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
#include "dist/build/jbi/autogen/cabal_macros.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"dist/build/JBI/autogen/cabal_macros.h"
1 warning generated.
```

(Which I think comes from clang rather than cabal-install itself.)

I also previously had the executable file in `src/jbi.hs`; this resulted in a GHC error:

```
src/JBI.hs:11:8: error:
File name does not match module name:
Saw: ‘Main’
Expected: ‘JBI’
```

I'm not sure if either of these can actually be fixed, or we just have to deal with the joys of caseless filesystems.

cabal-install version 2.0.0.0
compiled using version 2.0.0.2 of the Cabal library

macOS Sierra 10.12.6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.