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

Refactor II: split code generators into specialized modules #574

Merged
merged 3 commits into from
Jan 21, 2024

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Jan 21, 2024

Following #573, this reorganizes the entire file structure of the godot-codegen crate.

Instead of two monolithic files class_generator.rs and central_generator.rs which have grown to a total of 3000 LoC, we have now 16 generator files, each specialized on a certain area of responsibility. This improves code organization, searchability and encapsulation.

I also have to shill RustRover's Refactor > Move functionality at this point. It has worked near-perfectly and carried 95% of the changes here. The only things I needed to adjust manually were visibility modifiers in some places (and RR warned me about them). Import statements were nicely rewritten 🚀

…ator files

Breaks up the multi-kLoC files and separates them by topic. Improves searchability, encapsulation and overall code organization.
Several symbols have also been moved where they fit better (e.g. domain models).
Also modifies an invocation to use is_class_deleted() instead of is_class_excluded() -- changes semantics.
@Bromeon Bromeon added the quality-of-life No new functionality, but improves ergonomics/internals label Jan 21, 2024
@Bromeon Bromeon enabled auto-merge January 21, 2024 19:20
@GodotRust
Copy link

API docs are being generated and will be shortly available at: https://godot-rust.github.io/docs/gdext/pr-574

@Bromeon Bromeon added this pull request to the merge queue Jan 21, 2024
Merged via the queue into master with commit 7fd1be9 Jan 21, 2024
16 checks passed
@Bromeon Bromeon deleted the qol/codegen-file-split branch January 21, 2024 19:31
@Bromeon Bromeon mentioned this pull request Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants