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

fix(pretty): update integer check for Lua5.4 #456

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

sadSader
Copy link
Contributor

Fix #455

@sadSader
Copy link
Contributor Author

I added check for integer ranges in 5.1/5.2.

Copy link
Member

@alerque alerque left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to report and fix this issue, including tests and making the original code even easier to read. I think now that tests poss this is ready to go. The release schedule for the next tag where this will appear is usually up to @Tieske.

@Tieske
Copy link
Member

Tieske commented Sep 8, 2023

The AppVeyor tests (Windows) fail. This stuff is hard to get right, since it is platform specific, and probably LuaJIT also deals with these edge cases slightly different.

The safest way is probably to try and dynamically test the number ranges supported by the underlying Lua engine.

Copy link
Member

@Tieske Tieske left a comment

Choose a reason for hiding this comment

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

Windows tests are failing

@sadSader
Copy link
Contributor Author

sadSader commented Sep 8, 2023

The AppVeyor tests (Windows) fail. This stuff is hard to get right, since it is platform specific, and probably LuaJIT also deals with these edge cases slightly different.

The safest way is probably to try and dynamically test the number ranges supported by the underlying Lua engine.

Unfortunatly string.format code is quite platform and version specific. I'll think how to fix it on next week

@sadSader
Copy link
Contributor Author

Made runtime calculating min/max integers.
Disabled tests with large integers for Lua versions without integer support. string.format("%d") can't reliably format integers on such versions.

I don't see any way to portably format integers without manualy rewriting string.format for integers

@Tieske Tieske changed the title fix(pretty) update integer check for Lua5.4 fix(pretty): update integer check for Lua5.4 Sep 21, 2023
@Tieske Tieske merged commit dc6d19c into lunarmodules:master Sep 21, 2023
8 checks passed
@Tieske
Copy link
Member

Tieske commented Sep 21, 2023

thx!

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

Successfully merging this pull request may close these issues.

Incorrect integer detection
3 participants