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

fix: don't throw on null error, hide JSON results warning #1935

Closed
wants to merge 2 commits into from

Conversation

sheremet-va
Copy link
Member

@sheremet-va sheremet-va commented Aug 30, 2022

We might corrupt JSON somehow, if user ends the process, so I think we should just skip it.

@sheremet-va sheremet-va requested a review from antfu August 30, 2022 07:19
@antfu
Copy link
Member

antfu commented Aug 30, 2022

I am not sure if I understand it, why do we need to limit the stacktrace?

@sheremet-va
Copy link
Member Author

I am not sure if I understand it, why do we need to limit the stacktrace?

I left a comment explaining why. Vitest sets a limit to 100 by default, which is a lot for something we don't use internally. Building stack trace is a heavy operation in Node, as we saw in Vite for example.

@antfu
Copy link
Member

antfu commented Aug 30, 2022

Vitest sets a limit to 100 by default

Should we low it down a bit and make it configurable?

@sheremet-va
Copy link
Member Author

sheremet-va commented Aug 30, 2022

Vitest sets a limit to 100 by default

Should we low it down a bit and make it configurable?

User errors are always visible, so I don't think it's necessary. The problem is with internal usage of new Error for parsing stack trace.

@sheremet-va
Copy link
Member Author

User errors are always visible, so I don't think it's necessary. The problem is with internal usage of new Error for parsing stack trace.

But I am not against making it configurable.

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.

2 participants