Closed recursion-ninja closed 4 years ago
The problem "module not compiled" is the root of all the issues. The problem is always that https://github.com/ndmitchell/weeder/blob/master/src/Cabal.hs#L52 guesses a set of possible locations the .hi
file and associated dump file can be at. In this case, it guessed wrong. My assumption is that https://github.com/ndmitchell/weeder/blob/master/src/Cabal.hs#L75 needs extending to have Library
take a Maybe String
for the name, and then cabalSectionTypeName if suitably tweaked might make it just work.
Weeder 2.0 is being developed at https://github.com/ocharles/weeder so I suggest you go see if that fixes your issues.
Our project uses multiple packages as sub-libraries, one of which has multiple internal libraries that are re-exported.
When we run
weeder
on the package with multiple internal libraries, we get the following output:weeder
reports as weeds that the re-exported modules were not compiled, however these modules need to be re-exported from the package's main library as the interface to be consumed by other packages in our code base.Additionally,
weeder
reports the internal libraries which are dependencies of other build targets as redundant, however they are require to build the build target and cannot be removed.I'm hoping to get your input on whether or not these weed reports are expected, they seem to be erroneous from my perspective in this use case.