Run `auto_register_static` example in CI
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
[`auto_register_static` example](https://github.com/bevyengine/bevy/tree/main/examples/reflection/auto_register_static) currently relies on some unspecified `rustc` compiler behavior that might change in the future, specifically:
- proc macros execute in the same order as crates get compiled. This is needed for `load_type_registrations!` to work. (I don't think there are any plans to change that?)
- proc macros aren't cached and execute exactly once every time a crate is recompiled. ([Cached proc macros](https://internals.rust-lang.org/t/caching-of-proc-macro-expansions/21466))
- proc macros have access to FS during execution. ([Sandboxed proc macos](https://internals.rust-lang.org/t/pre-rfc-sandboxed-deterministic-reproducible-efficient-wasm-compilation-of-proc-macros/19359))
I don't think that these unspecified behaviors are likely to change without a way to use the old behavior since many other crates rely on this specific implementation of proc macros (like `sqlx`), but even if implementation changes, there are still ways to work around that.
But to make sure the approach doesn't break without us noticing, it would make sense to run the example in the weekly CI to make sure it compiles and works as intended.
Contributor guide
Assessment
This issue has not been assessed yet.