Error spawning non-deserializable components
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
Bevy 0.15
## What you did
Spawn a component with BRP, specifically without reflecting `Deserialize`
## What went wrong
Bevy responds to the request with an error: `Unknown component type: bevy_reflect::DynamicEnum`.
I think this has to do with how we're looking up the component in the type registration, using `Dynamic-` types instead of the concrete type.
## Additional information
If a type reflects `Deserialize`, the request works flawlessly
Possibly relevant: https://docs.rs/bevy_remote/0.15.0/src/bevy_remote/builtin_methods.rs.html#817
Contributor guide
Research direction
Start at bevy_remote/builtin_methods.rs around the linked line and trace how BRP resolves component registrations for spawn requests. Reproduce the request with a component lacking Deserialize and compare it with one that reflects Deserialize; done means the non-deserializable component can be spawned without DynamicEnum being reported as its type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100