fivdi / epoll

A low-level Node.js binding for the Linux epoll API
MIT License
84 stars 13 forks source link

add simple stub for non-linux installs #29

Closed iammatthew2 closed 5 years ago

iammatthew2 commented 5 years ago

Just a small change to make it clearer to users that epoll is only supported on Linux. This change should also make it easier to mock things out in case someone is dev'ing on a mac or windows machine - but good mocking may require a little more work.

fivdi commented 5 years ago

Hi @iammatthew2, thank you for this pull request. Did you test this on a non Linux machine? I don't think it will work because running npm install epoll on a non Linux machine will fail to the best of my knowledge.

iammatthew2 commented 5 years ago

@fivdi actually the install does not fail (at least not on a mac) - which is how me and a few other users have been able to generate this error: https://github.com/fivdi/epoll/issues/20

fivdi commented 5 years ago

I'm going to merge this and fix it a bit. Note that the idea is to provide a simple stub like this { Epoll: {} } rather than something that can be used for mocking.

fivdi commented 5 years ago

@iammatthew2 epoll v2.0.8 has been published on npm and although I haven't tried it out on a Mac, I think you should be able to achieve what you want to achieve now.

It would be great if you could give epoll v2.0.8 a try to see if it works as I don't have access to a Mac to try it out.