Skip to content

fix: tracy compile errors and add tracy buid to CI #277

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 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading