ndmitchell / weeder

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

Fix handling of internal libraries. #55

Closed kindaro closed 4 years ago

kindaro commented 4 years ago

Resolve #51.

Special thanks to @rvl for test case #49, which is included here.

kindaro commented 4 years ago

@ndmitchell  I understand that you are not working on this project anymore. However, it is still useful. The other version requires GHC to understand -fwrite-ide-info, which is only available from 8.8 upwards. There is any number of projects that only build with, say, GHC 8.6. It so happens that I am working on one such project, and I am enjoying the benefits of Weeder with this patch presently. So maybe you would still like to consider merging for the benefit of others who find themselves in a situation like mine.

kindaro commented 4 years ago

I must confess, I have not been able to figure out how to automatically run the test suite. There is no «test-suite» stanza in weeder.cabal, and the directory test does not contain any test execution engine either. So my verification went only as far as running the pristine and the patched version on the examples in test, as well as on some of my private projects, and comparing the output.

So, if you can give me a hint as to how the test suite is supposed to work?

In the meanwhile, I am going to invest an evening into making the continuous integration green, at least Travis. It looks like it only needs an adjustment to the tested-with Cabal clause.

kindaro commented 4 years ago

@ndmitchell  I figured it out — the executable is its own checker! That is unusual! The build is passing on Travis as we speak.

ndmitchell commented 4 years ago

Thanks!

ndmitchell commented 4 years ago

I released 1.0.9.

I actually often put the executable as its own checker for tools. Makes it way easier to integrate more closely - I do the same for hlint.