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

Suggest using OS.has_feature instead of the engine architecture name for bitness #99465

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

aaronfranke
Copy link
Member

I was reading this proposal godotengine/godot-proposals#11150 and checking our own docs when I realized that the documentation for Engine.get_architecture_name is sub-optimal. Users should not be trying to heuristically extract information from the architecture name. If users need to answer boolean questions about the platform, they should use OS.has_feature which returns a boolean depending on various feature flags.

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this tip has always been oddly unreliable, as if it was written before Feature Tags were even a thing.

…for bitness
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request makes sense to update the documentation to use an existing feature rather than extract it from the architecture name.

@Repiteo Repiteo merged commit d967bef into godotengine:master Nov 22, 2024
20 checks passed
@aaronfranke aaronfranke deleted the arch-bit-has-feature branch November 22, 2024 01:16
@akien-mga akien-mga changed the title Suggest using OS.has_feature instead of the engine architecture name for bitness Suggest using OS.has_feature instead of the engine architecture name for bitness Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants