Skip to content

Support bevy lint web #523

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Support bevy lint web #523

wants to merge 3 commits into from

Conversation

DaAlbrecht
Copy link
Collaborator

@DaAlbrecht DaAlbrecht commented Jul 17, 2025

Objective

Support bevy lint and bevy lint web just like build and run.

Solution

I added the same configuration logic to the lint command that we use in the other commands.
Additionally, I removed the rustup feature flag from the entirebevy lint command. Instead, only the automatic installation is behind rustup

Testing

This can be tested with: TimJentzsch/bevy_complex_repo#7

image

bevy_lint native directly

image

bevy_lint --target wasm32-unknown-unknown

❯ bevy_lint --target wasm32-unknown-unknown

error: The wasm32-unknown-unknown targets are not supported by default; you may need to enable the "wasm_js" configuration flag. Note that enabling the `wasm_js` feature flag alone is insufficient. For more information see: https://docs.rs/getrandom/0.3.3/#webassembly-support
   --> /.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.3/src/backends.rs:168:9
    |
168 | /         compile_error!(concat!(
169 | |             "The wasm32-unknown-unknown targets are not supported by default; \
170 | |             you may need to enable the \"wasm_js\" configuration flag. Note \
171 | |             that enabling the `wasm_js` feature flag alone is insufficient. \
172 | |             For more information see: \
173 | |             https://docs.rs/getrandom/", env!("CARGO_PKG_VERSION"), "/#webassembly-support"
174 | |         ));
    | |__________^

    Checking naga v24.0.0
error[E0425]: cannot find function `fill_inner` in module `backends`
  --> /.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/getrandom-0.3.3/src/lib.rs:99:19

bevy lint

image

bevy lint web

image

Closes #433

@DaAlbrecht DaAlbrecht changed the title Support bevt lint web Support bevy lint web Jul 17, 2025
use crate::external_cli::arg_builder::ArgBuilder;

#[derive(Debug, Args)]
pub struct CargoCheckArgs {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit sad that we always have to duplicate this code just to change one word for claps help message. But I think even if we took cargo's approach and built them using functions, we would not end up with less code. But it would be worth a try.

@DaAlbrecht DaAlbrecht added A-CLI Related to the main CLI and not a more specific subcommand C-Feature Make something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review The PR needs to be reviewed before it can be merged labels Jul 17, 2025
@DaAlbrecht DaAlbrecht marked this pull request as ready for review July 17, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-CLI Related to the main CLI and not a more specific subcommand C-Feature Make something new possible D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review The PR needs to be reviewed before it can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow using bevy lint web
1 participant