fix: smoke test product reference, platform floor, and runnable quickstart - #13
Merged
Conversation
…start
The "SDK examples smoke test" workflow was red on main. Three genuine
issues, each of which would surface in sequence:
1. The generated smoke Package.swift referenced the dependency product
as `dependencies: ["Pilot"]`. SwiftPM derives a path-dependency's
identity from its directory name (`sdk-swift`), not its manifest
name (`Pilot`), so it errored:
product 'Pilot' required by package 'smoke' target 'smoke' not found.
Fixed to `.product(name: "Pilot", package: "sdk-swift")`.
2. After that, SwiftPM refused to resolve because the smoke executable
declared no platform floor while Pilot requires macOS 12. Added
`platforms: [.macOS(.v12)]` to the generated manifest.
3. The README quickstart (which the workflow extracts and runs verbatim)
used `FileManager`/`Data` without `import Foundation`, and called
`handshake(peerID: 12345)` / `waitForTrust` against a non-existent
peer, which fatals at runtime against the registry. Added the
Foundation import and made the quickstart a self-contained loopback
example (start -> identity -> health -> stop) that matches the
workflow's documented intent, with the peer handshake/send/receive
shown as commented copy-paste guidance.
Verified locally on macOS (Swift 6.3.2) by replaying the workflow's
extraction + package generation: `swift run smoke` now exits 0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The "SDK examples smoke test" workflow was red on main. Three genuine
issues, each of which would surface in sequence:
The generated smoke Package.swift referenced the dependency product
as
dependencies: ["Pilot"]. SwiftPM derives a path-dependency'sidentity from its directory name (
sdk-swift), not its manifestname (
Pilot), so it errored:product 'Pilot' required by package 'smoke' target 'smoke' not found.
Fixed to
.product(name: "Pilot", package: "sdk-swift").After that, SwiftPM refused to resolve because the smoke executable
declared no platform floor while Pilot requires macOS 12. Added
platforms: [.macOS(.v12)]to the generated manifest.The README quickstart (which the workflow extracts and runs verbatim)
used
FileManager/Datawithoutimport Foundation, and calledhandshake(peerID: 12345)/waitForTrustagainst a non-existentpeer, which fatals at runtime against the registry. Added the
Foundation import and made the quickstart a self-contained loopback
example (start -> identity -> health -> stop) that matches the
workflow's documented intent, with the peer handshake/send/receive
shown as commented copy-paste guidance.
Verified locally on macOS (Swift 6.3.2) by replaying the workflow's
extraction + package generation:
swift run smokenow exits 0.Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com