You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi – I've discovered this one by mistakenly calling my tool in the wrong folder.
hClose is not being called after Language.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 strict hGetContents and hClose works well. It can either be done by System.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.
The text was updated successfully, but these errors were encountered:
@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 strict
hGetContents
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.
The text was updated successfully, but these errors were encountered: