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

Unable to import proto from another library #984

Open
FreePhoenix888 opened this issue Feb 17, 2024 · 1 comment
Open

Unable to import proto from another library #984

FreePhoenix888 opened this issue Feb 17, 2024 · 1 comment

Comments

@FreePhoenix888
Copy link

How to reproduce

git clone https://github.com/FreePhoenix888/prost-build-import-from-another-folder-error-example.git
cd prost-build-import-from-another-folder-error-example
cargo build

See build result:

PS C:\Users\FreePhoenix\Programming\prost-build-import-from-another-folder-error-example> cargo build
   Compiling egui_example v0.1.0 (C:\Users\FreePhoenix\Programming\prost-build-import-from-another-folder-error-example)
error[E0412]: cannot find type `StorageSettings` in module `super::storage_settings`                                                                                                                                               
 --> C:\Users\FreePhoenix\Programming\prost-build-import-from-another-folder-error-example\target\debug\build\egui_example-e3762171fe50578d\out/settings.rs:7:34
  |
7 |         super::storage_settings::StorageSettings,
  |                                  ^^^^^^^^^^^^^^^ not found in `super::storage_settings`
  |
help: consider importing this struct
 --> src\settings\mod.rs:8:5
  |
8 +     use crate::settings::storage_settings::storage_settings::StorageSettings;
  |
help: if you import `StorageSettings`, refer to it directly
  |
7 -         super::storage_settings::StorageSettings,
7 +         StorageSettings,
  |
...And other errors that are not related to this issue...

Additional Info

If we put another proto in the same folder the problem does not happen
Here is the branch reproducing it: https://github.com/FreePhoenix888/prost-build-import-from-another-folder-error-example/tree/the_same_folder_working_way
Use it the same way, just run cargo build in it

@FreePhoenix888
Copy link
Author

@LucioFranco , just pinging you to make sure you see this issue, I would be glad to get your help

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

1 participant