You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking back at this because I think it would be really helpful to improve coverage of our tests. There are probably a bunch of user presented errors that we currently do not cover as part of our compile errors test.
I think the simplest thing we could do is to give each error an id and then simply check if all ids are covered in our compile errors tests.
Rust also has ids for the errors and begins each error message with error[<error-id>]. E.g.
error[E0433]: failed to resolve: use of undeclared type `TType`
--> crates/analyzer/src/traversal/expressions.rs:642:16
|
642 | Ok(TType::Mut(field_type(context, inner, field_name, field_span)?).id(context.db()))
| ^^^^^
| |
| use of undeclared type `TType`
| help: an enum with a similar name exists: `Type`
For more information about this error, try `rustc --explain E0433`.
We could turn that in a CI check so that it is always guaranteed that each user facing error has a corresponding test.
What is wrong?
Some of the errors that the compiler is supposed to present to the user aren't covered by tests.
How can it be fixed
Add a CI check that:
That should ensure we do not end up in a situation where we have uncovered compiler errors.
The text was updated successfully, but these errors were encountered: