Commit Graph

286 Commits

Author SHA1 Message Date
Zachary Harrold
958c9bb652
Add no_std Library Example (#18333)
# Objective

- Fixes #17506
- Fixes #16258

## Solution

- Added a new folder of examples, `no_std`, similar to the `mobile`
folder.
- Added a single example, `no_std_library`, which demonstrates how to
make a `no_std` compatible Bevy library.
- Added a new CI task, `check-compiles-no-std-examples`, which checks
that `no_std` examples compile on `no_std` targets.
- Added `bevy_platform_support::prelude` to `bevy::prelude`.

## Testing

- CI

---

## Notes

- I've structured the folders here to permit further `no_std` examples
(e.g., GameBoy Games, ESP32 firmware, etc.), but I am starting with the
simplest and least controversial example.
- I've tried to be as clear as possible with the documentation for this
example, catering to an audience who may not have even heard of `no_std`
before.

---------

Co-authored-by: Greeble <166992735+greeble-dev@users.noreply.github.com>
2025-03-18 00:45:25 +00:00
Mads Marquart
e6a6c9fb4c
Link iOS example with rustc, and avoid C trampoline (#14780)
# Objective

On iOS:
- Allow `std` to do its runtime initialization.
- Avoid requiring the user to specify linked libraries and framework in
Xcode.
- Reduce the amount of work that `#[bevy_main]` does
- In the future we may also be able to eliminate the need for it on
Android, cc @daxpedda.

## Solution

We previously:
- Exposed an `extern "C" fn main_rs` entry point.
- Ran Cargo in a separate Xcode target as an external build system.
- Imported that as a dependency of `bevy_mobile_example.app`.
- Compiled a trampoline C file with Xcode that called `main_rs`.
- Linked that via. Xcode.

All of this is unnecessary; `rustc` is well capable of creating iOS
executables, the trick is just to place it at the correct location for
Xcode to understand it, namely `$TARGET_BUILD_DIR/$EXECUTABLE_PATH`
(places it in `bevy_mobile_example.app/bevy_mobile_example`).

Note: We might want to wait with the changes to `#[bevy_main]` until the
problem is resolved on Android too, to make the migration easier.

## Testing

Open the Xcode project, and build for an iOS target.

---

## Migration Guide

**If you have been building your application for iOS:**

Previously, the `#[bevy_main]` attribute created a `main_rs` entry point
that most Xcode templates were using to run your Rust code from C. This
was found to be unnecessary, as you can simply let Rust build your
application as a binary, and run that directly.

You have two options for dealing with this:

If you've added further C code and Xcode customizations, or it makes
sense for your use-case to continue link with Xcode, you can revert to
the old behaviour by adding `#[no_mangle] extern "C" main_rs() { main()
}` to your `main.rs`. Note that the old approach of linking a static
library prevents the Rust standard library from doing runtime
initialization, so certain functionality provided by `std` might be
unavailable (stack overflow handlers, stdout/stderr flushing and other
such functionality provided by the initialization routines).

The other, preferred option is to remove your "compile" and "link" build
phases, and instead replace it with a "run script" phase that invokes
`cargo build --bin ...`, and moves the built binary to the Xcode path
`$TARGET_BUILD_DIR/$EXECUTABLE_PATH`. An example of how to do this can
be viewed at [INSERT LINK TO UPDATED EXAMPLE PROJECT].
To make the debugging experience in Xcode nicer after this, you might
also want to consider either enabling `panic = "abort"` or to set a
breakpoint on the `rust_panic` symbol.

---------

Co-authored-by: François Mockers <mockersf@gmail.com>
Co-authored-by: François Mockers <francois.mockers@vleue.com>
2025-03-17 21:14:07 +00:00
dependabot[bot]
c821eda853
Bump crate-ci/typos from 1.30.1 to 1.30.2 (#18354)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.30.1 to
1.30.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.30.2</h2>
<h2>[1.30.2] - 2025-03-10</h2>
<h3>Features</h3>
<ul>
<li>Add <code>--highlight-words</code> and
<code>--highlight-identifiers</code> for easier debugging of config</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.30.2] - 2025-03-10</h2>
<h3>Features</h3>
<ul>
<li>Add <code>--highlight-words</code> and
<code>--highlight-identifiers</code> for easier debugging of config</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7bc041cbb7"><code>7bc041c</code></a>
chore: Release</li>
<li><a
href="4af8a5a1fb"><code>4af8a5a</code></a>
docs: Update changelog</li>
<li><a
href="ec626a1e53"><code>ec626a1</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1257">#1257</a>
from epage/highlight</li>
<li><a
href="d06a1dd728"><code>d06a1dd</code></a>
feat(cli): Add '--highlight-&lt;identifiers|words&gt;' flags</li>
<li>See full diff in <a
href="https://github.com/crate-ci/typos/compare/v1.30.1...v1.30.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.30.1&new-version=1.30.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-17 07:04:41 +00:00
François Mockers
6b61e38011
update superlinter (#18320)
# Objective

- super-linter uses an old version in CI and wasn't updated for the last
two years

## Solution

- Update super-linter
2025-03-16 20:25:45 +00:00
dependabot[bot]
67c61d115d
Bump crate-ci/typos from 1.30.0 to 1.30.1 (#18227)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.30.0 to
1.30.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.30.1</h2>
<h2>[1.30.1] - 2025-03-04</h2>
<h3>Features</h3>
<ul>
<li><em>(action)</em> Create <code>v1</code> tag</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.30.1] - 2025-03-04</h2>
<h3>Features</h3>
<ul>
<li><em>(action)</em> Create <code>v1</code> tag</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="72f3776b6e"><code>72f3776</code></a>
chore: Release</li>
<li><a
href="36c9d7068c"><code>36c9d70</code></a>
docs: Update changelog</li>
<li><a
href="67a0344016"><code>67a0344</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1250">#1250</a>
from muzimuzhi/ci/major-tag</li>
<li><a
href="6b1c68673a"><code>6b1c686</code></a>
chore(ci): maintain major tags for GitHub Actions</li>
<li><a
href="ff2ab643f4"><code>ff2ab64</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1247">#1247</a>
from crate-ci/renovate/derive_more-2.x</li>
<li><a
href="561caedbaf"><code>561caed</code></a>
chore(deps): Update Rust crate derive_more to v2</li>
<li>See full diff in <a
href="https://github.com/crate-ci/typos/compare/v1.30.0...v1.30.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.30.0&new-version=1.30.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-10 07:00:05 +00:00
François Mockers
2a2e0a8555
Fix CI comment workflow after 18196 (#18217)
# Objective

- I messed up in #18196 and broke the CI comment workflow

## Solution

- Use the correct way to check a step
2025-03-09 22:50:57 +00:00
François Mockers
4cd014384f
action shouldn't comment on a pr if last comment is from action (#18196)
# Objective

- While a PR is in work, if several commits fail and trigger a comment
from the action, this can create a lot of comments from actions with low
value
- Noticed on https://github.com/bevyengine/bevy/pull/18139

## Solution

- If last comment on a PR is from an action, don't add a new comment

---------

Co-authored-by: Martín Maita <47983254+mnmaita@users.noreply.github.com>
2025-03-09 20:26:19 +00:00
Zachary Harrold
cc69fdd0c6
Add no_std support to bevy (#17955)
# Objective

- Fixes #15460 (will open new issues for further `no_std` efforts)
- Supersedes #17715

## Solution

- Threaded in new features as required
- Made certain crates optional but default enabled
- Removed `compile-check-no-std` from internal `ci` tool since GitHub CI
can now simply check `bevy` itself now
- Added CI task to check `bevy` on `thumbv6m-none-eabi` to ensure
`portable-atomic` support is still valid [^1]

[^1]: This may be controversial, since it could be interpreted as
implying Bevy will maintain support for `thumbv6m-none-eabi` going
forward. In reality, just like `x86_64-unknown-none`, this is a
[canary](https://en.wiktionary.org/wiki/canary_in_a_coal_mine) target to
make it clear when `portable-atomic` no longer works as intended (fixing
atomic support on atomically challenged platforms). If a PR comes
through and makes supporting this class of platforms impossible, then
this CI task can be removed. I however wager this won't be a problem.

## Testing

- CI

---

## Release Notes

Bevy now has support for `no_std` directly from the `bevy` crate.

Users can disable default features and enable a new `default_no_std`
feature instead, allowing `bevy` to be used in `no_std` applications and
libraries.

```toml
# Bevy for `no_std` platforms
bevy = { version = "0.16", default-features = false, features = ["default_no_std"] }
```

`default_no_std` enables certain required features, such as `libm` and
`critical-section`, and as many optional crates as possible (currently
just `bevy_state`). For atomically-challenged platforms such as the
Raspberry Pi Pico, `portable-atomic` will be used automatically.

For library authors, we recommend depending on `bevy` with
`default-features = false` to allow `std` and `no_std` users to both
depend on your crate. Here are some recommended features a library crate
may want to expose:

```toml
[features]
# Most users will be on a platform which has `std` and can use the more-powerful `async_executor`.
default = ["std", "async_executor"]

# Features for typical platforms.
std = ["bevy/std"]
async_executor = ["bevy/async_executor"]

# Features for `no_std` platforms.
libm = ["bevy/libm"]
critical-section = ["bevy/critical-section"]

[dependencies]
# We disable default features to ensure we don't accidentally enable `std` on `no_std` targets, for example. 
bevy = { version = "0.16", default-features = false }
```

While this is verbose, it gives the maximum control to end-users to
decide how they wish to use Bevy on their platform.

We encourage library authors to experiment with `no_std` support. For
libraries relying exclusively on `bevy` and no other dependencies, it
may be as simple as adding `#![no_std]` to your `lib.rs` and exposing
features as above! Bevy can also provide many `std` types, such as
`HashMap`, `Mutex`, and `Instant` on all platforms. See
`bevy::platform_support` for details on what's available out of the box!

## Migration Guide

- If you were previously relying on `bevy` with default features
disabled, you may need to enable the `std` and `async_executor`
features.
- `bevy_reflect` has had its `bevy` feature removed. If you were relying
on this feature, simply enable `smallvec` and `smol_str` instead.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-03-07 03:39:46 +00:00
François Mockers
8f85d4e598
rendering regression: mention in pr comment that the solution could be to update the pr (#18153)
# Objective

- When a PR gets merged that modifies the rendering screenshots, the
main reference will be updated
- Every in-flight PR will then "fail" rendering change detection as they
come from an outdated main branch

## Solution

- Suggest updating the PR to the latest main branch
2025-03-07 00:18:24 +00:00
Alice Cecile
3be01c4d0f
Fix label name for Deliberate-Rendering-Change CI (#18118)
# Objective

The label added in #18064 is the wrong color! It should be an `M-`
(meta) label, not an `S-` (status) label!

## Solution

- Rename the label in the comment that gets left to
`M-Deliberate-Rendering-Change`
- Also make the job check for the right label 🤦🏽‍♀️ 

Once this is approved and ready to merge, I'll rename the label on
Github to match.
2025-03-02 22:54:54 +00:00
Rob Parrett
36cb64b382
Bump typos to 1.30.0 (#18097)
# Objective

Update `typos` and fix newly detected typos.


[Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md#1300---2025-03-01)
(just a dictionary update releases)

## Solution

Fix em

- Describe the solution used to achieve the objective above.

## Testing

CI
2025-03-02 19:02:23 +00:00
François Mockers
0122b85cc3
comment on PR when example job finds changes (#18064)
# Objective

- Comment on PR when getting a rendering change

## Solution

- When something changes in the rendering check CI, add a comment on the
PR to check the results
- Suggest adding the label `S-Deliberate-Rendering-Change` if it's
expected
- Don't comment if the label is already present

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-02-27 22:46:10 +00:00
François Mockers
2f633c18ba
Split example runs to their own GitHub workflow (#18039)
# Objective

- next step for #15918 

## Solution

- Move jobs for macOS, Linux and Windows to their own workflow
- Remove running on push to `main` from workflows CI and validation
2025-02-25 23:30:31 +00:00
Brezak
5961df7c89
Automatically close weekly ci issue if weekly ci succeeds (#18016)
# Objective

It's not always obvious when the issue created by the weekly CI run is
safe to close.

## Solution

Automatically close it when a weekly CI run succeeds so it doesn't get
forgotten.

## Testing

Hope.
2025-02-25 19:21:04 +00:00
dependabot[bot]
0855a0e8ad
Bump crate-ci/typos from 1.29.7 to 1.29.9 (#18012)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.29.7 to
1.29.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.29.9</h2>
<h2>[1.29.9] - 2025-02-20</h2>
<h3>Fixes</h3>
<ul>
<li><em>(action)</em> Correctly get binary for some aarch64 systems</li>
</ul>
<h2>v1.29.8</h2>
<h2>[1.29.8] - 2025-02-19</h2>
<h3>Features</h3>
<ul>
<li>Attempt to build Linux aarch64 binaries</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.29.9] - 2025-02-20</h2>
<h3>Fixes</h3>
<ul>
<li><em>(action)</em> Correctly get binary for some aarch64 systems</li>
</ul>
<h2>[1.29.8] - 2025-02-19</h2>
<h3>Features</h3>
<ul>
<li>Attempt to build Linux aarch64 binaries</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="212923e4ff"><code>212923e</code></a>
chore: Release</li>
<li><a
href="659bf55253"><code>659bf55</code></a>
docs: Update changelog</li>
<li><a
href="092b7056bb"><code>092b705</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1239">#1239</a>
from codingskynet/fix/support-aarch64</li>
<li><a
href="298a143ed0"><code>298a143</code></a>
chore(gh): Fix links</li>
<li><a
href="d7059d7796"><code>d7059d7</code></a>
chore(gh): Fix links</li>
<li><a
href="636d59beef"><code>636d59b</code></a>
chore(gh): Encourage people to check for dupes</li>
<li><a
href="51cd88f328"><code>51cd88f</code></a>
chore(gh): Add a data template</li>
<li><a
href="c11cf6c0e1"><code>c11cf6c</code></a>
chore(gh): Try to clarify template</li>
<li><a
href="3bcb919148"><code>3bcb919</code></a>
fix: add aarch64 on arm64 cond</li>
<li><a
href="1ea66fdf4d"><code>1ea66fd</code></a>
docs(readme): Call out that the readme is not exhaustive</li>
<li>Additional commits viewable in <a
href="https://github.com/crate-ci/typos/compare/v1.29.7...v1.29.9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.29.7&new-version=1.29.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-24 11:27:55 +00:00
Zachary Harrold
5241e09671
Upgrade to Rust Edition 2024 (#17967)
# Objective

- Fixes #17960

## Solution

- Followed the [edition upgrade
guide](https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html)

## Testing

- CI

---

## Summary of Changes

### Documentation Indentation

When using lists in documentation, proper indentation is now linted for.
This means subsequent lines within the same list item must start at the
same indentation level as the item.

```rust
/* Valid */
/// - Item 1
///   Run-on sentence.
/// - Item 2
struct Foo;

/* Invalid */
/// - Item 1
///     Run-on sentence.
/// - Item 2
struct Foo;
```

### Implicit `!` to `()` Conversion

`!` (the never return type, returned by `panic!`, etc.) no longer
implicitly converts to `()`. This is particularly painful for systems
with `todo!` or `panic!` statements, as they will no longer be functions
returning `()` (or `Result<()>`), making them invalid systems for
functions like `add_systems`. The ideal fix would be to accept functions
returning `!` (or rather, _not_ returning), but this is blocked on the
[stabilisation of the `!` type
itself](https://doc.rust-lang.org/std/primitive.never.html), which is
not done.

The "simple" fix would be to add an explicit `-> ()` to system
signatures (e.g., `|| { todo!() }` becomes `|| -> () { todo!() }`).
However, this is _also_ banned, as there is an existing lint which (IMO,
incorrectly) marks this as an unnecessary annotation.

So, the "fix" (read: workaround) is to put these kinds of `|| -> ! { ...
}` closuers into variables and give the variable an explicit type (e.g.,
`fn()`).

```rust
// Valid
let system: fn() = || todo!("Not implemented yet!");
app.add_systems(..., system);

// Invalid
app.add_systems(..., || todo!("Not implemented yet!"));
```

### Temporary Variable Lifetimes

The order in which temporary variables are dropped has changed. The
simple fix here is _usually_ to just assign temporaries to a named
variable before use.

### `gen` is a keyword

We can no longer use the name `gen` as it is reserved for a future
generator syntax. This involved replacing uses of the name `gen` with
`r#gen` (the raw-identifier syntax).

### Formatting has changed

Use statements have had the order of imports changed, causing a
substantial +/-3,000 diff when applied. For now, I have opted-out of
this change by amending `rustfmt.toml`

```toml
style_edition = "2021"
```

This preserves the original formatting for now, reducing the size of
this PR. It would be a simple followup to update this to 2024 and run
`cargo fmt`.

### New `use<>` Opt-Out Syntax

Lifetimes are now implicitly included in RPIT types. There was a handful
of instances where it needed to be added to satisfy the borrow checker,
but there may be more cases where it _should_ be added to avoid
breakages in user code.

### `MyUnitStruct { .. }` is an invalid pattern

Previously, you could match against unit structs (and unit enum
variants) with a `{ .. }` destructuring. This is no longer valid.

### Pretty much every use of `ref` and `mut` are gone

Pattern binding has changed to the point where these terms are largely
unused now. They still serve a purpose, but it is far more niche now.

### `iter::repeat(...).take(...)` is bad

New lint recommends using the more explicit `iter::repeat_n(..., ...)`
instead.

## Migration Guide

The lifetimes of functions using return-position impl-trait (RPIT) are
likely _more_ conservative than they had been previously. If you
encounter lifetime issues with such a function, please create an issue
to investigate the addition of `+ use<...>`.

## Notes

- Check the individual commits for a clearer breakdown for what
_actually_ changed.

---------

Co-authored-by: François Mockers <francois.mockers@vleue.com>
2025-02-24 03:54:47 +00:00
François Mockers
e4e70a7473
don't update mesa for wasm example run (#17999)
# Objective

- running wasm examples in CI currently timeout, this blocks merging PRs

## Solution

- Don't update mesa but uses the version provided by the latest ubuntu
- Alternative to #17998

## Testing

run in a docker container: `docker run --rm -it ubuntu`
```
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y curl git software-properties-common nodejs npm build-essential
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
rustup target install wasm32-unknown-unknown

curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall wasm-bindgen-cli -y


git clone https://github.com/bevyengine/bevy
cd bevy

cd .github/start-wasm-example
npm install
npx playwright install --with-deps
cd ../..

python3 -m http.server --directory examples/wasm &

xvfb-run cargo run -p build-wasm-example -- --browsers firefox --frames 25 --test 2d_shapes
```
2025-02-23 20:09:12 +00:00
Rob Parrett
fb1e829294
Bump typos to 1.29.7 (#17902)
# Objective

Alternative to #17894 that also cleans up the workaround from the
previous version

## Solution

Bump version and remove entry from `typos` config
2025-02-17 20:41:25 +00:00
Rob Parrett
2760692f88
Update typos to 1.29.6 (#17850)
# Objective

Update typos, fix new typos.

1.29.6 was just released to fix an
[issue](https://github.com/crate-ci/typos/issues/1228) where January's
corrections were not included in the binaries for the last release.

Reminder: typos can be tossed in the monthly [non-critical corrections
issue](https://github.com/crate-ci/typos/issues/1221).

## Solution

I chose to allow `implementors`, because a good argument seems to be
being made [here](https://github.com/crate-ci/typos/issues/1226) and
there is now a PR to address that.

## Discussion

Should I exclude `bevy_mikktspace`?

At one point I think we had an informal policy of "don't mess with
mikktspace until https://github.com/bevyengine/bevy/pull/9050 is merged"
but it doesn't seem like that is likely to be merged any time soon.

I think these particular corrections in mikktspace are fine because
- The same typo mistake seems to have been fixed in that PR
- The entire file containing these corrections was deleted in that PR

## Typo of the Month

correspindong -> corresponding
2025-02-13 19:44:47 +00:00
SpecificProtagonist
5b0d898866
Trait tags on docs.rs (#17758)
# Objective

Bevy's ECS provides several core traits such as `Component`,
`SystemParam`, etc that determine where a type can be used. When reading
the docs, this currently requires scrolling down to and scanning the
"Trait Implementations" section. Make these core traits more visible.

## Solution

Add a color-coded labels below the type heading denoting the following
types:
- `Component`
  - immutable components are labeled as such
- `Resource`
- `Asset`
- `Event`
- `Plugin` & `PluginGroup`
- `ScheduleLabel` & `SystemSet`
- `SystemParam`

As docs.rs does not provide an option for post-processing the html,
these are added via JS with traits implementations being detected by
scanning the DOM. Rustdoc's html output is unstable, which could
potentially lead to this detection (or the adding of the labels) to
break, however it only needs to work when a new release is deployed and
falls back to the status quo of not displaying these labels.

Idea by JMS55, implementation by Jondolf (see
https://github.com/Jondolf/bevy_docs_extension_demo/).

## Testing

Run this in Bevy's root folder:
```bash
 RUSTDOCFLAGS="--html-after-content docs-rs/trait-tags.html --cfg docsrs_dep" RUSTFLAGS="--cfg docsrs_dep" cargo doc --no-deps -p <some_bevy_package>
```

---

## Showcase
Check it out on
[docs.rs](https://docs.rs/bevy_docs_extension_demo/0.1.1/bevy_docs_extension_demo/struct.TestAllTraits.html)

![trait
tags](https://github.com/user-attachments/assets/a30d8324-41fd-432a-8e49-6d475f143725)

## Release Notes

On docs.rs, Bevy now displays labels indicating which core traits a type
implements:
![trait tags
small](https://github.com/user-attachments/assets/c69b565f-e4bc-4277-9f6b-40830031077d)

If you want to add these to your own crate, check out [these
instructions](https://github.com/bevyengine/bevy/blob/main/docs-rs#3rd-party-crates).

---------

Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
Co-authored-by: Carter Weinberg <weinbergcarter@gmail.com>
2025-02-11 22:13:38 +00:00
François Mockers
7d141829be
run example in CI on windows using static dxc (#17783)
# Objective

- Run more things on windows

## Solution

- With the update of wgpu and the statically linked dxc, examples now
run on windows in CI
2025-02-10 22:35:41 +00:00
dependabot[bot]
d9df371ef2
Bump crate-ci/typos from 1.29.4 to 1.29.5 (#17655)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.29.4 to
1.29.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.29.5</h2>
<h2>[1.29.5] - 2025-01-30</h2>
<h3>Internal</h3>
<ul>
<li>Update a dependency</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.29.5] - 2025-01-30</h2>
<h3>Internal</h3>
<ul>
<li>Update a dependency</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="11ca4583f2"><code>11ca458</code></a>
chore: Release</li>
<li><a
href="99fd37f157"><code>99fd37f</code></a>
docs: Update changelog</li>
<li><a
href="4f604f6eff"><code>4f604f6</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1220">#1220</a>
from epage/w7</li>
<li><a
href="ba04a1a0fd"><code>ba04a1a</code></a>
perf: Remove ErrMode overhead</li>
<li><a
href="60452b5a81"><code>60452b5</code></a>
chore: Update to Winnow 0.7</li>
<li><a
href="4c22f194b5"><code>4c22f19</code></a>
refactor: Migrate from Parser to ModalParser</li>
<li><a
href="7830eb8730"><code>7830eb8</code></a>
refactor: Resolve deprecations</li>
<li><a
href="07f1292e29"><code>07f1292</code></a>
chore: Upgrade to Winnow 0.6.26</li>
<li><a
href="3683264986"><code>3683264</code></a>
chore(deps): Update Rust Stable to v1.84 (<a
href="https://redirect.github.com/crate-ci/typos/issues/1216">#1216</a>)</li>
<li><a
href="2ed38e07fc"><code>2ed38e0</code></a>
chore(deps): Update Rust crate bstr to v1.11.3 (<a
href="https://redirect.github.com/crate-ci/typos/issues/1202">#1202</a>)</li>
<li>See full diff in <a
href="https://github.com/crate-ci/typos/compare/v1.29.4...v1.29.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.29.4&new-version=1.29.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 07:36:25 +00:00
François Mockers
33c5e0bc96
Tiny ci improvements (#17627)
# Objective

- make CI a bit faster without losing anything

## Solution

- Always disable incremental compilation. This was done in a few jobs,
just do it everywhere
- Also disable debug info. This should reduce target folder a bit,
reducing cache size and upload duration
2025-02-02 06:32:07 +00:00
Rob Parrett
edb34cd2dd
Run example validation jobs on ubuntu-latest (#17169)
# Objective

Fixes #17164

## Solution

- Switch to `ubuntu-latest`
- Remove `libegl1-mesa`. It seems that whatever this was providing is
now covered by other deps or their deps?

## Testing

Tested [over here](https://github.com/rparrett/bevy/pull/21) by
commenting out workflow `if` condition.
2025-01-20 12:51:48 +00:00
Benjamin Brienen
8baf4e5b2c
msrv needs build (#17156)
# Objective

My previous PR is causing the github bot to comment whenver a PR build
fails. This is a mistake.

## Solution

msrv should depend on build succeeding
2025-01-07 17:57:32 +00:00
François Mockers
cc4aace1aa
Fix workflows for version bump (#17162)
# Objective

- Version bump workflow fails due to a permission issue
- Fixes #17153

## Solution

- Add the required permissions
- Also remove workflow not used anymore since the RC
2025-01-05 20:27:58 +00:00
François Mockers
20c1a7e9ce
remove daily mobile jobs (#17163)
# Objective

- Daily mobile job has been failing for a long time
- It's in a weird state of hard to fix without knowing some passwords,
hard to monitor, and not that used anyway
- I keep a working version in the example runner repository that runs
more often

## Solution

- Remove the workflow from the Bevy repo
2025-01-05 20:27:39 +00:00
Benjamin Brienen
39f38a191e
Add -D warnings in a few steps (#17081)
# Objective

I missed a couple checks in #17011 

## Solution

Add env

## Testing

CI
2025-01-03 22:28:56 +00:00
Rob Parrett
651b22f31f
Update typos (#17126)
# Objective

Use the latest version of `typos` and fix the typos that it now detects

# Additional Info

By the way, `typos` has a "low priority typo suggestions issue" where we
can throw typos we find that `typos` doesn't catch.

(This link may go stale) https://github.com/crate-ci/typos/issues/1200
2025-01-03 17:44:26 +00:00
Rob Parrett
effc9df572
Show working urls to screenshot comparisons in output (#17125)
# Objective

When a PR introduces changes that result in differences in the rendering
one of the "testbeds," contributors get a nice email informing them
about a [failed workflow
run](https://github.com/bevyengine/bevy/actions/runs/12599884045/job/35117729566).

However, this email contains links that just go to a json blob which
isn't as helpful as it could be. If you squint real hard, you can figure
out which testbed failed and at which frame the screenshot took place.
Not ideal.

This changes the urls presented as output in that workflow so that they
lead to the actual screenshot comparison screen on pixel-eagle.


![image](https://github.com/user-attachments/assets/36af7f29-9319-4a1f-bf0a-7f7ffd5d613f)

<img width="753" alt="image"
src="https://github.com/user-attachments/assets/7d39de37-8cff-4db3-8fbc-288e482d876c"
/>

## Solution

Change the urls in the output from e.g.


https://pixel-eagle.vleue.com/B04F67C0-C054-4A6F-92EC-F599FEC2FD1D/runs/4591/compare/4568

To


https://pixel-eagle.com/project/B04F67C0-C054-4A6F-92EC-F599FEC2FD1D/run/4591/compare/4568

Without messing with any of the URLs involved in uploading the
screenshots.

## Testing

I have not tested this (yet) beyond manual testing of the new URL
structure. I suspect it's not possible to test in a fork.
2025-01-03 17:38:12 +00:00
Benjamin Brienen
4460a4d9ed
Use -D warnings in all relevant CI (#17011)
# Objective

Fixes #17009

See:
https://doc.rust-lang.org/stable/clippy/continuous_integration/index.html

## Solution

Add the env

## Testing

CI should start to fail, then I'll fix it.

## Showcase


![image](https://github.com/user-attachments/assets/acd2888f-9fc0-445a-a96a-842ba9f1c6aa)
2024-12-31 00:15:28 +00:00
dependabot[bot]
8d9a00f548
Bump crate-ci/typos from 1.28.3 to 1.28.4 (#16943)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.28.3 to
1.28.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.28.4</h2>
<h2>[1.28.4] - 2024-12-16</h2>
<h3>Features</h3>
<ul>
<li><code>--format sarif</code> support</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.28.4] - 2024-12-16</h2>
<h3>Features</h3>
<ul>
<li><code>--format sarif</code> support</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9d89015957"><code>9d89015</code></a>
chore: Release</li>
<li><a
href="6b24563a99"><code>6b24563</code></a>
chore: Release</li>
<li><a
href="bd0a2769ae"><code>bd0a276</code></a>
docs: Update changelog</li>
<li><a
href="370109dd4d"><code>370109d</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1047">#1047</a>
from Zxilly/sarif</li>
<li><a
href="63908449a7"><code>6390844</code></a>
feat: Implement sarif format reporter</li>
<li><a
href="32b96444b9"><code>32b9644</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1169">#1169</a>
from klensy/deps</li>
<li><a
href="720258f60b"><code>720258f</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1176">#1176</a>
from Ghaniyyat05/master</li>
<li><a
href="a42904ad6e"><code>a42904a</code></a>
Update README.md</li>
<li><a
href="0169b9b9e8"><code>0169b9b</code></a>
fix: Remove some unused deps</li>
<li>See full diff in <a
href="https://github.com/crate-ci/typos/compare/v1.28.3...v1.28.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.28.3&new-version=1.28.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-23 07:33:22 +00:00
Alice Cecile
05c6931279
Revert "Make doc CI use nightly (#16147)" (#16891)
This reverts commit 58a73924eb.

# Objective

This is causing local `cargo run -p ci` runs to fail on `stable` Rust
when used locally. Fixes #16871.

## Solution

Revert #16147. We shouldn't have merged this until we had a full
solution (I missed a Controversial tag, sorry!).

## Testing

`cargo run -p ci` fails for me before this change in the reported
fashion. After this reversion, it passes.
2024-12-19 19:22:22 +00:00
dependabot[bot]
dff3a54ef4
Bump crate-ci/typos from 1.28.2 to 1.28.3 (#16839)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.28.2 to
1.28.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.28.3</h2>
<h2>[1.28.3] - 2024-12-12</h2>
<h3>Fixes</h3>
<ul>
<li>Correct <code>imlementations</code>, <code>includs</code>,
<code>qurorum</code>, <code>transatctions</code>,
<code>trasnactions</code>, <code>validasted</code>,
<code>vview</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.28.3] - 2024-12-12</h2>
<h3>Fixes</h3>
<ul>
<li>Correct <code>imlementations</code>, <code>includs</code>,
<code>qurorum</code>, <code>transatctions</code>,
<code>trasnactions</code>, <code>validasted</code>,
<code>vview</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d1c850b2b5"><code>d1c850b</code></a>
chore: Release</li>
<li><a
href="a491fd56c0"><code>a491fd5</code></a>
chore: Release</li>
<li><a
href="24e56187fb"><code>24e5618</code></a>
docs: Update changelog</li>
<li><a
href="2d71541874"><code>2d71541</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1174">#1174</a>
from pls148/ps/typos-01</li>
<li><a
href="cabd73a071"><code>cabd73a</code></a>
add typos
imlementations,includs,qurorum,transatctions,trasnactions,validaste...</li>
<li><a
href="153dc19309"><code>153dc19</code></a>
docs(readme): Use console code blocks</li>
<li><a
href="97898e1459"><code>97898e1</code></a>
chore(deps): Update compatible (<a
href="https://redirect.github.com/crate-ci/typos/issues/1160">#1160</a>)</li>
<li><a
href="2da1cd1d09"><code>2da1cd1</code></a>
chore: Bump MSRV to 1.80</li>
<li><a
href="b4a328f359"><code>b4a328f</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1163">#1163</a>
from crate-ci/renovate/thiserror-2.x</li>
<li><a
href="c0dae68901"><code>c0dae68</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1162">#1162</a>
from crate-ci/renovate/clap-verbosity-flag-3.x</li>
<li>Additional commits viewable in <a
href="https://github.com/crate-ci/typos/compare/v1.28.2...v1.28.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.28.2&new-version=1.28.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-17 05:07:58 +00:00
homersimpsons
a6b5f80715
⬆️ Upgrade typos and its configuration (#16712)
# Objective

Fixes #16610, related to #16702

## Solution

Upgrade typos and its configuration

## Testing

- Did you test these changes? If so, how? No
- Are there any parts that need more testing? No
- How can other people (reviewers) test your changes? Is there anything
specific they need to know? No
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test? Not applicable
2024-12-08 17:25:10 +00:00
MichiRecRoom
24c3bd5f00
Skip all jobs on the Weekly beta compile test workflow when running on a fork (#16674)
# Objective
The weekly beta compile test workflow can be useful to people who have
forked the repository.

However, there are a few small issues with how this workflow is
currently set up:
* Scheduled workflows run on the base/default branch, with no way
(currently) to change this. On forks, the base/default branch is usually
kept in sync with the main Bevy repository, meaning that running this
workflow on forks would just be a waste of resources. (See
[here](https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule)
- "Scheduled workflows will only run on the default branch.")
* Even if there was a way to change the branch that a scheduled workflow
runs on, forks default to not having an issue tracker.
* Even in the event that a fork's issue tracker is enabled, most users
probably don't want to receive automated issues in the event of a
compilation failure.

Because of these reasons, this workflow is irrelevant for 99% of forks.

## Solution
We now skip all jobs on the `Weekly beta compile test` workflow, if we
detect we're running this workflow on a fork.

## Testing
Testing? Who needs testing? (Seriously though, I made sure the syntax is
correct.)
2024-12-06 08:07:16 +00:00
MichiRecRoom
ec39f6b904
Do not attempt to send screenshots to Pixel Eagle without a token (#16655)
# Objective
Running Github Actions on forks helps users to reduce the amount of CI
errors they get before submitting a PR. However, due to how workflows
are set up on the Bevy repository, this can result in errors occurring
for jobs that may not be related to their PR - in this case, uploading
screenshots to Pixel Eagle.

## Solution
The Pixel Eagle workflow is skipped if we aren't running on the Bevy
repository.

If we are on the Bevy repository, or the user has set it to run
elsewhere, we check if the `PIXELEAGLE_TOKEN` secret is set. If it
isn't, we skip uploading screenshots to Pixel Eagle.

* Artifacts still continue to generate, in case the user needs them.
* In the event that the Pixel Eagle workflow runs, but the
`PIXELEAGLE_TOKEN` secret isn't set, we generate a step summary that
notifies the user of why it was skipped.
https://github.com/LikeLakers2/bevy/actions/runs/12173329006/attempts/1#summary-33953502068
for an example.

## Testing
Lots. And lots. Of trying to get Github Actions to work with me.
2024-12-05 21:00:01 +00:00
François Mockers
8e284984aa
remove check on windows screenshots (#16485)
# Objective

- Rendering on Windows in CI is unreliable
- Screenshots are compared but results are not usable
- Related to #15918 

## Solution

- Remove the check on windows screenshots
2024-11-23 18:38:47 +00:00
François Mockers
689c21d315
Add screenshot check on UI (#16486)
# Objective

- Progress towards #15918 
- Add test on UI

## Solution

- Get a single screenshot from the UI testbed example
- Remove older examples from runs in CI as they're covered by the
testbed to reduce CI duration
2024-11-23 18:38:24 +00:00
François Mockers
0249bb7686
don't check doc in beta ci as it requires nightly (#16356)
# Objective

- Fixes #16350 

## Solution

- Doc requires nightly, it can't run on beta
2024-11-11 23:23:30 +00:00
Benjamin Brienen
1d7f663475
Clean up some yaml mistakes (#16300)
# Objective

Our build pipeline should have no grammar or syntax mistakes.

## Solution

Remove a reference to a non-existent variable and clean up the taplo
`echo`s.
2024-11-11 18:47:51 +00:00
dependabot[bot]
c62c13dc2a
Bump crate-ci/typos from 1.27.0 to 1.27.3 (#16343)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.27.0 to
1.27.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.27.3</h2>
<h2>[1.27.3] - 2024-11-08</h2>
<h3>Fixes</h3>
<ul>
<li>Don't correct <code>alloced</code></li>
<li>Don't correct <code>registor</code>, a more domain specific variant
of <code>register</code></li>
</ul>
<h2>v1.27.2</h2>
<h2>[1.27.2] - 2024-11-06</h2>
<h3>Fixes</h3>
<ul>
<li>Correct <code>fand</code></li>
</ul>
<h2>v1.27.1</h2>
<h2>[1.27.1] - 2024-11-06</h2>
<h3>Fixes</h3>
<ul>
<li>Correct <code>alingment</code> as <code>alignment</code>, rather
than <code>alinement</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.27.3] - 2024-11-08</h2>
<h3>Fixes</h3>
<ul>
<li>Don't correct <code>alloced</code></li>
<li>Don't correct <code>requestor</code>, a more domain specific variant
of <code>requester</code></li>
</ul>
<h2>[1.27.2] - 2024-11-06</h2>
<h3>Fixes</h3>
<ul>
<li>Correct <code>fand</code></li>
</ul>
<h2>[1.27.1] - 2024-11-06</h2>
<h3>Fixes</h3>
<ul>
<li>Correct <code>alingment</code> as <code>alignment</code>, rather
than <code>alinement</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b74202f74b"><code>b74202f</code></a>
chore: Release</li>
<li><a
href="aa4a9bb183"><code>aa4a9bb</code></a>
docs: Update changelog</li>
<li><a
href="9dc3173b38"><code>9dc3173</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1151">#1151</a>
from epage/alloc</li>
<li><a
href="fae45ae57f"><code>fae45ae</code></a>
fix(dict): Recognize alloced and requestor</li>
<li><a
href="98325b2780"><code>98325b2</code></a>
chore: Release</li>
<li><a
href="ddde6db73a"><code>ddde6db</code></a>
docs: Update changelog</li>
<li><a
href="a0962bf415"><code>a0962bf</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1147">#1147</a>
from ianthetechie/add-fand</li>
<li><a
href="51e9d58a14"><code>51e9d58</code></a>
chore: Release</li>
<li><a
href="6966735fd7"><code>6966735</code></a>
docs: Update changelog</li>
<li><a
href="b0c364bcdf"><code>b0c364b</code></a>
Merge pull request <a
href="https://redirect.github.com/crate-ci/typos/issues/1146">#1146</a>
from epage/aline</li>
<li>Additional commits viewable in <a
href="https://github.com/crate-ci/typos/compare/v1.27.0...v1.27.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.27.0&new-version=1.27.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-11 07:04:10 +00:00
Rich Churcher
745e27ca22
Allow jobs to upgrade to macos-15 (using -latest) (#16321)
# Objective

With [macos-15 becoming the new `-latest`
soon](https://github.com/github/roadmap/issues/986), there's probably no
particular reason left to pin a runner version here. May as well take
the upgrade as it rolls out.

Note that these are still m1-based, you'd have to request a larger
runner to get m2.
2024-11-10 06:34:34 +00:00
Rich Churcher
cdc18ee886
Move UI example to testbed (#16241)
# Objective

UI example is quite extensive, probably not the best teaching example
anymore.

Closes #16230.
2024-11-07 20:57:45 +00:00
Benjamin Brienen
58a73924eb
Make doc CI use nightly (#16147)
# Objective

Fixes #15427
Follow-up to #15428

## Solution

Use nightly and add the environment variables as suggested here:
https://github.com/bevyengine/bevy/pull/15428#pullrequestreview-2331294421

## Testing

CI should run
2024-11-07 00:56:22 +00:00
Martín Maita
a44b668b90
Bump crate-ci/typos from 1.26.8 to 1.27.0 (#16236)
# Objective

- Closes #16224

## Solution

- Bumps `crate-ci/typos@v1.26.8` to `crate-ci/typos@v1.27.0`.

## Testing

- CI checks should pass.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-05 01:33:27 +00:00
dependabot[bot]
33c49455cd
Bump crate-ci/typos from 1.26.0 to 1.26.8 (#16128)
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.26.0 to
1.26.8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/releases">crate-ci/typos's
releases</a>.</em></p>
<blockquote>
<h2>v1.26.8</h2>
<h2>[1.26.8] - 2024-10-24</h2>
<h2>v1.26.3</h2>
<h2>[1.26.3] - 2024-10-24</h2>
<h3>Fixes</h3>
<ul>
<li>Accept <code>additionals</code></li>
</ul>
<h2>v1.26.2</h2>
<h2>[1.26.2] - 2024-10-24</h2>
<h3>Fixes</h3>
<ul>
<li>Accept <code>tesselate</code> variants</li>
</ul>
<h2>v1.26.1</h2>
<h2>[1.26.1] - 2024-10-23</h2>
<h3>Fixes</h3>
<ul>
<li>Respect <code>--force-exclude</code> for binary files</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/crate-ci/typos/blob/master/CHANGELOG.md">crate-ci/typos's
changelog</a>.</em></p>
<blockquote>
<h2>[1.26.8] - 2024-10-24</h2>
<h2>[1.26.7] - 2024-10-24</h2>
<h2>[1.26.6] - 2024-10-24</h2>
<h2>[1.26.5] - 2024-10-24</h2>
<h2>[1.26.4] - 2024-10-24</h2>
<h2>[1.26.3] - 2024-10-24</h2>
<h3>Fixes</h3>
<ul>
<li>Accept <code>additionals</code></li>
</ul>
<h2>[1.26.2] - 2024-10-24</h2>
<h3>Fixes</h3>
<ul>
<li>Accept <code>tesselate</code> variants</li>
</ul>
<h2>[1.26.1] - 2024-10-23</h2>
<h3>Fixes</h3>
<ul>
<li>Respect <code>--force-exclude</code> for binary files</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0d9e0c2c1b"><code>0d9e0c2</code></a>
chore: Release</li>
<li><a
href="e5385b07a0"><code>e5385b0</code></a>
chore(ci): Fix new release process</li>
<li><a
href="f08d1171e2"><code>f08d117</code></a>
chore: Release</li>
<li><a
href="e6e172498c"><code>e6e1724</code></a>
chore(ci): Fix new release process</li>
<li><a
href="02afc59fd4"><code>02afc59</code></a>
chore: Release</li>
<li><a
href="f981a1cd20"><code>f981a1c</code></a>
chore(ci): Fix new release process</li>
<li><a
href="afbc96c5d3"><code>afbc96c</code></a>
chore: Release</li>
<li><a
href="d3dcaaeb2d"><code>d3dcaae</code></a>
chore(ci): Fix new release process</li>
<li><a
href="fb8217bd5e"><code>fb8217b</code></a>
chore: Release</li>
<li><a
href="88ea8ea67d"><code>88ea8ea</code></a>
chore(ci): Stage releases until done</li>
<li>Additional commits viewable in <a
href="https://github.com/crate-ci/typos/compare/v1.26.0...v1.26.8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=crate-ci/typos&package-manager=github_actions&previous-version=1.26.0&new-version=1.26.8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-28 12:01:25 +00:00
Ben Frankel
b0fd3d524f
Typo-check .hidden files (#16035)
# Objective

Typo-check .hidden files like `.cargo/config_fast_builds.toml` and
`.github/*`. Context: https://github.com/bevyengine/bevy/pull/16025.

## Solution

- Add `ignore-hidden = false` to `typos.toml` to override the default
value of `true`.
- Add an exception to keep `.git/` ignored in `typos.toml`.
- Fix newly-found typos so CI passes.

## Testing

Running `typos` locally finds no further typos.
2024-10-20 17:13:14 +00:00
François Mockers
ec268420f7
Check examples screenshots on windows (#16010)
# Objective

- Checks screenshots on Windows
- Progress towards #15918 

## Solution

- Checks screenshots on Windows
- Also disable the helmet gltf scene in windows ci as it doesn't work
2024-10-20 14:58:35 +00:00
Alice Cecile
ad9f197150
Update label used for breaking changes (#15958)
# Objective

This label was out-of-date, causing our nag-bot to fail to run.

## Solution

Update the workflow with the newly renamed label.

Companion to https://github.com/bevyengine/bevy-website/pull/1646.
2024-10-16 17:50:39 +00:00