Ticket #522 (new enhancement)

Opened 4 years ago

Nicer error message when source files are not found.

Reported by: duncan Owned by:
Priority: low Milestone:
Component: Cabal library Version: 1.6.0.1
Severity: minor Keywords:
Cc: Difficulty: easy (<4 hours)
GHC Version: Platform:

Description

It can be confusing sometimes when source files are not found. Eg:

$ runhaskell Setup.lhs build
Preprocessing executables for nm8-0.1...
Setup.lhs: can't find source for Data.MaybeI in src, dist/build/autogen
$ find src/ | grep Data
src//Data
src//Data/MabyeI.hs

In this case it's simply a spelling error, but it's still hard to spot initially.

The suggestion is to look look at all files in that directory and do an edit distance match and suggest any similar file. This would also help for case-sensitivity mistakes, see #521.

Note: See TracTickets for help on using tickets.