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

Map Vector3i.Axis enum to builtin Vector3Axis #797

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Jul 14, 2024

Other extensions which reference the integer axis type should now be able to use the builtin enum Vector3Axis.

An example that caused problems, with the GodotVoxel plugin:

info: component 'rust-std' for target 'x86_64-pc-windows-gnu' is up to date
   Compiling godot-ffi v0.1.1 (https://github.com/godot-rust/gdext?branch=master#4dc2720f)
   Compiling godot-core v0.1.1 (https://github.com/godot-rust/gdext?branch=master#4dc2720f)
error[E0433]: failed to resolve: could not find `vector3i` in `classes`
   --> C:\...\GodotVoxelSteam\voxel_generator\target\x86_64-pc-windows-gnu\debug\build\godot-core-00312bf968325b83\out\classes\voxel_blocky_model.rs:256:59
    |
256 | ...: crate::classes::vector3i::Axis, clockwise: bool,) {
    |                      ^^^^^^^^ could not find `vector3i` in `classes`
    |
note: module `crate::gen::builtin_classes::vector3i` exists but is inaccessible
   --> C:\...\GodotVoxelSteam\voxel_generator\target\x86_64-pc-windows-gnu\debug\build\godot-core-00312bf968325b83\out\builtin_classes\mod.rs:13:1
    |
13  | mod vector3i;
    | ^^^^^^^^^^^^^ not accessible

error[E0433]: failed to resolve: could not find `vector3i` in `classes`
   --> C:\...\GodotVoxelSteam\voxel_generator\target\x86_64-pc-windows-gnu\debug\build\godot-core-00312bf968325b83\out\classes\voxel_blocky_model.rs:257:49
    |
257 |             type CallSig = ((), crate::classes::vector3i::Axis, bool);
    |                                                 ^^^^^^^^ could not find `vector3i` in `classes`
    |
note: module `crate::gen::builtin_classes::vector3i` exists but is inaccessible
   --> C:\...\GodotVoxelSteam\voxel_generator\target\x86_64-pc-windows-gnu\debug\build\godot-core-00312bf968325b83\out\builtin_classes\mod.rs:13:1
    |
13  | mod vector3i;
    | ^^^^^^^^^^^^^ not accessible

For more information about this error, try `rustc --explain E0433`.
error: could not compile `godot-core` (lib) due to 2 previous errors

Bromeon added 2 commits July 13, 2024 13:55
Benefits extensions that make use of this type. This previously caused problems
referencing a non-existent builtin enum.
@Bromeon Bromeon added bug c: engine Godot classes (nodes, resources, ...) labels Jul 14, 2024
@GodotRust
Copy link

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

@greenfox1505
Copy link

This worked for my build using https://github.com/Zylann/godot_voxel.

@Bromeon Bromeon added this pull request to the merge queue Jul 18, 2024
Merged via the queue into master with commit 62830ca Jul 18, 2024
15 checks passed
@Bromeon Bromeon deleted the feature/vector3i-axis-mapped branch July 18, 2024 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c: engine Godot classes (nodes, resources, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants