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

Generate somewhat cleaner TypeLists #292

Closed
wants to merge 2 commits into from
Closed

Generate somewhat cleaner TypeLists #292

wants to merge 2 commits into from

Conversation

NyxCode
Copy link
Collaborator

@NyxCode NyxCode commented Apr 2, 2024

See #291, #289

Goal

Generate TypeLists containing less duplicates. This speeds up generation of imports, and avoids rustc recursion limits.

This does not aim to fix the "recursion limit" problem completely. Before, ~128 types caused the issue, while now, it'd only be caused by ~128 unique types.

Changes

  • Re-implement Dependencies to manually track "direct", "transitive" and "generics" dependencies, only generating rust code at the very end.

TODOs

  • Cleanup implementation
    • The current impl is kinda messy. I used Rcs to avoid excessive cloning, but a better data structure would probably help here
  • Explore if generating a "perfect" TypeList is a cleaner approach
    • I think this can be implemented on top of most of these changes though, only needing to alter the ToTokens impl

Checklist

  • I have followed the steps listed in the Contributing guide.
  • If necessary, I have added documentation related to the changes made.
  • I have added or updated the tests related to the changes made.

@NyxCode NyxCode changed the title add test Generate somewhat cleaner TypeLists Apr 2, 2024
@NyxCode
Copy link
Collaborator Author

NyxCode commented Apr 3, 2024

closing in favour of #293

@NyxCode NyxCode closed this Apr 3, 2024
@escritorio-gustavo escritorio-gustavo deleted the very-heavy-types branch April 3, 2024 14:07
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.

None yet

1 participant