Skip to content

Conversation

@jmschonfeld
Copy link
Contributor

When updating the JSON encoder tests to swift-testing, we noticed that on Windows the test that calls setlocale (which now runs in parallel to other tests) was interfering with other JSON tests causing rare crashes. This updates our string shims to explicitly use the c locale rather than relying on a NULL value (which on Windows used the global current locale)

@jmschonfeld jmschonfeld requested a review from kperryua July 11, 2025 22:24
@jmschonfeld
Copy link
Contributor Author

@swift-ci please test

@bnbarham
Copy link
Contributor

Thanks @jmschonfeld!

Copy link
Contributor

@kperryua kperryua left a comment

Choose a reason for hiding this comment

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

Thanks!

@jmschonfeld jmschonfeld merged commit d1b4798 into swiftlang:main Jul 14, 2025
16 checks passed
@jmschonfeld jmschonfeld deleted the stringshims-clocale branch July 14, 2025 16:25
jmschonfeld added a commit to jmschonfeld/swift-foundation that referenced this pull request Jul 17, 2025
jmschonfeld added a commit that referenced this pull request Jul 17, 2025
* Prevent decimal_withFormat_localeDependent from relying on the current locale (#1428)

* Update stringshims to always use clocale (#1427)
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 this pull request may close these issues.

3 participants