profiling icon indicating copy to clipboard operation
profiling copied to clipboard

Using from a library: could not find `puffin` in `profiling`

Open Firestar99 opened this issue 7 months ago • 1 comments

When using profiling from multiple libraries and 2 binaries, all within the same workspace, I'm getting the following error in the libraries:

error[E0433]: failed to resolve: could not find `puffin` in `profiling`
  --> space-asset/src/meshlet/scene.rs:14:3
   |
14 |         #[profiling::function]
   |         ^^^^^^^^^^^^^^^^^^^^^^ could not find `puffin` in `profiling`
   |

That is if I follow your "Using from a Binary / Library" exactly. I can work around this issue by propagating the feature manually from one crate to the next, but this gets ugly fast and let's just hope I didn't forget any library:

[features]
profile-with-puffin = ["profiling/profile-with-puffin", "vulkano-bindless/profile-with-puffin", "vulkano/profile-with-puffin", "space-engine/profile-with-puffin", "space-asset/profile-with-puffin"]
profile-with-optick = ["profiling/profile-with-optick", "vulkano-bindless/profile-with-optick", "vulkano/profile-with-optick", "space-engine/profile-with-optick", "space-asset/profile-with-optick"]
profile-with-superluminal = ["profiling/profile-with-superluminal", "vulkano-bindless/profile-with-superluminal", "vulkano/profile-with-superluminal", "space-engine/profile-with-superluminal", "space-asset/profile-with-superluminal"]
profile-with-tracing = ["profiling/profile-with-tracing", "vulkano-bindless/profile-with-tracing", "vulkano/profile-with-tracing", "space-engine/profile-with-tracing", "space-asset/profile-with-tracing"]
profile-with-tracy = ["profiling/profile-with-tracy", "vulkano-bindless/profile-with-tracy", "vulkano/profile-with-tracy", "space-engine/profile-with-tracy", "space-asset/profile-with-tracy"]

Unfortunately, I have not been able to create a minimal reproducible sample. I'm hoping you could maybe have some ideas on why it does not compile the way it should? https://gitlab.com/spacegamedev/space-rust/-/tree/performance branch performance

  • rustc: nightly-2023-09-30 (fixed due to rust-gpu)
  • workspace.resolver = 2

Firestar99 avatar Jun 28 '24 12:06 Firestar99