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

Reflect trait should not require Send + Sync bounds #16713

Open
alice-i-cecile opened this issue Dec 8, 2024 · 1 comment · May be fixed by #16993
Open

Reflect trait should not require Send + Sync bounds #16713

alice-i-cecile opened this issue Dec 8, 2024 · 1 comment · May be fixed by #16993
Assignees
Labels
A-Reflection Runtime information about types C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! X-Uncontroversial This work is generally agreed upon

Comments

@alice-i-cecile
Copy link
Member

alice-i-cecile commented Dec 8, 2024

Bevy version

0.15

Problem

Reflect has no intrinsic need to be Send + Sync. This limits its uses, especially in a broader non-Bevy context.

Solution

Remove Send + Sync trait bounds, adding them locally to any methods that fail to compile.

Context

According to @MrGVSV, this was originally for compatibility with components, before the explicit Component trait was added. This is backed up by Cart here

@alice-i-cecile alice-i-cecile added A-Reflection Runtime information about types C-Bug An unexpected or incorrect behavior S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes X-Uncontroversial This work is generally agreed upon D-Straightforward Simple bug fixes and API improvements, docs, test and examples and removed D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes labels Dec 8, 2024
@BenjaminBrienen BenjaminBrienen self-assigned this Dec 23, 2024
@BenjaminBrienen
Copy link
Contributor

I'm picking this up now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! X-Uncontroversial This work is generally agreed upon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants