bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Remove the 16-field limitation on the systemparam derive

Open TheRawMeatball opened this issue 3 years ago • 1 comments

Objective

Since this derive macro can create arbitrary code, it shouldn't be limited by the built-in limit to 16 system-parameters a tuple can have.

Solution

  • Adjust the derive macro to use a separate type, and expose the system param tuple macro so the derive macro can call it as needed.

Changelog

The SystemParam derive now supports structs with over 16 fields.

TheRawMeatball avatar Sep 12 '22 18:09 TheRawMeatball

Have you checked the compile time perf effects? This generates more code and as such will likely compile slower. If this is indeed the case, maybe only use the new code for >16 fields and use the old tuple code for <=16 fields?

bjorn3 avatar Sep 12 '22 18:09 bjorn3

Closing in favor of #6867

TheRawMeatball avatar Dec 13 '22 07:12 TheRawMeatball