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

Revert "Remove incorrect guard check for Android" #5178

Closed
wants to merge 1 commit into from

Conversation

hjyamauchi
Copy link
Contributor

Reverts #5171

This makes it at least buildable on Android.

@hjyamauchi
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@finagolfin finagolfin left a comment

Choose a reason for hiding this comment

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

This is clearly incorrect, as explained in detail in my subsequent comments in #5171.

Since you're having problems dealing with the nullability annotations in the latest Android NDKs, which I noted I haven't upgraded these posix_spawn APIs to yet in my own Android SDK, what may work is to update to NDK 27 and move this Android guard check down a line after the posix_spawnattr_init(), to unwrap the optional in Swift only after you know spawnAttrs has been initialized. Of course, the only way to test that, if it compiles, is to actually run it too, which it appears you haven't been doing so far.

I suggest you experiment with such ways to fix this code with the latest NDKs, rather than simply sticking with whatever temporary compilation-only hack @hyp put in earlier.

@hjyamauchi
Copy link
Contributor Author

Saleem has this: #5179 for moving the guard code

@hjyamauchi hjyamauchi closed this Feb 27, 2025
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.

2 participants