-
Notifications
You must be signed in to change notification settings - Fork 2
Fix Android support #22
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |
| @_implementationOnly import COpenCombineHelpers | ||
| #endif | ||
|
|
||
| #if os(WASI) | ||
| #if os(WASI) || os(Android) | ||
|
||
| private var __identifier: UInt64 = 0 | ||
|
|
||
| internal func __nextCombineIdentifier() -> UInt64 { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,7 @@ | |||||||||
| @_implementationOnly import COpenCombineHelpers | ||||||||||
| #endif | ||||||||||
|
|
||||||||||
| #if os(WASI) | ||||||||||
| #if os(WASI) || os(Android) | ||||||||||
|
||||||||||
| #if os(WASI) || os(Android) | |
| #if os(WASI) | |
| // Note: The WASI platform is assumed to run in a single-threaded environment. | |
| // This implementation is not thread-safe. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will only be used on main thread in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for this change. Could you elaborate on why this change is necessary?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be some CPP interop issue with Android when not using the default setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@colemancda Thank you for the explanation. However, I don't think relying on default settings is a good approach as it may introduce maintenance burden for future upgrades and it also breaks other platform's build currently (See the failure CI - https://github.com/OpenSwiftUIProject/OpenCombine/actions/runs/15523371994/job/44321270577?pr=22).
Here are my suggestions:
Relying on implicit defaults makes the build configuration less predictable and harder to maintain across Swift toolchain versions. Let's work together to find a solution that uses explicit settings while maintaining Android compatibility.