Open msrdic opened 3 years ago
@msrdic This sounds reasonable to me. I would be happy to accept such a pull request.
@DanBurton it took a while, but it seems that CI passed successfully. This is a small change, but please advise if there's anything else that should be addressed (style, structure etc). Thanks.
Hi – I've discovered this one by mistakenly calling my tool in the wrong folder.
hClose
is not being called afterLanguage.Haskell.Exts.parseFile
is done. It can result in too many files open error.I've identified two places where file content is being read and
hClose
is not being called, the first one being the one described above, and the second one in a test runner (test/Runner.hs
).Steps to reproduce: the way I discovered this is by recursively calling
parseFile
on a complete source tree for the folder where I keep my source code. Possible fix: I've verified in my own fork that a combination of a stricthGetContents
andhClose
works well. It can either be done bySystem.IO.Strict.hGetContents
or by just copying this short implementation to keep the list of dependencies shorter.I am happy to submit a pull request, assuming this is a valid issue and I am not completely off target or missing something.