Skip to content

Move #[godot_dyn] code generation to its own function #1235

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

Closed
wants to merge 3 commits into from

Conversation

ValorZard
Copy link

lets start with something small for now

@ValorZard ValorZard marked this pull request as ready for review July 13, 2025 23:01
@ValorZard
Copy link
Author

Forgot to mention that this is Part 1 of #1231

@Bromeon Bromeon added quality-of-life No new functionality, but improves ergonomics/internals c: register Register classes, functions and other symbols to GDScript labels Jul 14, 2025
@ValorZard
Copy link
Author

(how do i switch this back to WIP?)

@Yarwin
Copy link
Contributor

Yarwin commented Jul 15, 2025

(how do i switch this back to WIP?)

It is kind of non intuitive, there is an option to do that under "Reviewers"

image

@GodotRust
Copy link

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

@ValorZard ValorZard marked this pull request as draft July 15, 2025 16:26
@Bromeon
Copy link
Member

Bromeon commented Jul 25, 2025

@ValorZard what's the status on this? As mentioned in #1231 (comment), it would likely be better to allow #[func] in the trait definition, rather than the impl. Would you still be interested in pursuing a PR under these circumstances? Do you need concrete help?

Also, would be good to keep the refactoring to a minimum -- for example, moving around functions like transform_dyn_trait_impl creates a large diff and makes it hard to see if something changed during the move. If you're interested in changing code structure, we can do a follow-up PR for just that, but it's usually better to not mix new features with larger refactors.

@ValorZard
Copy link
Author

ValorZard commented Jul 25, 2025

I’ll close the PR for now. I think the way I went about this is wrong since I think the #[func] definitions should exist in the trait itself instead of the implementation.

I am currently busy with other projects, but If I do come back to this PR, I’d probably look into implementing some sort of #[godot_trait] macro for traits

@ValorZard ValorZard closed this Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: register Register classes, functions and other symbols to GDScript quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants