-
Notifications
You must be signed in to change notification settings - Fork 10.5k
standalone minimal tests fail to build on Apple platforms #76461
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
standalone minimal tests fail to build on Apple platforms #76461
Conversation
cef1cf2
to
3b47d2f
Compare
b4193de
to
ceb8b0b
Compare
ceb8b0b
to
6205cbb
Compare
6205cbb
to
84053b2
Compare
@kubamracek I see this was originally turned off in #39030 but I don't understand why |
Apple platforms require reflection to be enabled in the standard library. Revert the commit that disabled reflection. rdar://135878323 This reverts commit 8b189d9. # Conflicts: # stdlib/private/StdlibUnittest/CMakeLists.txt # stdlib/private/StdlibUnittest/StdlibCoreExtras.swift # stdlib/public/Platform/CMakeLists.txt # utils/build-presets.ini
84053b2
to
3bb8203
Compare
preset=stdlib_S_standalone_minimal_macho_x86_64,build,test |
@swift-ci smoke test |
@swift-ci test |
Talked to Kuba a little bit, reflection was turned off "because it's a bit heavyweight". I'm not sure what the correct solution really is though. The OS/SDK owns the Darwin module, and the Darwin module requires reflection. Everything in stdlib/private (transitively) requires the Darwin module. So I don't see how it's possible to turn off reflection without doing something to migrate stdlib/private. Currently stdlib/private is relying on all kinds of OS services like thread and process management, memory, etc., especially in the StdlibUnittest library which is used by ~300 tests. I don't know if the right thing is to turn all of those tests off in non-reflection mode, or if we need to make StdlibUnittest a host library rather than a platform library, or if we need some kind of PlatformMinimal overlay that doesn't try to use the host OS/SDK headers which don't match the target environment? For now I'm trying to re-enable reflection to see if that clears up the immediate issue and then we can take more time to figure out what "minimal" means and how best to accomplish that. |
Apple platforms require reflection to be enabled in the standard library. Revert the commit that disabled reflection.
rdar://135878323
This reverts commit 8b189d9.
# Conflicts:
# stdlib/private/StdlibUnittest/CMakeLists.txt
# stdlib/private/StdlibUnittest/StdlibCoreExtras.swift
# stdlib/public/Platform/CMakeLists.txt
# utils/build-presets.ini