bevy_tilemap icon indicating copy to clipboard operation
bevy_tilemap copied to clipboard

no_implicit_prelude does not work at crate level

Open joshuajbouw opened this issue 3 years ago • 3 comments

Opened to track rust's fix.

no_implicit_prelude is handy if you want to know exactly what you are using in your library, allowing you to slim it down later as you typically have all your new prelude imports altogether. Cuts down on code as well, cleaning things up drastically.

The issue is that #![no_implicit_prelude] at lib level used to work fine. Then Serde support was added and it wouldn't build Serde since it too uses no_implicit_prelude. There was a work around though which worked. Problem is, now that workaround is broken. While the project will build fine, this is problematic for documentation.

See: https://github.com/rust-lang/rust/pull/80372

Temp workaround: https://github.com/joshuajbouw/bevy_tilemap/pull/83

joshuajbouw avatar Jan 11 '21 06:01 joshuajbouw

The re-export strategy also breaks the Bundle derive macro after bevyengine/bevy#1525. I ended up removing the lib prelude in my local branch since I couldn't figure out how to fix it.

siler avatar Mar 05 '21 22:03 siler

I'll be addressing that as soon as I can fix some other parts.

joshuajbouw avatar Mar 06 '21 07:03 joshuajbouw

Ah whoops, this shouldn't be closed right now. Still should be tracked.

joshuajbouw avatar Apr 08 '21 09:04 joshuajbouw