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

CreateMergePatch: Numbers may get truncated due to always being treated as float64 #189

Closed
alvaroaleman opened this issue Dec 4, 2023 · 3 comments · Fixed by #194
Closed

Comments

@alvaroaleman
Copy link

Hey there,

Thanks for creating this library! We are using it downstream in controller-runtime and recently someone posted an issue that some of their int64s get truncated when using CreateMergePatch. From what I can tell, this is caused by numbers always being treated as float64.

Is this something that is a) realistically possible to fix and b) something you would consider changing?

Thanks in advance!

@evanphx
Copy link
Owner

evanphx commented Jan 11, 2024

Hiya! I'll have a look.

@evanphx
Copy link
Owner

evanphx commented Jan 11, 2024

Turned out to be a fairly easy fix, just need to avoid using float64. Have a look at #194.

@alvaroaleman
Copy link
Author

That did the trick, thank you so much for looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants