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

Deprecate instance utilities in godot::global #901

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

Bromeon
Copy link
Member

@Bromeon Bromeon commented Sep 16, 2024

Deprecates godot::global utilities instance_from_id(), is_instance_valid(), and is_instance_id_valid().
Their removal is planned in v0.3.

This functionality is fully covered by:

  • Gd::instance_id()
  • Gd::from_instance_id()
  • InstanceId::lookup_validity() -- added in this PR

The functions in godot::global are redundant and introduce more backdoors for object interaction, bypassing invariants or runtime checks. The functions are very easy to overlook in a design, e.g. in #886.

CI blocked by #899.

@Bromeon Bromeon added quality-of-life No new functionality, but improves ergonomics/internals c: engine Godot classes (nodes, resources, ...) breaking-change Requires SemVer bump labels Sep 16, 2024
@GodotRust
Copy link

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

@Bromeon Bromeon force-pushed the qol/deprecate-instance-utilities branch from bc802b8 to 8b37feb Compare September 17, 2024 20:14
@Bromeon Bromeon force-pushed the qol/deprecate-instance-utilities branch from 8979e84 to ece7360 Compare September 17, 2024 20:56
@Bromeon Bromeon removed the breaking-change Requires SemVer bump label Sep 17, 2024
@Bromeon Bromeon added this pull request to the merge queue Sep 17, 2024
Merged via the queue into master with commit 671fcb5 Sep 17, 2024
15 checks passed
@Bromeon Bromeon deleted the qol/deprecate-instance-utilities branch September 17, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: engine Godot classes (nodes, resources, ...) quality-of-life No new functionality, but improves ergonomics/internals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants