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

#[cube] impl blocks do not use spans to show where problems are #334

Open
torsteingrindvik opened this issue Dec 1, 2024 · 3 comments
Open

Comments

@torsteingrindvik
Copy link
Contributor

Example:

image

If possible spans from the proc macro should be used such that:

  1. The problematic method is highlighted
  2. (if possible) the problematic statement is highlighted

It can get difficult to know which method actually causes compile problems when doing larger refactors.

@nathanielsimard
Copy link
Member

When the cube function compiles, but not the expand function, it's hard to display good error messages! Not sure what we can do about it except try to bring those errors in the cube functions.

@torsteingrindvik
Copy link
Contributor Author

When the cube function compiles, but not the expand function, it's hard to display good error messages! Not sure what we can do about it except try to bring those errors in the cube functions.

Hm- this sounds like a situation that shouldn't happen then.
Could it then be considered a bug that the cube function compiled in such a case?

@nathanielsimard
Copy link
Member

nathanielsimard commented Jan 12, 2025

There are stuff that we can't detech from the cube function only. We rely on the type system to also validate the expand function. Things like does the expand method exist, do comptime branches return the same type, etc.

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

No branches or pull requests

2 participants