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

Fix register-docs feature not being tested #942

Merged
merged 5 commits into from
Nov 5, 2024

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Nov 5, 2024

The doc registration from RustDoc feature was added with an unconventional test setup, which has since posed a multitude of problems:

  • It was a unit, not integration test (checking whether an XML file was written with expected contents).
  • It worked without Godot at the time, but since then, ClassName uses StringName internally and is no longer usable in unit tests. I moved it to integration tests.
  • The test relied on only one specific class to be registered, calling next() on the plugin iterator. I changed this to find the correct class instead.
  • It being feature-gated behind register-docs meant that regular cargo test wouldn't run it, and neither CI nor check.sh were updated to include that feature. So it has effectively been without tests through the different additions.
  • Since it hasn't been tested, a change in #918 has slipped.
  • Clippy hasn't run on it either, so I patched several violations.
  • The feature was inconsistently called docs and register-docs depending on crate, adding complexity.

@Bromeon Bromeon added bug c: register Register classes, functions and other symbols to GDScript c: tooling CI, automation, tools labels Nov 5, 2024
@Bromeon Bromeon added this pull request to the merge queue Nov 5, 2024
@GodotRust
Copy link

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

Merged via the queue into master with commit 387bd81 Nov 5, 2024
15 checks passed
@Bromeon Bromeon deleted the bugfix/register-docs-tests branch November 5, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c: register Register classes, functions and other symbols to GDScript c: tooling CI, automation, tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants