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

Better user-facing compile-time errors using #[diagnostic] #13204

Closed
Adamkob12 opened this issue May 3, 2024 · 1 comment
Closed

Better user-facing compile-time errors using #[diagnostic] #13204

Adamkob12 opened this issue May 3, 2024 · 1 comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Duplicate This issue or PR already exists

Comments

@Adamkob12
Copy link
Contributor

What problem does this solve or what need does it fill?

Currently, due to the heavy use of all_tuples (Bundling up generic types in tuples) in traits like Bundle, SystemParam, IntoSystemConfig, user-facing compile time errors can get very messy and uninformative.

For example (the actual problem was caused when forgetting to implement Component for some type):

Screenshot from 2024-05-03 09-18-42

But it's gonna be very hard for inexperienced users to understand what the problem is, and how to fix it.

What solution would you like?

Version 1.78 introduced #[diagnostic] attributes. We can use #[diagnostic::on_unimplemented] to make those errors more informative and readable.

@Adamkob12 Adamkob12 added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels May 3, 2024
@alice-i-cecile
Copy link
Member

Duplicate of #12377 :) Strongly desired though!

@alice-i-cecile alice-i-cecile added S-Duplicate This issue or PR already exists A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels May 3, 2024
@alice-i-cecile alice-i-cecile closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Duplicate This issue or PR already exists
Projects
None yet
Development

No branches or pull requests

2 participants