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 hint about possibility to use babel plugin to improve reported st… #1726

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Andarist
Copy link
Member

No description provided.

crashedEffectLocation ? ` \n when executing effect ${crashedEffectLocation}` : ''
}`

if (process.env.NODE_ENV !== 'production' && !firstSaga.meta.location) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@restrry u know that logic better, is this condition a good one for this check? Can it yield false positives?

Copy link
Contributor

Choose a reason for hiding this comment

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

unfortunately it doesn't work as expected. for errors raised in helpers we don't have location, as effect is hidden in library code. for example, one of such cases:

  yield retry(3, 10, function() {
    undefinedIsNotAFunction()
  })

as an alternative solution we can use

sagaStack.some(s => s.meta.location)

which is a bit better, but still could lead to false positives.

Copy link
Member Author

Choose a reason for hiding this comment

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

hm, shouldnt "lastSaga" have location nearly in all cases then? 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose so

Copy link
Contributor

Choose a reason for hiding this comment

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

@Andarist do you want me to finish work on this branch?

Copy link
Member Author

Choose a reason for hiding this comment

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

That would definitely help, I'll try to dig into the babel location stuff in the meantime

Copy link

@szb512 szb512 left a comment

Choose a reason for hiding this comment

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

Maybe we should make changes...

@szb512
Copy link

szb512 commented Apr 23, 2019

These changes are already included in #1797 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants