Skip to content

[CoreFoundation] Revert some Android regressions that crept in #3088

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

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

finagolfin
Copy link
Member

Revert an Android-specific block that was already removed in #2168 and don't check for baseURL in _CFTimeZoneInit(), since Android doesn't use it anyway.

The latter broke 31 tests from the test suite when running natively on Android AArch64.

Revert an Android-specific block that was already removed in swiftlang#2168 and don't
check for baseURL in _CFTimeZoneInit(), since Android doesn't use it anyway.
if (NULL != localtime_r(&now, &info)) {
return CFTimeZoneCreateWithTimeIntervalFromGMT(kCFAllocatorSystemDefault, info.tm_gmtoff);
}
#endif
Copy link
Member Author

Choose a reason for hiding this comment

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

This was removed a couple years ago by @drodriguez, but the recent Catalina merge inadvertently brought it back.

@@ -1388,7 +1379,7 @@ Boolean _CFTimeZoneInit(CFTimeZoneRef timeZone, CFStringRef name, CFDataRef data
return false;
}
}
if (NULL == data && NULL != baseURL) {
if (NULL == data) {
Copy link
Member Author

Choose a reason for hiding this comment

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

@MaxDesiatov, unsure what you're trying to do here, was this failing for you without this check on WASI? Android doesn't use baseURL inside _CFTimeZoneDataCreate(), so this broke initializing time zones in several tests.

Were you just trying to play it safe here or do you need this for WASI?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hard to say, I'm fine with reverting this bit for now. If this breaks anything for us, I'll know who to ping 🙂

@MaxDesiatov
Copy link
Contributor

@swift-ci please test

@finagolfin
Copy link
Member Author

@etcwilde, this is ready to go, would you merge?

@millenomi millenomi merged commit 9402945 into swiftlang:main Oct 27, 2021
@finagolfin finagolfin deleted the droid branch October 28, 2021 06:05
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