Skip to content

Commit ccf7ea2

Browse files
authored
fix: fix tracy compile errors and add tracy buid to CI (#277)
* chore: catch tracy errors in ci * fix tracy errors
1 parent 9246d67 commit ccf7ea2

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

crates/bevy_mod_scripting_core/src/bindings/function/script_function.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl DynamicScriptFunction {
9999
args: I,
100100
context: FunctionCallContext,
101101
) -> Result<ScriptValue, InteropError> {
102-
profiling::scope!("Dynamic Call ", self.name().clone());
102+
profiling::scope!("Dynamic Call ", self.name());
103103
let args = args.into_iter().collect::<VecDeque<_>>();
104104
// should we be inlining call errors into the return value?
105105
let return_val = (self.func)(context, args);
@@ -155,7 +155,7 @@ impl DynamicScriptFunctionMut {
155155
args: I,
156156
context: FunctionCallContext,
157157
) -> Result<ScriptValue, InteropError> {
158-
profiling::scope!("Dynamic Call Mut", self.name().clone());
158+
profiling::scope!("Dynamic Call Mut", self.name());
159159
let args = args.into_iter().collect::<VecDeque<_>>();
160160
// should we be inlining call errors into the return value?
161161
let mut write = self.func.write();

crates/xtask/src/main.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ enum Feature {
4949
Rhai,
5050
// Rune
5151
// Rune,
52+
53+
// Profiling
54+
#[strum(serialize = "profiling/profile-with-tracy")]
55+
Tracy,
5256
}
5357

5458
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, strum::EnumIter)]
@@ -97,7 +101,8 @@ impl IntoFeatureGroup for Feature {
97101
Feature::MluaAsync
98102
| Feature::MluaMacros
99103
| Feature::MluaSerialize
100-
| Feature::UnsafeLuaModules => FeatureGroup::ForExternalCrate,
104+
| Feature::UnsafeLuaModules
105+
| Feature::Tracy => FeatureGroup::ForExternalCrate,
101106
Feature::BevyBindings | Feature::CoreFunctions => FeatureGroup::BMSFeature,
102107
// don't use wildcard here, we want to be explicit
103108
}
@@ -109,11 +114,12 @@ struct Features(HashSet<Feature>);
109114

110115
impl Default for Features {
111116
fn default() -> Self {
112-
// should be kept up to date with the default feature + lua54
117+
// should be kept up to date with the default feature + lua54 on top of anything that is handy to run locally every time
113118
Features::new(vec![
114119
Feature::Lua54,
115120
Feature::CoreFunctions,
116121
Feature::BevyBindings,
122+
Feature::Tracy,
117123
])
118124
}
119125
}

0 commit comments

Comments
 (0)