-
Notifications
You must be signed in to change notification settings - Fork 5
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
Inner types of ignored external types are generated anyway #557
Comments
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 |
See #556 (comment) In some cases it may be necessary to use external container types for the generated types, like My point of view is that the developer should explicitly specify which types to use instead of the generated ones. |
@gshep what do you think if we close this issue due to the generics. We can't seem to write a generic algoritm for marking inner types as external ones - IDL doesn't communicate any info about generics. |
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
The text was updated successfully, but these errors were encountered: