-
Notifications
You must be signed in to change notification settings - Fork 969
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
wgpu-core compile failure with profile-with-tracing profiling feature #1477
Comments
As an aside, the Logging section of the crates.io page for wgpu notes that |
I think this should be posted to |
That's reasonable - I considered it before posting here, but figured it would be better to see if there was any insight to be gained from the downstream crate first. Their docs seem pretty cut and dry about library use-cases behaving transparently, so I'll write up an issue over there in a bit. |
profiling 1.0.2 should fix this |
That's great to hear, thank you! |
* Make default a switch case Previously the default case of a switch statement was encoded as a block in the statement but the wgsl spec defines it in such a way that the default case ordering matters. * [spv-out] Support for the new switch IR * [dot-out] Use different labels for default cases
Description
wgpu-core fails to compile if a downstream crate includes a
profiling
dependency with theprofile-with-tracing
feature enabled.This issue doesn't occur when using the the
profile-with-puffin
,profile-with-optick
,profile-with-superluminal
orprofile-with-tracy
feature flags.Repro steps
wgpu-core = "0.8.1"
dependencyprofiling = { version = "1.0.1", features = ["profile-with-tracing"] }
dependencycargo build
Adding a
tracing = "0.1.26"
dependency causes the same outcome, as does usingversion = "1"
forprofiling
to match its entry in thewgpu-core
Cargo.toml
.Expected vs observed behavior
Expected:
wgpu-core
compiles successfully, and theprofiling
macros therein emittracing
spans that can be captured by the calling program.In this case, my intent is to capture wgpu-core spans as part of the instrumentation data for an async program.
The functions calling wgpu will be instrumented using
tracing
wrappers, with a view to displaying wgpu-core spans (andwgpu
log
messages converted intotracing
events) as their children inside a debug / profiling UI.Observed:
Various
wgpu-core
invocations ofprofiling
macros throwuse of undeclared crate or module 'tracing'
errors, followed by a further set ofexpected type parameter 'B', found struct 'profiling::tracing::level_filters::LevelFilter'
errors.Platform
Windows 10 64-bit
stable-x86_64-pc-windows-msvc
rustc 1.52.1
wgpu-core 0.8.1
profiling 1.0.1
The text was updated successfully, but these errors were encountered: