-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
933: Rename `#[godot]` to `#[method]` r=Bromeon a=Bromeon Follow-up to #872. As mentioned there, the syntax was provisional and still subject to change. This PR renames `#[godot]` back to `#[method]`. Other changes, such as the `#[base]` parameter name, remain unaffected (still a bit conflicted about that too, but that's another story...) Reasoning behind the name `#[godot]` was a potential greater unification of godot-rust attributes, which would allow to use `#[godot]` more widespread as _the_ attribute, e.g. ```rs #[derive(NativeClass)] #[godot(inherit=Node, no_constructor)] struct MyClass { #[godot(get)] my_property: i32, } #[godot_api] impl MyClass { #[godot] fn my_method(&self, #[base] base: &Node) {...} } ``` However, this comes with a bigger change. In order to avoid huge deprecations or breaking changes, I think it makes sense to not include this in the current minor version. It could be discussed for v0.11, or maybe only for GDExtension. Since having `#[godot]` in only one place would be "somewhere in between" the old and new naming, I'd rather find an identifier that fits the existing `#[property]` and `#[methods]` naming scheme -- and `#[method]` as suggested by the original author would fit relatively nicely. Overall, I still believe "method" is not expressive and there is room for improvement, as well as for other names like "property" or so. But I don't want this to delay the whole 0.10.1 release further; we'd rather think about nicer naming another time, maybe when GDExtension is around. This PR introduces a breaking change toward `master`, but not toward the last released version `0.10.0`, so it can be included in `0.10.1`. Co-authored-by: Jan Haller <[email protected]>
- Loading branch information
Showing
17 changed files
with
53 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.