Skip to content

Commit 81d34b7

Browse files
committed
Version and lint
1 parent f5bc6d6 commit 81d34b7

File tree

85 files changed

+616
-647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+616
-647
lines changed

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,18 @@ profile_with_tracy = ["bevy/trace_tracy"]
7676
[dependencies]
7777
bevy = { workspace = true }
7878
bevy_mod_scripting_core = { workspace = true }
79-
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.12.0", optional = true }
80-
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.12.0", optional = true }
79+
bevy_mod_scripting_lua = { path = "crates/languages/bevy_mod_scripting_lua", version = "0.13.0", optional = true }
80+
bevy_mod_scripting_rhai = { path = "crates/languages/bevy_mod_scripting_rhai", version = "0.13.0", optional = true }
8181
# bevy_mod_scripting_rune = { path = "crates/languages/bevy_mod_scripting_rune", version = "0.9.0-alpha.2", optional = true }
8282
bevy_mod_scripting_functions = { workspace = true }
8383
bevy_mod_scripting_derive = { workspace = true }
8484

8585
[workspace.dependencies]
8686
profiling = { version = "1.0" }
8787
bevy = { version = "0.16.0", default-features = false }
88-
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.12.0" }
89-
bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.12.0", default-features = false }
90-
bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.12.0" }
88+
bevy_mod_scripting_core = { path = "crates/bevy_mod_scripting_core", version = "0.13.0" }
89+
bevy_mod_scripting_functions = { path = "crates/bevy_mod_scripting_functions", version = "0.13.0", default-features = false }
90+
bevy_mod_scripting_derive = { path = "crates/bevy_mod_scripting_derive", version = "0.13.0" }
9191

9292
# test utilities
9393
script_integration_test_harness = { path = "crates/testing_crates/script_integration_test_harness" }

benches/benchmarks.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
use bevy::log::tracing_subscriber::layer::SubscriberExt;
2-
use bevy::log::{tracing, tracing_subscriber, Level};
3-
use bevy::reflect::Reflect;
1+
use std::{collections::HashMap, path::PathBuf, sync::LazyLock, time::Duration};
2+
3+
use bevy::{
4+
log::{
5+
tracing, tracing::span, tracing_subscriber, tracing_subscriber::layer::SubscriberExt, Level,
6+
},
7+
reflect::Reflect,
8+
};
49
use bevy_mod_scripting_core::bindings::{
510
FromScript, IntoScript, Mut, Ref, ReflectReference, ScriptValue, Val,
611
};
7-
use criterion::{criterion_main, measurement::Measurement, BenchmarkGroup, Criterion};
8-
use criterion::{BatchSize, BenchmarkFilter};
12+
use criterion::{
13+
criterion_main, measurement::Measurement, BatchSize, BenchmarkFilter, BenchmarkGroup, Criterion,
14+
};
915
use regex::Regex;
10-
use script_integration_test_harness::test_functions::rand::Rng;
1116
use script_integration_test_harness::{
1217
make_test_lua_plugin, make_test_rhai_plugin, perform_benchmark_with_generator,
1318
run_lua_benchmark, run_plugin_script_load_benchmark, run_rhai_benchmark,
19+
test_functions::rand::Rng,
1420
};
15-
use std::collections::HashMap;
16-
use std::{path::PathBuf, sync::LazyLock, time::Duration};
17-
use bevy::log::tracing::span;
1821
use test_utils::{discover_all_tests, Test};
1922

2023
extern crate bevy_mod_scripting;

crates/bevy_api_gen/src/bin/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#![feature(rustc_private)]
22
use std::{
3-
collections::HashMap,
4-
env,
5-
fs::{create_dir_all, File},
6-
io::{BufRead, Write},
7-
path::{Path, PathBuf},
8-
process::{Command, Stdio},
3+
collections::HashMap,
4+
env,
5+
fs::{create_dir_all, File},
6+
io::{BufRead, Write},
7+
path::{Path, PathBuf},
8+
process::{Command, Stdio},
99
};
1010

1111
use bevy_api_gen::*;

crates/bevy_api_gen/src/import_path.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use indexmap::IndexMap;
22
use log::trace;
33
use rustc_hir::{
4-
def::DefKind,
5-
def_id::{CrateNum, DefId},
4+
def::DefKind,
5+
def_id::{CrateNum, DefId},
66
};
77
use rustc_middle::ty::TyCtxt;
88

crates/bevy_api_gen/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ pub use feature_graph::*;
3636
pub use meta::MetaLoader;
3737
pub use plugin::BevyAnalyzer;
3838
pub use template::{
39-
configure_tera, extend_context_with_args, Collect, Crate, TemplateKind, TEMPLATE_DIR,
39+
configure_tera, extend_context_with_args, Collect, Crate, TemplateKind, TEMPLATE_DIR,
4040
};

crates/bevy_api_gen/src/meta.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::{
2-
cell::RefCell,
3-
collections::HashMap,
4-
fs::File,
5-
io::{BufReader, BufWriter, Write},
2+
cell::RefCell,
3+
collections::HashMap,
4+
fs::File,
5+
io::{BufReader, BufWriter, Write},
66
};
77

88
use cargo_metadata::camino::Utf8PathBuf;

crates/bevy_api_gen/src/modifying_file_loader.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use std::{
2-
io,
3-
sync::{
4-
atomic::{AtomicBool, Ordering},
5-
Arc,
6-
},
2+
io,
3+
sync::{
4+
atomic::{AtomicBool, Ordering},
5+
Arc,
6+
},
77
};
88

99
use log::trace;

crates/bevy_api_gen/src/passes/cache_traits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use rustc_middle::ty::TyCtxt;
44
use rustc_span::Symbol;
55

66
use crate::{
7-
Args, BevyCtxt, DEF_PATHS_BMS_FROM_SCRIPT, DEF_PATHS_BMS_INTO_SCRIPT,
8-
DEF_PATHS_GET_TYPE_REGISTRATION, DEF_PATHS_REFLECT, STD_SOURCE_TRAITS,
7+
Args, BevyCtxt, DEF_PATHS_BMS_FROM_SCRIPT, DEF_PATHS_BMS_INTO_SCRIPT,
8+
DEF_PATHS_GET_TYPE_REGISTRATION, DEF_PATHS_REFLECT, STD_SOURCE_TRAITS,
99
};
1010

1111
fn dump_traits(tcx: &TyCtxt) -> String{

crates/bevy_api_gen/src/passes/codegen.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use crate::{configure_tera, Args, BevyCtxt, TemplateKind};
33
use log::info;
44
use rustc_hir::def_id::LOCAL_CRATE;
55
use std::{
6-
fs::{self, File},
7-
io::Write,
6+
fs::{self, File},
7+
io::Write,
88
};
99
use tera::Context;
1010

@@ -44,15 +44,15 @@ pub(crate) fn codegen(ctxt: &mut BevyCtxt<'_>, args: &Args) -> bool {
4444

4545
#[cfg(test)]
4646
mod tests {
47-
use std::collections::HashSet;
47+
use std::collections::HashSet;
4848

49-
use strum::VariantNames;
49+
use strum::VariantNames;
5050

51-
use crate::TEMPLATE_DIR;
51+
use crate::TEMPLATE_DIR;
5252

53-
use super::*;
53+
use super::*;
5454

55-
#[test]
55+
#[test]
5656
fn test_templates_exist() {
5757
let template_files: HashSet<&str> = TEMPLATE_DIR
5858
.files()

crates/bevy_api_gen/src/passes/find_methods_and_fields.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
use indexmap::IndexMap;
22
use log::{info, trace};
3+
use syn::Attribute;
34
use rustc_ast::Attribute;
45
use rustc_hir::{
5-
def_id::{DefId, LOCAL_CRATE},
6-
Safety,
6+
def_id::{DefId, LOCAL_CRATE},
7+
Safety,
78
};
89
use rustc_infer::infer::TyCtxtInferExt;
910
use rustc_middle::ty::{AdtKind, AssocKind, FieldDef, FnSig, Ty, TyCtxt, TyKind, TypingEnv};
1011
use rustc_span::Symbol;
1112
use rustc_trait_selection::infer::InferCtxtExt;
1213

1314
use crate::{
14-
Args, BevyCtxt, CachedTraits, FunctionContext, MetaLoader, ReflectType, ReflectionStrategy,
15+
Args, BevyCtxt, CachedTraits, FunctionContext, MetaLoader, ReflectType, ReflectionStrategy,
1516
};
1617

1718
/// Finds all methods and fields which can be wrapped on a proxy, stores them in sorted order.

0 commit comments

Comments
 (0)