Skip to content

Commit

Permalink
fix: fix tracy compile errors and add tracy buid to CI (#277)
Browse files Browse the repository at this point in the history
* chore: catch tracy errors in ci

* fix tracy errors
  • Loading branch information
makspll authored Feb 12, 2025
1 parent 9246d67 commit ccf7ea2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl DynamicScriptFunction {
args: I,
context: FunctionCallContext,
) -> Result<ScriptValue, InteropError> {
profiling::scope!("Dynamic Call ", self.name().clone());
profiling::scope!("Dynamic Call ", self.name());
let args = args.into_iter().collect::<VecDeque<_>>();
// should we be inlining call errors into the return value?
let return_val = (self.func)(context, args);
Expand Down Expand Up @@ -155,7 +155,7 @@ impl DynamicScriptFunctionMut {
args: I,
context: FunctionCallContext,
) -> Result<ScriptValue, InteropError> {
profiling::scope!("Dynamic Call Mut", self.name().clone());
profiling::scope!("Dynamic Call Mut", self.name());
let args = args.into_iter().collect::<VecDeque<_>>();
// should we be inlining call errors into the return value?
let mut write = self.func.write();
Expand Down
10 changes: 8 additions & 2 deletions crates/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ enum Feature {
Rhai,
// Rune
// Rune,

// Profiling
#[strum(serialize = "profiling/profile-with-tracy")]
Tracy,
}

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

impl Default for Features {
fn default() -> Self {
// should be kept up to date with the default feature + lua54
// should be kept up to date with the default feature + lua54 on top of anything that is handy to run locally every time
Features::new(vec![
Feature::Lua54,
Feature::CoreFunctions,
Feature::BevyBindings,
Feature::Tracy,
])
}
}
Expand Down

0 comments on commit ccf7ea2

Please sign in to comment.