Skip to content

FromTemplate derive macro visibility change#24941

Open
alphadragon2 wants to merge 1 commit into
bevyengine:mainfrom
alphadragon2:main
Open

FromTemplate derive macro visibility change#24941
alphadragon2 wants to merge 1 commit into
bevyengine:mainfrom
alphadragon2:main

Conversation

@alphadragon2

Copy link
Copy Markdown

Objective

Currently, the visibility of member variables in the Template type created by the FromTemplate derive macro does not match the original type. instead, anything that is not pub is downgraded back to private.

This results in unexpected behaivor, where for example templates of that type cannot be used in different parts of the same crate, even if the original type has all member fields set to pub(crate).

Solution

Changed the visibility to simply copy the current visibility.

Testing

No testing beyond the included CI tests was performed.


@IQuick143 IQuick143 added A-Scenes Composing and serializing ECS objects D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Scenes Composing and serializing ECS objects D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants