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

Add informative error message for known point of failure (observers like Tap coverage on Node 8) #205

Merged
merged 1 commit into from Dec 4, 2018

Conversation

AlanSl
Copy link
Contributor

@AlanSl AlanSl commented Dec 3, 2018

0x fails in lib/ticks-to-tree.js if it is running inside a Tap test with coverage enabled on Node 8, which causes lib/random-require.js to return an empty string. There are probably other similar scenarios too, where something observing child processes interferes.

The point it fails doesn't give much of a clue about what happened - it's an assert in a file two removed from where the problem actually occurs, and the problem itself happens in random-require.js which is hard to debug because it uses console.log output to communicate with the parent process that calls it. Then quite a leap of logic is needed to link this to the actual cause (e.g. Tap coverage).

So it's helpful to give users and contributors an informative error message at this point.

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidmarkclements davidmarkclements merged commit ca6342b into davidmarkclements:master Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants