Skip to content

Conversation

@Bromeon
Copy link
Member

@Bromeon Bromeon commented Dec 23, 2025

In website CI, doc generation failed with:

    Compiling godot-core v0.4.4 (/home/runner/work/godot-rust.github.io/godot-rust.github.io/cloned/godot-core)
error: allow, cfg, cfg_attr, deny, expect, forbid, and warn are the only allowed built-in attributes in function parameters
   --> godot-core/src/builtin/callable.rs:329:64
    |
329 | ...   #[cfg(safeguards_balanced)] #[cfg_attr(published_docs, doc(cfg(safeguards_balanced)))] thread_id: Option<std::thread::ThreadId>,
    |                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Since we replace #[cfg] with #[cfg_attr(..., doc(cfg))] and the latter is not always valid in the same places as the former, we have to be more conservative.

One consequence is that we can't use #[cfg] in parameter position. This refactors the code slightly, using None and relying on the optimizer.

@Bromeon Bromeon added bug c: tooling CI, automation, tools labels Dec 23, 2025
@Bromeon Bromeon added this to the 0.5 milestone Dec 23, 2025
@GodotRust
Copy link

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

@Bromeon Bromeon added this pull request to the merge queue Dec 23, 2025
Merged via the queue into master with commit 5029f71 Dec 23, 2025
20 checks passed
@Bromeon Bromeon deleted the bugfix/cfg-function-param branch December 23, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug c: tooling CI, automation, tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants