Skip to content

Implement Debug + Display for builtins #110

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

Closed
lilizoey opened this issue Feb 4, 2023 · 6 comments · Fixed by #553
Closed

Implement Debug + Display for builtins #110

lilizoey opened this issue Feb 4, 2023 · 6 comments · Fixed by #553
Labels
c: core Core components feature Adds functionality to the library good first issue Good for newcomers

Comments

@lilizoey
Copy link
Member

lilizoey commented Feb 4, 2023

NodePath doesn't implement debug, but it should. May be true for other types as well.

@Bromeon Bromeon changed the title NodePath doesn't implement Debug Implement Debug + Display for builtins Feb 4, 2023
@Bromeon
Copy link
Member

Bromeon commented Feb 4, 2023

Yeah, a lot of core type functionality is missing, see #6.
I renamed this issue to generally track Debug/Display for builtin types.

Please don't open a new issue for each other trait, just comment here 🙂

@Bromeon Bromeon added feature Adds functionality to the library c: core Core components labels Feb 4, 2023
@Bromeon Bromeon added the good first issue Good for newcomers label Mar 21, 2023
bors bot added a commit that referenced this issue Apr 13, 2023
224: Impl `Display` for built-ins r=Bromeon a=Hapenia-Lans

related to #110 

Co-authored-by: ChenXi <[email protected]>
@0awful
Copy link
Contributor

0awful commented Jan 3, 2024

Completeness:

Here is all types described here

Structs

name debug display
AABB [x] [x]
Array [x] [ ]
Basis [x] [x]
Callable [x] [x]
Color [x] [x]
Dictionary [x] [ ]
GString [x] [x]
NodePath [x] [x]
PackedByteArray [x] [ ]
PackedColorArray [x] [ ]
PackedFloat32Array [x] [ ]
PackedFloat64Array [x] [ ]
PackedInt32Array [x] [ ]
PackedInt64Array [x] [ ]
PackedStringArray [x] [ ]
PackedVector2Array [x] [ ]
PackedVector3Array [x] [ ]
Plane [x] [x]
Projection [x] [x]
Quarternion [x] [x]
Rect2 [x] [x]
Rect2i [x] [x]
Signal (incomplete) [ ] [ ]
StringName [x] [x]
Transform2D [x] [x]
Transform3D [x] [x]
Variant [x] [x]
Vector2 [x] [x]
Vector2i [x] [x]
Vector3 [x] [x]
Vector3i [x] [x]
Vector4 [x] [x]
Vector4i [x] [x]

Enums

Name Debug Display
ColorChannelOrder [x] [ ]
EulerOrder [x] [ ]
ProjectionEye [x] [ ]
ProjectionPlane [x] [ ]
RectSide [ ] [ ]
Rid [x] [x]
VariantOperator [x] [ ]
VariantType [x] [ ]
Vector2Axis [x] [ ]
Vector3Axis [x] [ ]
Vector4Axis [x] [ ]

@0awful
Copy link
Contributor

0awful commented Jan 3, 2024

Does this include adding these functions for real and VariantArray? I think they should keep the impls from the types they wrap but I'm not sure.

@Bromeon
Copy link
Member

Bromeon commented Jan 4, 2024

Thanks a lot for listing all the impls!

Does this include adding these functions for real and VariantArray? I think they should keep the impls from the types they wrap but I'm not sure.

Yes, they should keep the impl from their underlying types. You won't be able to write impls here (for real because it's either f32/f64, and for VariantArray because it would overlap the Array<T> impl).

@0awful
Copy link
Contributor

0awful commented Jan 4, 2024

@Bromeon Are you looking for display to be implemented on the enums as well?

@Bromeon
Copy link
Member

Bromeon commented Jan 4, 2024

No, I think it's fine to limit to the builtin types for now 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: core Core components feature Adds functionality to the library good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants