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

Fix topological sort of types #44

Merged
merged 1 commit into from
Aug 30, 2024
Merged

Conversation

stefunctional
Copy link
Contributor

Structurally recursive types were not considered. For example, if enum Foo had a variant with a field of type Vec<Bar>, Foo was not considered to depend on Bar even though it needs to so that definitions are in the right order in the generated C++ header.

Resolves #43

Structurally recursive types were not considered. For example, if `enum
Foo` had a variant with a field of type `Vec<Bar>`, `Foo` was not
considered to depend on `Bar` even though it needs to so that
definitions are in the right order in the generated C++ header.

Resolves NordSecurity#43

Signed-off-by: Stephane Raux <[email protected]>
@Lipt0nas
Copy link
Member

That's a good catch, cleaned up the ugly sorting code nicely as well, thank you for the contribution!

@Lipt0nas Lipt0nas merged commit b1ee0e0 into NordSecurity:main Aug 30, 2024
9 checks passed
@stefunctional
Copy link
Contributor Author

Thank you for the review!

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

Successfully merging this pull request may close these issues.

Definitions in the generated C++ header can be out or order
2 participants