Open gshep opened 1 week ago
We can't skip generating types as IDL is used for generating clients not just for Rust, but for other languages as well where external Rust crates are unavailable
reopened since we discussed it in dm
A possible solution would be recursively marking a type as external provided it is referenced from another type marked as external.
It would be also nice to prefix such external types with pub
Problem
Not sufficient however would be nice to fix it. Generated Rust code contains redundant entities however they are inner types of ignored external ones.
Steps
Inner
struct. The file excerpt is attached.Possible Solution
The basic idea is to make two passes. During the first pass populate inner
external_types
map. On the second pass the current logic is kept.Notes
No response
Relevant Log Output
Click to expand/collapse
```rust #[derive(PartialEq, Debug, Encode, Decode, TypeInfo)] #[codec(crate = sails_rs::scale_codec)] #[scale_info(crate = sails_rs::scale_info)] pub struct Message(pub Data); #[derive(PartialEq, Debug, Encode, Decode, TypeInfo)] #[codec(crate = sails_rs::scale_codec)] #[scale_info(crate = sails_rs::scale_info)] pub struct Inner(pub u32); pub mod traits { ```