Autogen directory, build directory layout in general.
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
Take a contrived example
```cabal
cabal-version: 2.2
name: autogen
version: 0.1.0.0
library
default-language: Haskell2010
hs-source-dirs: src
build-depends: base >=4.12 && <4.13
exposed-modules: Autogen.Paths_autogen
exposed-modules: Paths_autogen
```
with `src/Autogen/Paths_autogen.hs` as e.g.
```haskell
module Autogen.Paths_autogen where
version :: String
version = "Hello"
```
On Linux the package will compile fine, but...
`find dist-newstyle` shows
```
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/autogen
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/autogen/Paths_autogen.hs
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/autogen/cabal_macros.h
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/Paths_autogen.dyn_hi
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/Paths_autogen.o
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/libHSautogen-0.1.0.0-inplace-ghc8.6.5.so
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/Paths_autogen.dyn_o
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/Autogen
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/Autogen/Paths_autogen.dyn_hi
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/Autogen/Paths_autogen.o
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/Autogen/Paths_autogen.dyn_o
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/Autogen/Paths_autogen.hi
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/Paths_autogen.hi
dist-newstyle/build/x86_64-linux/ghc-8.6.5/autogen-0.1.0.0/build/libHSautogen-0.1.0.0-inplace.a
```
I don't think that `autogen` and `Autogen` would cause problems on case-insensitive filesystem & platforms (e.g. Windows, macOS), but I don't like the lack of hygiene anyway.
Maybe this would be easier to refactor after #6667 is started.
Contributor guide
Assessment
This issue has not been assessed yet.