Bad interface file: "Something is amiss; requested module differs from..."
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
# Error message
```
Configuring library for slay-vty-0..
Configuring library for slay-combinators-0..
Configuring library for slay-cairo-0..
Preprocessing library for slay-cairo-0..
Building library instantiated with Slay.Number =
for slay-cairo-0..
[ 1 of 10] Compiling Slay.Cairo.Prim.Color ( src/Slay/Cairo/Prim/Color.hs, /run/user/1000/ghc6085_0/ghc_4.o )
Preprocessing library for slay-combinators-0..
Building library instantiated with Slay.Number =
for slay-combinators-0..
Preprocessing library for slay-vty-0..
Building library instantiated with Slay.Number =
for slay-vty-0..
[ 2 of 10] Compiling Slay.Cairo.Prim.Text ( src/Slay/Cairo/Prim/Text.hs, /run/user/1000/ghc6085_0/ghc_8.o )
[2 of 2] Compiling Slay.Combinators ( src/Slay/Combinators.hs, nothing )
src/Slay/Combinators.hs:15:1: error:
Bad interface file: /home/int-index/Projects/slay/dist-newstyle/build/x86_64-linux/ghc-8.4.3/slay-core-0/build/Slay/Core.hi
Something is amiss; requested module slay-core-0[Slay.Number=]:Slay.Core differs from name found in the interface file slay-core-0:Slay.Core (if these names look the same, try again with -dppr-debug)
|
15 | import Slay.Core
| ^^^^^^^^^^^^^^^^
[1 of 4] Compiling Slay.Number[sig] ( /home/int-index/Projects/slay/dist-newstyle/build/x86_64-linux/ghc-8.4.3/slay-vty-0/build/autogen/Slay/Number.hsig, nothing )
[2 of 4] Compiling Slay.Vty.Prim ( src/Slay/Vty/Prim.hs, /run/user/1000/ghc6149_0/ghc_2.o )
src/Slay/Vty/Prim.hs:13:1: error:
Bad interface file: /home/int-index/Projects/slay/dist-newstyle/build/x86_64-linux/ghc-8.4.3/slay-core-0/build/Slay/Core.hi
Something is amiss; requested module slay-core-0[Slay.Number=]:Slay.Core differs from name found in the interface file slay-core-0:Slay.Core (if these names look the same, try again with -dppr-debug)
|
13 | import Slay.Core
| ^^^^^^^^^^^^^^^^
[ 3 of 10] Compiling Slay.Number[sig] ( /home/int-index/Projects/slay/dist-newstyle/build/x86_64-linux/ghc-8.4.3/slay-cairo-0/build/autogen/Slay/Number.hsig, nothing )
[ 4 of 10] Compiling Slay.Cairo.Render ( src/Slay/Cairo/Render.hs, /run/user/1000/ghc6085_0/ghc_9.o )
src/Slay/Cairo/Render.hs:11:1: error:
Bad interface file: /home/int-index/Projects/slay/dist-newstyle/build/x86_64-linux/ghc-8.4.3/slay-core-0/build/Slay/Core.hi
Something is amiss; requested module slay-core-0[Slay.Number=]:Slay.Core differs from name found in the interface file slay-core-0:Slay.Core (if these names look the same, try again with -dppr-debug)
|
11 | import Slay.Core
| ^^^^^^^^^^^^^^^^
cabal: Failed to build slay-cairo-0 (which is required by exe:slay-gtk-example
from slay-gtk-0).
Failed to build slay-combinators-0 (which is required by exe:slay-gtk-example
from slay-gtk-0).
Failed to build slay-vty-0.
```
# System configuration
NixOS, GHC 8.4.3, `cabal` installed from `master` commit `076c966a0`.
# Steps to reproduce
1. clone https://github.com/int-index/slay
2. `git checkout 0a42013`
3. `cabal new-build all`
4. `git checkout 2fc5224` (this is the next commit)
5. `cabal new-build all`
The error will be printed. We can fix the build by removing `dist-newstyle`:
6. `rm -r dist-newstyle`
7. `cabal new-build all`
This time `2fc5224` will build fine.
Sorry for no minimal reproduction. The probable cause is that I changed `.cabal` files and removed a Backpack signature from one of them. I have not observed similar failures while I was developing this project without touching `.cabal` files.
Contributor guide
Research direction
Reproduce with commits 0a42013 and 2fc5224 using `cabal new-build all`, then compare the result after removing `dist-newstyle`. Start by inspecting how cached interface files in `dist-newstyle` are reused when `.cabal` files or Backpack signatures change. Done means the second checkout builds successfully without deleting `dist-newstyle`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100