hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.4K
active users

Hello! It's Lint Laundry Day, meaning I'll be spending the entirety of today working on the Bevy Linter! I'll be adding updates here showing what goes on behind-the-scenes of a project, which you can find at github.com/TheBevyFlock/bevy_c.

To begin, I'm going to continue my work improving the linter's documentation. Right now the lint group definitions are separated from the lints, meaning they're harder to discover! Let's move them a little closer together, and add examples on how to use them as well! (github.com/TheBevyFlock/bevy_c)

Our current documentation puts lint documentation in its module. The lint static and lint pass are made publish, with additional information added to the lint static's docs. Instead of this, we sho...
GitHubExpose only the lint static, not its module or lint pass · Issue #320 · TheBevyFlock/bevy_cliBy BD103

Fantastic, I just finished reorganizing our lint groups and am quite pleased with the result in github.com/TheBevyFlock/bevy_c. As lint groups are the easiest way to enable the lints you may want, I'm trying to make them much more visible in the documentation.

It's now much easier to discover the full list of lint groups by looking at the `crate::lints` page. Each lint is organized in a submodule based on its lint group, such as `crate::lints::suspicious`, which makes it easier to learn which lints are in what groups.

Overall, it's a great improvement to our documentation (thebevyflock.github.io/bevy_cl) and internal code structure!

Next up, we have github.com/TheBevyFlock/bevy_c that adds a page on coding conventions for the contributor's guide.

As I've worked more and more with `rustc`'s API, I have found common tasks that all lints must do and certain APIs that should be avoided. This page documents these things and provides a standardized solution.

The end-goal behind this page is to help keep the code consistent. Consistent code makes the user-experience smoother and makes it easier for developers to read the code!

This adds a new page to the linter contributor's guide that documents how we maintain the consistency of the project.
Is there anything I missed and should add here? I took the two entries from...
GitHubWrite coding conventions docs by BD103 · Pull Request #329 · TheBevyFlock/bevy_cliBy BD103

After that, I left a review on github.com/TheBevyFlock/bevy_c. It's a PR by the lovely DaAlbrecht that updates the linter to support Bevy 0.16! Though Bevy 0.16 has not officially released yet, it's just around the corner. I'm planning on publishing a new version of the linter (v0.3.0-rc.1 or v0.3.0) when that happens so that developers can use it in Bevy Jam #6!

Updating the linter to support a new version of Bevy isn't terribly challenging, but it has its moments! For example, in order to check if your code uses a specific type, we hard-code the absolute path to that type in one giant file (github.com/TheBevyFlock/bevy_c). If a type gets moved across versions, even if it was within a private module, we still have to update that file for it to work! This is part of the reason why the linter doesn't support multiple versions of Bevy yet.

Either way, DaAlbrecht's work is excellent; I just have a few minor changes before it can be merged. :apusheencomputer:

This updates the linter to support Bevy 0.16. As #138 has not yet been
implemented, Bevy 0.15 support is being dropped.
Relatively easy bump, all the Query and QueryState methods no longer panic, s...
GitHubLinter: Support Bevy 0.16 by DaAlbrecht · Pull Request #323 · TheBevyFlock/bevy_cliBy DaAlbrecht

One thing I did notice was that our CI was calling the `install-linux-deps` action twice! This action installs `alsa` and `udev` when called on a Linux runner, which are both dependencies need by Bevy to compile. There's no point installing them twice, though! I opened a small PR to fix this as well:

github.com/TheBevyFlock/bevy_c

GitHubDon't install Linux dependencies twice in CI by BD103 · Pull Request #330 · TheBevyFlock/bevy_cliBy BD103
BD103

And that concludes Lint Laundry Day! I ended up getting nerd-sniped by an inconsistent API change to Bevy's `Query::many()` method, so I spent the past few hours working on github.com/bevyengine/bevy/pul.

Either way, that was a solid day of productive work. I hope you enjoyed the behind-the-scenes tour! :)

Objective
There is a pretty glaring inconsistency between Query::single() and Query::get_many()'s naming. Although they both return a Result, the later was not renamed into many(). This inconsi...
GitHubRename `get_many()` to `many()`, making it consistent with `single()` by BD103 · Pull Request #18615 · bevyengine/bevyBy BD103