Repository navigation
Conversation
The signpost helpers were guarded by canImport(Darwin) or canImport(os), but what they call lives in the os.signpost and os.log submodules. On Darwin-like SDKs that provide Darwin but not those submodules the code does not compile. Guard each use with the module it actually needs. Note: this also changes the condition on Apple platforms, where os.signpost is expected to be importable wherever Darwin was. (cherry picked from commit b481b0b)
Author
|
Cold review: code clean (guards balanced, matches the useLocalDeps style). Unverified risk noted by the reviewer: older compilers may check only the top-level module in canImport(A.B), in which case #1247 would have no effect on the target SDK. Not compiled. |
Kyle-Ye
requested changes
Nov 7, 2026
|
|
||
| package struct Signpost { | ||
| #if canImport(Darwin) && !OPENSWIFTUI_SWIFT_LOG | ||
| #if canImport(os.signpost) && !OPENSWIFTUI_SWIFT_LOG |
Member
There was a problem hiding this comment.
-
OSSignposter is not in os.signpost. Change if canImport Darwin to canImport os LGTM.
-
We do not intent to support older SDK compiler. You can leave those changes in your fork.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RFC, draft, unbuilt. Gate the signpost code on the modules it uses (os.signpost, os.log) instead of Darwin or os, so it compiles on Darwin-like SDKs that lack those submodules.
Verification
Run: the commit cherry-picks cleanly onto current main. Not run: no Swift, C or Objective-C compiler was available on the machine used, so this was not compiled and CI is the first real check.
CONTRIBUTING.md asks for an issue or discussion first for large work; this PR is a single small concern. Related RFC draft: #1246. Note: this also changes the condition on Apple platforms, where os.signpost is expected to be importable wherever Darwin was.