bevy/docs
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
..
cargo_features.md bevy_reflect: Feature-gate function reflection (#14174) 2024-07-14 15:55:31 +00:00
debugging.md Useful changes with relicensing benefits (#2497) 2021-07-17 21:59:31 +00:00
linters.md Allow clippy::type_complexity in more places. (#9796) 2023-10-02 21:55:16 +00:00
linux_dependencies.md add libxkbcommon-x11-0 to the default linux dependencies (#11060) 2023-12-21 23:14:05 +00:00
profiling.md Add Mac OS tracy info to profiling docs (#13826) 2024-07-08 01:21:52 +00:00
release_checklist.md Mention updating Bevy book code validation for release candidates (#13849) 2024-06-14 18:56:45 +00:00
the_bevy_organization.md Update and clarify a Maintainer merge rule (#13085) 2024-04-24 15:19:38 +00:00