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

Stabilize FastDoubleParser part 1 #1040

Merged
merged 7 commits into from
Feb 12, 2025
Merged

Conversation

Jolanrensen
Copy link
Collaborator

@Jolanrensen Jolanrensen commented Jan 29, 2025

Relates to #1039

  • Sets useFastDoubleParser parser option to true by default.
  • Improved FastDoubleParser fallback mechanism to use all possible safe alternative decimal symbols for a given locale.
  • Fixed breaking tests and added some new ones
  • Updated parse documentation on the website with the behavior of the fallback mechanism etc.

@Jolanrensen Jolanrensen force-pushed the stabilize-fast-double-parser branch from ad272d8 to 89e0d41 Compare February 11, 2025 12:52
@Jolanrensen Jolanrensen marked this pull request as ready for review February 11, 2025 12:54
@Jolanrensen Jolanrensen added this to the 0.16 milestone Feb 11, 2025
@Jolanrensen Jolanrensen added documentation Improvements or additions to documentation (not KDocs) enhancement New feature or request labels Feb 11, 2025
You can also set global parser options that will be used by default in [`read`](read.md), [`convert`](convert.md),
and `parse` operations:
and other `parse` operations.
These can be seen as a global fallback for the `parserOptions` argument.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose we need to be simpler with "fallback" definition and give a short explanation what is this, how it influences on something or add some references who are not familiar with that

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

alright, expanded a bit on it

fun `converting String to Double in different locales`() {
val currentLocale = Locale.getDefault()
val systemLocale = Locale.getDefault()
Copy link
Collaborator

Choose a reason for hiding this comment

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

is it machine dependent test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no, this backs up the system locale and restores it at the end of the test. During the test we set Locale.setDefault() to be machine independant

@Jolanrensen Jolanrensen merged commit 6f28237 into master Feb 12, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation (not KDocs) enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants