From 29a37c1071cff286f574ad938f476bc77044df6f Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Sat, 30 Jul 2022 09:21:07 -0700 Subject: [PATCH 1/2] N36: hecs --- content/news/036/index.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/content/news/036/index.md b/content/news/036/index.md index 368f7dd4f..daf3d5623 100644 --- a/content/news/036/index.md +++ b/content/news/036/index.md @@ -76,6 +76,21 @@ If needed, a section can be split into subsections with a "------" delimiter. ## Library Updates +### [hecs] + +[hecs] is a fast, lightweight, and unopinionated archetypal ECS library. + +[Version 0.8](hecs-changelog) marks a breaking change to most methods that +previously took a generic type parameter `T: Component`, replacing them with +methods taking type parameters which must be *references to* component types +instead. This resolves a long-standing footgun where users accustomed to writing +`&T` in queries might write `world.get::<&T>`, interpreted by rustc as +referencing the valid component type `&'static T`, resulting in code that +compiles but fails to access the intended component. + +[hecs]: https://github.com/Ralith/hecs +[hecs-changelog]: https://github.com/Ralith/hecs/blob/master/CHANGELOG.md#080 + ## Popular Workgroup Issues in Github From 2ea4aa7e17650cee45cf36b043ed6d028f22046f Mon Sep 17 00:00:00 2001 From: Joe Clay <27cupsofcoffee@gmail.com> Date: Sun, 31 Jul 2022 15:05:24 +0100 Subject: [PATCH 2/2] Update content/news/036/index.md --- content/news/036/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/news/036/index.md b/content/news/036/index.md index daf3d5623..b6942d02c 100644 --- a/content/news/036/index.md +++ b/content/news/036/index.md @@ -80,7 +80,7 @@ If needed, a section can be split into subsections with a "------" delimiter. [hecs] is a fast, lightweight, and unopinionated archetypal ECS library. -[Version 0.8](hecs-changelog) marks a breaking change to most methods that +[Version 0.8][hecs-changelog] marks a breaking change to most methods that previously took a generic type parameter `T: Component`, replacing them with methods taking type parameters which must be *references to* component types instead. This resolves a long-standing footgun where users accustomed to writing