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

Tracked DoesNotExist: so you know where it came from #263

Open
oxinabox opened this issue Dec 14, 2020 · 2 comments
Open

Tracked DoesNotExist: so you know where it came from #263

oxinabox opened this issue Dec 14, 2020 · 2 comments
Labels
debugging For helping with debugging enhancement New feature or request

Comments

@oxinabox
Copy link
Member

This was a discussion i had with Mike Innes about a year back.
The problem with DoesNotExist() is that you really have no idea where it came from.
Which in turn makes erroring on doing things with it problematic.

We could replace it with a macro (and probably rename it at the same time, #262).
If debugmode is enables tha macro could replace every instance with one that uses the same trick we use in for Thunks to capture the source location into a field.
Or for (much) higher performance cost, we could capture the stacktrace.

This would solve the problem that people sometimes have in Zygote where they are like "where did this nothing come from?"

@oxinabox oxinabox added enhancement New feature or request debugging For helping with debugging labels Dec 14, 2020
@mzgubic
Copy link
Member

mzgubic commented Dec 15, 2020

Would this only introduce an overhead in debug mode, or always?

@oxinabox
Copy link
Member Author

Only in debug mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debugging For helping with debugging enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants