Skip to content

chore: fix new clippy warnings causing build errors #428

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

Merged
merged 5 commits into from
Jun 29, 2025

Conversation

makspll
Copy link
Owner

@makspll makspll commented Jun 29, 2025

Summary

Fixes new clippy errors accumulated from newer rustup versions.

Also finally pin the toolchain so this doesn't happen until explicitly updated

Copy link
Contributor

🐰 Bencher Report

Branchfix/new-clippy-warnings
Testbedlinux-gha

⚠️ WARNING: No Threshold found!

Without a Threshold, no Alerts will ever be generated.

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds flag.

Click to view all benchmark results
BenchmarkLatencynanoseconds (ns)
component/access Lua📈 view plot
⚠️ NO THRESHOLD
3,406.30 ns
component/access Rhai📈 view plot
⚠️ NO THRESHOLD
5,506.20 ns
component/get Lua📈 view plot
⚠️ NO THRESHOLD
2,017.40 ns
component/get Rhai📈 view plot
⚠️ NO THRESHOLD
4,296.50 ns
conversions/Mut::from📈 view plot
⚠️ NO THRESHOLD
81.08 ns
conversions/Ref::from📈 view plot
⚠️ NO THRESHOLD
77.88 ns
conversions/ScriptValue::List📈 view plot
⚠️ NO THRESHOLD
260.29 ns
conversions/ScriptValue::Map📈 view plot
⚠️ NO THRESHOLD
1,243.50 ns
conversions/ScriptValue::Reference::from_into📈 view plot
⚠️ NO THRESHOLD
25.56 ns
conversions/Val::from_into📈 view plot
⚠️ NO THRESHOLD
265.36 ns
function/call 4 args Lua📈 view plot
⚠️ NO THRESHOLD
1,666.70 ns
function/call 4 args Rhai📈 view plot
⚠️ NO THRESHOLD
1,326.00 ns
function/call Lua📈 view plot
⚠️ NO THRESHOLD
224.43 ns
function/call Rhai📈 view plot
⚠️ NO THRESHOLD
449.84 ns
loading/empty Lua📈 view plot
⚠️ NO THRESHOLD
92,922.00 ns
loading/empty Rhai📈 view plot
⚠️ NO THRESHOLD
1,075,300.00 ns
math/vec mat ops Lua📈 view plot
⚠️ NO THRESHOLD
6,693.10 ns
math/vec mat ops Rhai📈 view plot
⚠️ NO THRESHOLD
6,046.90 ns
query/10 entities Lua📈 view plot
⚠️ NO THRESHOLD
18,778.00 ns
query/10 entities Rhai📈 view plot
⚠️ NO THRESHOLD
19,481.00 ns
query/100 entities Lua📈 view plot
⚠️ NO THRESHOLD
38,064.00 ns
query/100 entities Rhai📈 view plot
⚠️ NO THRESHOLD
31,575.00 ns
query/1000 entities Lua📈 view plot
⚠️ NO THRESHOLD
241,620.00 ns
query/1000 entities Rhai📈 view plot
⚠️ NO THRESHOLD
152,000.00 ns
reflection/10 Lua📈 view plot
⚠️ NO THRESHOLD
5,530.20 ns
reflection/10 Rhai📈 view plot
⚠️ NO THRESHOLD
15,145.00 ns
reflection/100 Lua📈 view plot
⚠️ NO THRESHOLD
45,937.00 ns
reflection/100 Rhai📈 view plot
⚠️ NO THRESHOLD
631,540.00 ns
resource/access Lua📈 view plot
⚠️ NO THRESHOLD
3,007.80 ns
resource/access Rhai📈 view plot
⚠️ NO THRESHOLD
4,880.50 ns
resource/get Lua📈 view plot
⚠️ NO THRESHOLD
1,666.00 ns
resource/get Rhai📈 view plot
⚠️ NO THRESHOLD
3,682.90 ns
🐰 View full continuous benchmarking report in Bencher

@makspll makspll enabled auto-merge (squash) June 29, 2025 18:32
@makspll makspll merged commit 9c5e216 into main Jun 29, 2025
20 checks passed
@makspll makspll deleted the fix/new-clippy-warnings branch June 29, 2025 18:37
shanecelis added a commit to shanecelis/bevy_mod_scripting that referenced this pull request Jul 14, 2025
This is a combination of 68 commits.

hack: It compiles.

hack: Compile with lua54 feature.

refactor: Accept Handle<ScriptAsset> in ScriptComponents.

feature: Handle static scripts.

bug: Fix rhea and static script unloading.

feature: Add ScriptSetttings to loader.

This introduces a serde dependency though. :(

test: Prep tests to run.

feature: Add DisplayProxy. Refactor continues.

refactor: Bring test harness in line.

test: Tests are running!

test: Make test runnable without rhai.

excise: Remove ScriptMetadata and ScriptEvent.

We don't need them since asset's know their language.

excise: Drop Script::asset field.

It's a duplicate with Script::id now.

chore: fix build problem in xtask

perf: Can create_or_update_script w/o clone.

feature: Try to use the entities.

hack: It compiles but idk why.

I fought with HandlerContext trying to add a Query to it for the longest
time.

hack: Compiles but doesn't run well.

Log is flooded with these two lines:
```log
2025-06-28T11:46:54.321715Z ERROR bevy_mod_scripting_core::handler: Rhai: Failed to query entities with scripts: Cannot claim access to base type: Global. The base is already claimed by something else in a way which prevents safe access. Location: "/Users/shane/Projects/bevy_mod_scripting/crates/bevy_mod_scripting_core/src/extractors.rs:337". Context: Could not claim exclusive world access
2025-06-28T11:46:54.322046Z ERROR bevy_mod_scripting_core::handler: Lua: Failed to query entities with scripts: Cannot claim access to base type: Global. The base is already claimed by something else in a way which prevents safe access. Location: "/Users/shane/Projects/bevy_mod_scripting/crates/bevy_mod_scripting_core/src/extractors.rs:337". Context: Could not claim exclusive world access
```

feature: Use SharedContext(P::C) for global context.

feature: GOL works with SharedContext.

feature: Works with ScriptContextProvider trait.

refactor: It's all coming together now.

bug: Make per-entity work with static scripts.

doc: Clarify EntityContext. Hide internal struct.

chore: fix new clippy warnings causing build errors (makspll#428)

partial: Add domain handling.

feature: Add ScriptContextProvider::hash member.

feature: Call labels on a per-context basis.

doc: Explain call per-context rationale.

feature: More ScriptComponentProvider<P> variants.

chore: Restore commented log plugin.

test: Remove script_id_generator parameter.

test: Remove metadata tests.

refactor: Prefer Option<Entity> vs Entity::from_raw(0).

bug: Scripts w/o AssetServer didn't work.

Now you can add scripts via `Assets<ScriptAsset>` or the `AssetServer`.

test: Fix tests.

perf: Avoid cloning script content when possible.

doc: Document script::Or.

refactor: Unscore unused parameters in context providers.

chore: Fix it, Clippy!

doc: Add note about ScriptContext::hash().

test: Fix/refactor tests.

feature: Remove todo! & impl supported extensions.

Implement the ConfigureScriptAssetSettings again.

chore: Make core tests compile.

test: It compiles! 8 test failures.

test: All tests passing except 3.

partial: Handle event rework.

feature: Add iter() to ScriptContextProvider<P>.

refactor: Rework event handling.

partial: Collecting contexts.

partial: More handler event mulling.

feature: New event handler.

Early exit. Fewer allocations. No querying unless necessary.

feature: Add remove() to ScriptContextProvider<P>.

feature: Make DeleteScript delete contexts too.

feature: Add EntityScriptIdContext and ContextKey.

feature: Rename iter() to values().

feature: Add iter() to ScriptContextProvider<P>.

feature: Handle Recipient::ScriptId fully.

Static scripts included. Fewer clones.

refactor: Move ContextKey to its own file.

feature: Made Domain(u64).

refactor: Weave ContextKey in.

It'd be nice if ContextKey had a Handle<ScriptAsset> just for logging purposes.

refactor: Use ContextKey. Tests pass!

refactor: Use ContextKey instead of ScriptId.

chore: Clean up warnings.

bug: Fix game of life.

feature: Add prelude.

I like explicit imports, but I'm trying to make the code in mdbook
runnable, just so it is easier to maintain, and it feels like it'd be a
mess without a prelude.

doc: Update book.

A few code refactors to make book writing easier.

feature: Add ConfigureScriptAssetSettings to prelude.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant