bevy/crates
Gino Valente 99c9218b56
bevy_reflect: Feature-gate function reflection (#14174)
# Objective

Function reflection requires a lot of macro code generation in the form
of several `all_tuples!` invocations, as well as impls generated in the
`Reflect` derive macro.

Seeing as function reflection is currently a bit more niche, it makes
sense to gate it all behind a feature.

## Solution

Add a `functions` feature to `bevy_reflect`, which can be enabled in
Bevy using the `reflect_functions` feature.

## Testing

You can test locally by running:

```
cargo test --package bevy_reflect
```

That should ensure that everything still works with the feature
disabled.

To test with the feature on, you can run:

```
cargo test --package bevy_reflect --features functions
```

---

## Changelog

- Moved function reflection behind a Cargo feature
(`bevy/reflect_functions` and `bevy_reflect/functions`)
- Add `IntoFunction` export in `bevy_reflect::prelude`

## Internal Migration Guide

> [!important]
> Function reflection was introduced as part of the 0.15 dev cycle. This
migration guide was written for developers relying on `main` during this
cycle, and is not a breaking change coming from 0.14.

Function reflection is now gated behind a feature. To use function
reflection, enable the feature:
- If using `bevy_reflect` directly, enable the `functions` feature
- If using `bevy`, enable the `reflect_functions` feature
2024-07-14 15:55:31 +00:00
..
bevy_a11y Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_animation Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_app Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_asset Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_audio Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_color Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_core Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_core_pipeline Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_derive Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_dev_tools Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_diagnostic Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_dylib Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_dynamic_plugin Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_ecs Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_encase_derive Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_gilrs Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_gizmos Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_gltf Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_hierarchy Fixed #14248 and other URL issues (#14276) 2024-07-11 12:01:49 +00:00
bevy_input Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_internal bevy_reflect: Feature-gate function reflection (#14174) 2024-07-14 15:55:31 +00:00
bevy_log Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_macro_utils Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_math Basic isometry types (#14269) 2024-07-14 15:27:42 +00:00
bevy_mikktspace Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_pbr Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_picking Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_ptr Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_reflect bevy_reflect: Feature-gate function reflection (#14174) 2024-07-14 15:55:31 +00:00
bevy_render Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_scene Created an EventMutator for when you want to mutate an event before reading (#13818) 2024-07-08 14:53:06 +00:00
bevy_sprite Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_state Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_tasks Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_text Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_time Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_transform Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_ui Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_utils Bump Version after Release (#14219) 2024-07-08 12:54:08 +00:00
bevy_window Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00
bevy_winit Fix intra-doc links and make CI test them (#14076) 2024-07-11 13:08:31 +00:00