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

E0583: file not found for module #45

Open
coolreader18 opened this issue Jul 8, 2019 · 6 comments
Open

E0583: file not found for module #45

coolreader18 opened this issue Jul 8, 2019 · 6 comments

Comments

@coolreader18
Copy link

When I put a #![flame] attribute inside of a module, it gives me an error "file not found for module module_name". It gives me the same error randomly when I apply it to the mod item in its parent module.

@coolreader18
Copy link
Author

coolreader18 commented Jul 8, 2019

Somewhat related to this, what would you recommend to be the easiest way to mark every/many functions in a crate/mod as #[flame]? I saw apply_attr mentioned, but that no longer seems to work, and I'm having problems like this one with marking modules as #[flame].

@llogiq
Copy link
Owner

llogiq commented Jul 9, 2019

I thought I had a test for this. Is the mod in the same file as the annotation (not that it should matter, but I'd like to reproduce it correctly)?

@coolreader18
Copy link
Author

Yes, it is. I had to specify the full path when doing it from the outside to get it to work:

#[flame]
#[path = "/home/coolreader18/.../src/module_name.rs"]
mod module_name;

@llogiq
Copy link
Owner

llogiq commented Jul 11, 2019

That path appears to not be relative to the project. Why?

  • If you leave out the #[flame] annotation, does that work?
  • If you leave out the #[path ..] annotation, instead moving the module into src/module_name.rs in your project (assuming it isn't already there), does that work?

@coolreader18
Copy link
Author

The thing is, it is already in the expected position. It does work without the #[flame] annotation, but once I put it there, it says it can't find the module and nothing works except a fully qualified #[path = "/..."].

@llogiq
Copy link
Owner

llogiq commented Jul 11, 2019

Strange. Flamer does nothing out of the ordinary while handling mods. I don't have time right now to look into this. Can you come up with a minimal example to reproduce the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants