Skip to content

Commit a4be7c2

Browse files
bors[bot]Bromeon
andauthored
Merge #908
908: Changelog for v0.10.1 r=Bromeon a=Bromeon Co-authored-by: Jan Haller <[email protected]>
2 parents b8e8799 + 360de79 commit a4be7c2

File tree

4 files changed

+44
-7
lines changed

4 files changed

+44
-7
lines changed

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,43 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
9+
## [0.10.1] - unreleased
10+
11+
This is a backwards-compatible release; thus no removals or breaking changes.
12+
13+
### Added
14+
15+
- New export API, allowing to omit owner ([#872](https://github.com/godot-rust/godot-rust/pull/872), [#933](https://github.com/godot-rust/godot-rust/pull/933))
16+
- Export and Variant conversion for `Vec`/`HashMap`/`HashSet` ([#883](https://github.com/godot-rust/godot-rust/pull/883))
17+
- Attribute `deref_return` to return reference-like objects ([#870](https://github.com/godot-rust/godot-rust/pull/870))
18+
- Classes `Rect2` and `Aabb` now have methods ([#867](https://github.com/godot-rust/godot-rust/pull/867))
19+
- Module `globalscope` with GDScript utility functions, e.g. `lerp`, `smoothstep` ([#901](https://github.com/godot-rust/godot-rust/pull/901), [#906](https://github.com/godot-rust/godot-rust/pull/906))
20+
- `Varargs` has new API for length checks, type conversions and errors ([#892](https://github.com/godot-rust/godot-rust/pull/892))
21+
- Method `Axis::to_unit_vector()` ([#867](https://github.com/godot-rust/godot-rust/pull/867))
22+
23+
### Fixed
24+
25+
- `StringName` traits `Eq` and `Ord` had a bug in GDNative API ([#912](https://github.com/godot-rust/godot-rust/pull/912))
26+
- `register_properties` naming collision ([#888](https://github.com/godot-rust/godot-rust/pull/888))
27+
- Outdated GDNative API checks prevented compilation of Godot 3.5 RC ([#909](https://github.com/godot-rust/godot-rust/pull/909))
28+
- Android: allow usage of new NDK paths ([#754](https://github.com/godot-rust/godot-rust/pull/754))
29+
- Use `ManuallyDrop` in ptrcalls to prevent drop reordering ([#924](https://github.com/godot-rust/godot-rust/pull/924))
30+
- Fix memory leaks in `as_arg` tests ([#925](https://github.com/godot-rust/godot-rust/pull/925))
31+
- `VariantArray` iterator skip ([#936](https://github.com/godot-rust/godot-rust/pull/936))
32+
- Proc-macros auto-import the macros they depend on (fixed earlier in [#425](https://github.com/godot-rust/godot-rust/pull/425)).
33+
34+
### Config / internal
35+
36+
- Stripped 6 unnecessary dependencies, detected by cargo-machete ([#890](https://github.com/godot-rust/godot-rust/pull/890))
37+
- Doc CI: improved detection of unchanged code ([#877](https://github.com/godot-rust/godot-rust/pull/877))
38+
- Tests for export APIs ([#891](https://github.com/godot-rust/godot-rust/pull/891))
39+
- `godot_test!` macro now used consistently ([#896](https://github.com/godot-rust/godot-rust/pull/896))
40+
- `Ord` implementation now used uniformly ([#911](https://github.com/godot-rust/godot-rust/pull/911))
41+
- Update Android NDK (21 -> 25), workaround Rust bug ([#920](https://github.com/godot-rust/godot-rust/pull/920))
42+
- Automate NDK detection ([#934](https://github.com/godot-rust/godot-rust/pull/934))
43+
- Refactorings in gdnative-derive crate ([#922](https://github.com/godot-rust/godot-rust/pull/922))
44+
845
## [0.10.0] - 2022-03-19
946

1047
(Version `0.10.0-rc.0` has been integrated into this change set)

gdnative-core/src/export/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ macro_rules! godot_wrap_method_if_deref {
1919
// - Expand the call to the deprecated_reference_return!() macro to user code.
2020
#[doc(hidden)]
2121
#[macro_export]
22-
#[deprecated = "This function does not actually pass by reference to the Godot engine. You can clarify by writing #[export(deref_return)]."]
22+
#[deprecated = "This function does not actually pass by reference to the Godot engine. You can clarify by writing #[method(deref_return)]."]
2323
macro_rules! deprecated_reference_return {
2424
() => {};
2525
}
2626

2727
#[doc(hidden)]
2828
#[macro_export]
29-
#[deprecated = "\n#[export] is deprecated and will be removed in godot-rust 0.11. Use #[method] instead.\n\
29+
#[deprecated = "\n#[export] is deprecated and will be removed in a future godot-rust version. Use #[method] instead. \n\
3030
For more information, see https://godot-rust.github.io/docs/gdnative/derive/derive.NativeClass.html."]
3131
macro_rules! deprecated_export_syntax {
3232
() => {};

gdnative-derive/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ mod profiled;
1616
mod varargs;
1717
mod variant;
1818

19-
/// Collects method signatures of all functions in a `NativeClass` that have the `#[export]` attribute and registers them with Godot.
19+
/// Collects method signatures of all functions in a `NativeClass` that have the `#[method]` attribute and registers them with Godot.
2020
///
2121
/// For example, in the following class
2222
/// ```
@@ -29,8 +29,8 @@ mod variant;
2929
///
3030
/// #[methods]
3131
/// impl Foo {
32-
/// #[export]
33-
/// fn foo(&self, _owner: &Reference, bar: i64) -> i64 {
32+
/// #[method]
33+
/// fn foo(&self, #[base] _base: &Reference, bar: i64) -> i64 {
3434
/// bar
3535
/// }
3636
/// }
@@ -50,7 +50,7 @@ mod variant;
5050
/// impl gdnative::export::NativeClassMethods for Foo {
5151
/// fn register(builder: &ClassBuilder<Self>) {
5252
/// use gdnative::export::*;
53-
/// builder.method("foo", gdnative::export::godot_wrap_method!(Foo, false, fn foo(&self, #[base] _owner: &Reference, bar: i64) -> i64))
53+
/// builder.method("foo", gdnative::export::godot_wrap_method!(Foo, false, fn foo(&self, #[base] _base: &Reference, bar: i64) -> i64))
5454
/// .with_rpc_mode(RpcMode::Disabled)
5555
/// .done_stateless();
5656
/// }

gdnative-derive/src/methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ fn impl_gdnative_expose(ast: ItemImpl) -> (ItemImpl, ClassMethodExport) {
211211

212212
let mut methods_to_export: Vec<ExportMethod> = Vec::new();
213213

214-
// extract all methods that have the #[export] attribute.
214+
// extract all methods that have the #[method] attribute
215215
// add all items back to the impl block again.
216216
for func in ast.items {
217217
let items = match func {

0 commit comments

Comments
 (0)