Open MaxGabriel opened 4 years ago
I restarted nix-shell and tried ghcid again. I eventually got an error about running out of file descriptors. I'm guessing I need to raise that limit to fix
src/Mercury/Yesod/Routes/Metrics/Instance.hs:5:1: warning: [-Wunused-imports]
The import of ‘ClassyPrelude’ is redundant
|
5 | import ClassyPrelude
| ^^^^^^^^^^^^^^^^^^^^
src/Mercury/Network/Wai/Middleware/HostCheck.hs:4:1: warning: [-Wunused-imports]
The import of ‘Request(requestHeaders)’
from module ‘Network.Wai’ is redundant
|
4 | import Network.Wai (Middleware, requestHeaders, responseBuilder)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Mercury/Network/Wai/Middleware/HostCheck.hs:13:1: warning: [-Wunused-imports]
The import of ‘App’ is redundant
|
13 | import App (App)
| ^^^^^^^^^^^^^^^^
src/Mercury/Metrics/Helpers.hs:43:1: warning: [-Wredundant-constraints]
• Redundant constraints: (Label label, MonadMonitor m)
• In the type signature for:
observeLabeledDuration :: forall (m :: * -> *) label metric a.
(MonadIO m, Label label, MonadMonitor m) =>
PVector label metric -> label -> m a -> m a
|
43 | observeLabeledDuration :: (MonadIO m, Label label, MonadMonitor m) => PVector label metric -> label -> m a -> m a
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
src/Mercury/Metrics/Helpers.hs:44:1: warning: [-Wunused-top-binds]
Defined but not used: ‘observeLabeledDuration’
|
44 | observeLabeledDuration pVector label action = do
| ^^^^^^^^^^^^^^^^^^^^^^
src/Mercury/Metrics/Helpers.hs:44:24: warning: [-Wunused-matches]
Defined but not used: ‘pVector’
|
44 | observeLabeledDuration pVector label action = do
| ^^^^^^^
src/Mercury/Metrics/Helpers.hs:44:32: warning: [-Wunused-matches]
Defined but not used: ‘label’
|
44 | observeLabeledDuration pVector label action = do
| ^^^^^ghcid: ghcid.txt: openFile: resource exhausted (Too many open files)
make: *** [Makefile:141: ghcid] Error 1
(2) ❄️ ~/D/M/h/mercury-web-backend> 21:34:37
Does the instructions at https://github.com/ndmitchell/ghcid#why-do-i-get-addwatch-resource-exhausted-no-space-left-on-device-on-my-mac help? It seems like the error message might have changed, if so, I'll update the FAQ to include both. I did a quick audit of the file reading code in Ghcid, and it looks pretty solid - I can't see any leaks so I suspect it's just Mac having really low defaults.
I didn't follow those instructions exactly, but I followed similar-ish ones that make it a permanent setting. That appears to have fixed it (caveat that I rebooted to apply those settings, so it's possible the reboot helped in some way).
I agree that it seems like this is just a Mac having low default file limits issue.
I think this is fine to close. I think updating the FAQ sounds good!
Do you have a link to the instructions you followed? If they are better, by virtue of being permanent, then I'll happily replace the FAQ.
There is a slight change in most revent Mac OS (Ventura in my particular case). There is no longer an option to set limit of watches. For some reason setting max opened filed limit helps: http://eradman.com/entrproject/limits.html. 🤔
Hi, I'm a happy user of ghcid but today it got stuck in some sort of loop where it was constantly refreshing. It printed this error:
I stopped ghcid and started again and it happened again. I searched the issues here and saw you requested starting with
--verbose
when this happens to get the full log output. I've uploaded that here: https://gist.github.com/MaxGabriel/167eadb8548286177ffbea95ca73757dI committed that code in case I need to reproduce later.
Environment info:
I'm running inside nix-shell on MacOS 10.15.2