ndmitchell / weeder

Detect dead exports or package imports
BSD 3-Clause "New" or "Revised" License
124 stars 8 forks source link

Change the .hi file search mechanism #45

Open ndmitchell opened 6 years ago

ndmitchell commented 6 years ago

It should find all the .hi files, not load any of them (or perhaps do so lazy), and then assign heuristics to each one by how likely it is to represent a given module. The current logic is complex and incomplete, so heuristics are much more likely to get somewhere. Concretely:

temp/Foo/Bar.hi-dump should be guessed at being Foo.Bar, but with an outside possibility of Temp.Foo.Bar (you might be on a case insensitive file system) or Bar (Foo might be the name of the exe). Using these techniques hopefully the hacks for lexer files will go away, and Paths_foo can be dealt with properly rather than never being found. Also case insensitivity is a property of file system, not OS, as I currently pretend in #42 .

ndmitchell commented 4 years ago

Weeder 2.0 is being developed at https://github.com/ocharles/weeder so I suggest you go see if that fixes your issues.