Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Istanbul (nyc) code coverage causes exception in HyperTerm #357

Closed
AidenMontgomery opened this issue Jul 22, 2016 · 6 comments
Closed
Labels
👯‍♀️ Is Duplicate Issue is a duplicate of another issue

Comments

@AidenMontgomery
Copy link

I was looking at adding code coverage to a new node.js project I am working on, using Istanbul with Mocha.
Executing tests with code coverage enabled causes a JavaScript error to occur in the main process of HyperTerm.

A JavaScript error occurred in the main process

Uncaught Exception:
Error: watch /Users/aiden/.node-spawn-wrap-44908-58da72dfca0f ENOENT
    at exports._errnoException (util.js:949:11)
    at FSWatcher.start (fs.js:1433:19)
    at Object.fs.watch (fs.js:1460:11)
    at Gaze._watchDir (/Applications/HyperTerm.app/Contents/Resources/app/node_modules/gaze/lib/gaze.js:288:30)
    at /Applications/HyperTerm.app/Contents/Resources/app/node_modules/gaze/lib/gaze.js:357:10
    at iterate (/Applications/HyperTerm.app/Contents/Resources/app/node_modules/gaze/lib/helper.js:69:5)
    at /Applications/HyperTerm.app/Contents/Resources/app/node_modules/gaze/lib/helper.js:78:11
    at /Applications/HyperTerm.app/Contents/Resources/app/node_modules/gaze/lib/gaze.js:422:5
    at iterate (/Applications/HyperTerm.app/Contents/Resources/app/node_modules/gaze/lib/helper.js:69:5)
    at Object.forEachSeries (/Applications/HyperTerm.app/Contents/Resources/app/node_modules/gaze/lib/helper.js:83:3)

No matter where I run the code coverage from HyperTerm pops up the error dialog. I have tried executing the command in HyperTerm, iTerm and Terminal.

hypertermcoverageerror

@matheuss
Copy link
Member

Related: istanbuljs/nyc#324

@matheuss matheuss added the help wanted Contributions wanted towards the issue label Jul 26, 2016
@isaacs
Copy link

isaacs commented Jul 26, 2016

This looks like it's a shortcoming in https://github.com/tapjs/spawn-wrap

Since HyperTerm is using that (for some reason? I'm not aware, exactly? Probably to detect node processes and track them somehow?) and nyc uses it to wrap all node programs in Istanbul coverage, the two instances of spawn-wrap seem to be colliding with and/or overriding one another.

I'm not sure of the best way to approach this. Supporting multiple wrapper programs is pretty tricky, but probably possible. (It's software! he says with sarcastic delight that hides his sinking heart.)

@isaacs
Copy link

isaacs commented Jul 28, 2016

As far as I can tell, HyperTerm isn't using spawn-wrap, so this is probably not a collision, but definitely some kind of weird interaction.

Spawn-wrap shouldn't be breaking HyperTerm, but also, HyperTerm should not be susceptible to some program monkey-patching Node either.

@tkuminecz
Copy link

FWIW I'm seeing this issue as well

@whitelynx
Copy link

This looks related to #225, #444, and #542.

@matheuss
Copy link
Member

matheuss commented Sep 1, 2016

Closing in favor of #225

@matheuss matheuss closed this as completed Sep 1, 2016
@matheuss matheuss added 👯‍♀️ Is Duplicate Issue is a duplicate of another issue and removed help wanted Contributions wanted towards the issue 🐛 Type: Bug Issue pertains to something wrong within Hyper labels Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👯‍♀️ Is Duplicate Issue is a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

5 participants