Skip to content
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

Errors in epaint update 0.30.0 related to profiling #5491

Closed
frankvgompel opened this issue Dec 16, 2024 · 4 comments · Fixed by #5494
Closed

Errors in epaint update 0.30.0 related to profiling #5491

frankvgompel opened this issue Dec 16, 2024 · 4 comments · Fixed by #5494
Assignees
Labels
bug Something is broken

Comments

@frankvgompel
Copy link

   Compiling epaint v0.30.0
error[E0433]: failed to resolve: could not find `function_scope` in `profiling`
  --> /Users/frankvangompel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.30.0/src/mesh.rs:88:20
   |
88 |         profiling::function_scope!();
   |                    ^^^^^^^^^^^^^^ could not find `function_scope` in `profiling`

error[E0433]: failed to resolve: could not find `function_scope` in `profiling`
   --> /Users/frankvangompel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.30.0/src/mesh.rs:114:20
    |
114 |         profiling::function_scope!();
    |                    ^^^^^^^^^^^^^^ could not find `function_scope` in `profiling`

error[E0433]: failed to resolve: could not find `function_scope` in `profiling`
    --> /Users/frankvangompel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.30.0/src/tessellator.rs:1606:20
     |
1606 |         profiling::function_scope!();
     |                    ^^^^^^^^^^^^^^ could not find `function_scope` in `profiling`

error[E0433]: failed to resolve: could not find `function_scope` in `profiling`
    --> /Users/frankvangompel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/epaint-0.30.0/src/tessellator.rs:2001:20
     |
2001 |         profiling::function_scope!();
     |                    ^^^^^^^^^^^^^^ could not find `function_scope` in `profiling`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `epaint` (lib) due to 4 previous errors
@frankvgompel frankvgompel added the bug Something is broken label Dec 16, 2024
@apessino
Copy link

Confirmed - I just tried updating and I am getting the same errors. I also tried cloning the repo instead of using the cargo.io release and the problem is still there.

A bad merge, perhaps?

@lucasmerlin
Copy link
Collaborator

I can reproduce this, but I'm not really sure why it would happen, it looks like it should be working 🤔
As a workaround, you can add the following to your cargo.toml:

profiling = { version = "1", features = ["type-check"], default-features = false }

@teddemunnik can you have a look at this?

To reproduce this, the following cargo.toml has this problem for me:

[package]
name = "egui_playground"
version = "0.1.0"
edition = "2021"

[dependencies]
eframe = "0.30.0"
egui = "0.30.0"

@lucasmerlin
Copy link
Collaborator

lucasmerlin commented Dec 16, 2024

Ah, it's because profiling::function_scope was added in profiling 1.0.16 and egui only has a dependency on 1.0, so we should update the profiling dependency to be >=1.0.16

So the proper way to fix this in your project is to run cargo update profiling

@teddemunnik
Copy link
Contributor

Ah my bad, sorry about that! Thank you for the quick fix @lucasmerlin

emilk pushed a commit that referenced this issue Dec 17, 2024
We need profiling::function_scope which was introduced in 1.0.16, so
this is the minimum required version
* Closes <#5491>
* [x] I have followed the instructions in the PR template
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants