Skip to content

Reflect trait should not require Send + Sync bounds #16713

Open
@alice-i-cecile

Description

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

Metadata

Labels

A-ReflectionRuntime information about typesC-BugAn unexpected or incorrect behaviorD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!X-UncontroversialThis work is generally agreed upon

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions