amethyst / specs

Specs - Parallel ECS
https://amethyst.github.io/specs/
Apache License 2.0
2.49k stars 219 forks source link

All-inclusive `derive` feature #684

Closed vorner closed 4 years ago

vorner commented 4 years ago

Description

Add another derive flag that enables all the available *-derive flags.

Motivation

I've spent non-trivial time searching why #[derive(SystemData)] does not work for me when I've already included the specs-derive feature. It is „hidden“ in shred-derive ‒ but, using shred is somewhat internal thing of specs so this is non-obvious. The documentation (book) doesn't really speak about specific features much either.

Including it as derive (same as serde and others), it is much easier to guess and it would allow all derives at once, saving such surprise.

Drawbacks

No

This might have slight impact on first compilation time to compile additional derive crate (eg. if I need just one and not the other). But as they both share the heavy dependencies (syntax, quote), it should be small. It's build-time only, no impact for runtime.

Users would still be able to enable only one of the originals if it mattered to them.

I have the actual change ready, I'd be willing to go through the documentation and mention the new flag.

azriel91 commented 4 years ago

Heya, that sounds good.

I'm about to do a release, but am happy to do another one straight after your change is merged :v:.