Skip to content

Rename Vector4.components -> coord for consistency - #97487

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
Ivorforce:patch-2
Sep 26, 2024
Merged

akien-mga merged 1 commit into
godotengine:masterfrom
Ivorforce:patch-2

Conversation

@Ivorforce

@Ivorforce Ivorforce commented Sep 26, 2024 •

Copy link
Copy Markdown
Member

This brings it in line with all the other vectors:

I'm guessing this naming happened when Vector4 was copied from Color, as it's essentially the same struct layout, just with different functions.

This is obviously a potentially breaking change. I didn't find any other references in core to 'components', though at least godot-cpp has named their Vector4.components property after this one (see godotengine/godot-cpp#1608), so godot-cpp users may be affected.

@AThousandShips

AThousandShips commented Sep 26, 2024 •

Copy link
Copy Markdown
Member

For the engine itself this isn't compatibility breaking as we don't provide compatibility guarantees for the engine internals (only the exposed API)

Adding a review request for GDExtension as this is related to the godot-cpp side PR and is relevant for deciding either way

@AThousandShips
AThousandShips requested a review from a team September 26, 2024 12:07
@akien-mga
akien-mga requested a review from a team September 26, 2024 12:32
@dsnopek

dsnopek commented Sep 26, 2024 •

Copy link
Copy Markdown
Contributor

From the perspective of godot-cpp, if we want to maintain source compatibility, we could keep both declarations in the union and add a note about the older one being deprecated. Vector4 is new enough, though, that I think an argument could be made that we don't need to do that.

In any case, I think it's fine to move forward with this on the Godot-side, and we can have the "maintain source compatibility for Vector4.components or not" discussion in the follow-up godot-cpp PR

@akien-mga akien-mga changed the title Rename Vector4.components -> coord Rename Vector4.components -> coord for consistency Sep 26, 2024
@fire

fire commented Sep 26, 2024 •

Copy link
Copy Markdown
Member

We tend to use full names so instead of coord -> coordinates, but this was an internal that was exposed.. Not sure what to do.

Edited:

At this point adding components to all the other types is also a valid diff.

@Ivorforce

Ivorforce commented Sep 26, 2024 •

Copy link
Copy Markdown
Member Author

I'd be ok with switching to coordinates for all the types too, I'm not a big fan of shorthands. But I'll let reviewers decide.

@akien-mga

Copy link
Copy Markdown
Member

I think this change is fine as is, I wouldn't change all Vector types further. If we're to change I'd go one step further and make this a private member so we don't even need to bother about its name or compatibility, but that'd be a Godot 5 change :)

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 26, 2024
@akien-mga
akien-mga merged commit 8126d81 into godotengine:master Sep 26, 2024
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@Ivorforce
Ivorforce deleted the patch-2 branch September 26, 2024 17:46
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
Rename `Vector4.components` -> `coord` for consistency
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
Rename `Vector4.components` -> `coord` for consistency
wangshucheng pushed a commit to wangshucheng/godot that referenced this pull request Aug 27, 2026
Rename `Vector4.components` -> `coord` for consistency
Shane-Gadsby pushed a commit to Shane-Gadsby/godotwebgpu that referenced this pull request Sep 21, 2026
Rename `Vector4.components` -> `coord` for consistency
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.

5 participants