Skip to content

Commit bc83c5a

Browse files
authored
fix: remove test time dependencies from functions (#204)
fix: functions referencing test time dependencies
1 parent c109fb6 commit bc83c5a

File tree

7 files changed

+6
-20
lines changed

7 files changed

+6
-20
lines changed

crates/bevy_mod_scripting_functions/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ readme = "readme.md"
1414
[features]
1515
core_functions = []
1616
bevy_bindings = []
17-
test_functions = ["test_utils", "regex"]
1817

1918

2019
[dependencies]
@@ -34,5 +33,3 @@ bevy = { workspace = true, features = [
3433
uuid = "1.11"
3534
smol_str = "0.2.2"
3635
bevy_mod_scripting_core = { workspace = true }
37-
test_utils = { workspace = true, optional = true }
38-
regex = { version = "1.11", optional = true }

crates/bevy_mod_scripting_functions/src/lib.rs

-6
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ use ::bevy::prelude::*;
22
#[cfg(feature = "bevy_bindings")]
33
pub mod bevy_bindings;
44
pub mod core;
5-
6-
#[cfg(feature = "test_functions")]
7-
pub mod test_functions;
8-
95
pub use core::*;
106

117
pub struct ScriptFunctionsPlugin;
@@ -14,8 +10,6 @@ impl Plugin for ScriptFunctionsPlugin {
1410
fn build(&self, app: &mut App) {
1511
register_bevy_bindings(app);
1612
register_core_functions(app);
17-
#[cfg(feature = "test_functions")]
18-
test_functions::register_test_functions(app);
1913

2014
// TODO: if bevy ever does this itself we should remove this
2115
app.world_mut().register_component::<Parent>();

crates/languages/bevy_mod_scripting_lua/Cargo.toml

-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ smallvec = "1.13"
4848

4949
[dev-dependencies]
5050
script_integration_test_harness = { workspace = true }
51-
bevy_mod_scripting_functions = { workspace = true, features = [
52-
"core_functions",
53-
"bevy_bindings",
54-
"test_functions",
55-
] }
5651
libtest-mimic = "0.8"
5752
regex = "1.11"
5853

crates/languages/bevy_mod_scripting_rhai/Cargo.toml

-5
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ bevy_mod_scripting_functions = { workspace = true, features = [
2424

2525
[dev-dependencies]
2626
script_integration_test_harness = { workspace = true }
27-
bevy_mod_scripting_functions = { workspace = true, features = [
28-
"core_functions",
29-
"bevy_bindings",
30-
"test_functions",
31-
] }
3227
libtest-mimic = "0.8"
3328
regex = "1.11"
3429

crates/script_integration_test_harness/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ bevy_mod_scripting_core = { workspace = true }
1111
bevy_mod_scripting_functions = { workspace = true, features = [
1212
"bevy_bindings",
1313
"core_functions",
14-
"test_functions",
1514
] }
15+
regex = { version = "1.11" }

crates/script_integration_test_harness/src/lib.rs

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
pub mod test_functions;
2+
13
use bevy::{
24
app::App,
35
prelude::{Entity, World},
@@ -14,6 +16,7 @@ use bevy_mod_scripting_core::{
1416
IntoScriptPluginParams,
1517
};
1618
use bevy_mod_scripting_functions::ScriptFunctionsPlugin;
19+
use test_functions::register_test_functions;
1720
use test_utils::test_data::setup_integration_test;
1821

1922
pub fn execute_integration_test<
@@ -29,6 +32,8 @@ pub fn execute_integration_test<
2932
let mut app = setup_integration_test(init);
3033

3134
app.add_plugins(ScriptFunctionsPlugin);
35+
register_test_functions(&mut app);
36+
3237
init_app(&mut app);
3338

3439
app.cleanup();

0 commit comments

Comments
 (0)