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

[enhancement][DSLX] Type errors should show the function stack, if there is one #1826

Open
cdleary opened this issue Jan 3, 2025 · 0 comments
Labels
dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request

Comments

@cdleary
Copy link
Collaborator

cdleary commented Jan 3, 2025

What's hard to do? (limit 100 words)

If you get a type error in a helper routine, e.g. that uses parametrics, a type error will be identified in the leaf, but we don't currently display the calling context. We do maintain this information during typechecking (in DeduceCtx::fn_stack), so it would be good to capture/display it when producing an error message display.

Current best alternative workaround (limit 100 words)

It's tricky to figure out where things are coming from as it seems like we don't have trace_fmt! emit output at constexpr evaluation time right now.

Your view of the "best case XLS enhancement" (limit 100 words)

We'd display the function stack that led to the type error (in the leaf function) as part of the error display.

@cdleary cdleary added dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dslx DSLX (domain specific language) implementation / front-end enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant