prost icon indicating copy to clipboard operation
prost copied to clipboard

Unable to import proto from another library

Open FreePhoenix888 opened this issue 1 year ago • 1 comments

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 avatar Feb 17 '24 18:02 FreePhoenix888

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

FreePhoenix888 avatar Feb 17 '24 19:02 FreePhoenix888

I don't understand what the problem is. Can you try to explain it differently?

caspermeijn avatar May 24 '24 12:05 caspermeijn