Skip to content

Commit 911cb28

Browse files
authored
Merge pull request #1070 from godot-rust/bugfix/openxr-apis-release
Work around `OpenXR*` APIs wrongly exposed in release; wider release checks in CI
2 parents 1957e57 + fbf8fc0 commit 911cb28

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

.github/workflows/full-ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,9 @@ jobs:
338338
os: ubuntu-22.04
339339
artifact-name: linux-release-nightly
340340
godot-binary: godot.linuxbsd.template_release.x86_64
341-
rust-extra-args: --release
341+
# Use `codegen-full-experimental` to make sure that all function tables can be loaded in Godot release builds.
342+
# If the experimental part causes problems, downgrade to `codegen-full`.
343+
rust-extra-args: --release --features itest/codegen-full-experimental
342344
rust-cache-key: release
343345

344346
# Linux compat (4.1 disabled, already covered by memcheck)

godot-codegen/src/special_cases/special_cases.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,15 @@ pub fn is_godot_type_deleted(godot_ty: &str) -> bool {
141141
| "MovieWriterPNGWAV"
142142
| "ResourceFormatImporterSaver"
143143
=> true,
144-
// Previously loaded lazily; in 4.2 it loads at the Scene level. See: https://github.com/godotengine/godot/pull/81305
144+
145+
// Previously loaded lazily; in 4.2 it loads at the Scene level: https://github.com/godotengine/godot/pull/81305
145146
| "ThemeDB"
146147
=> cfg!(before_api = "4.2"),
147-
// reintroduced in 4.3. See: https://github.com/godotengine/godot/pull/80214
148+
149+
// Reintroduced in 4.3: https://github.com/godotengine/godot/pull/80214
148150
| "UniformSetCacheRD"
149151
=> cfg!(before_api = "4.3"),
152+
150153
_ => false
151154
}
152155
}

godot-codegen/src/util.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,17 @@ pub fn make_sname_ptr(identifier: &str) -> TokenStream {
6060
pub fn get_api_level(class: &JsonClass) -> ClassCodegenLevel {
6161
// Work around wrong classification in https://github.com/godotengine/godot/issues/86206.
6262
fn override_editor(class_name: &str) -> bool {
63-
cfg!(before_api = "4.3")
64-
&& matches!(
65-
class_name,
66-
"ResourceImporterOggVorbis" | "ResourceImporterMP3"
67-
)
63+
match class_name {
64+
// https://github.com/godotengine/godot/issues/103867
65+
"OpenXRInteractionProfileEditorBase"
66+
| "OpenXRInteractionProfileEditor"
67+
| "OpenXRBindingModifierEditor" => cfg!(before_api = "4.5"),
68+
69+
// https://github.com/godotengine/godot/issues/86206
70+
"ResourceImporterOggVorbis" | "ResourceImporterMP3" => cfg!(before_api = "4.3"),
71+
72+
_ => false,
73+
}
6874
}
6975

7076
if special_cases::is_class_level_server(&class.name) {

godot-ffi/src/toolbox.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,8 @@ pub(crate) fn load_class_method(
350350

351351
if method.is_null() {
352352
panic!(
353-
"Failed to load class method {}::{} (hash {}).\n\
354-
Make sure gdext and Godot are compatible: https://godot-rust.github.io/book/gdext/advanced/compatibility.html",
355-
class_name,
356-
method_name,
357-
hash
353+
"Failed to load class method {}::{} (hash {}).{INFO}",
354+
class_name, method_name, hash
358355
)
359356
}
360357

@@ -421,7 +418,7 @@ pub(crate) fn read_version_string(version_ptr: &sys::GDExtensionGodotVersion) ->
421418
.to_string()
422419
}
423420

424-
const INFO: &str = "\nMake sure gdext and Godot are compatible: https://godot-rust.github.io/book/gdext/advanced/compatibility.html";
421+
const INFO: &str = "\nMake sure gdext and Godot are compatible: https://godot-rust.github.io/book/toolchain/compatibility.html";
425422

426423
// ----------------------------------------------------------------------------------------------------------------------------------------------
427424
// Private abstractions

0 commit comments

Comments
 (0)