skiptools / skiptools/skip-kit
SBOMView: SBOMPackageDetailView memberwise init is private (@State private var) — breaks host swift build
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 10
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Summary
SBOMView.swift fails to compile on the macOS host: SBOMPackageDetailView's synthesized memberwise initializer is private, because two of its stored properties are declared @State private var. The call site is 90 lines above it in the same file.
.build/checkouts/skip-kit/Sources/SkipKit/SBOMView.swift:137:49: error: 'SBOMPackageDetailView' initializer is inaccessible due to 'private' protection level
The code
Call site — Sources/SkipKit/SBOMView.swift:137:
NavigationLink(destination: SBOMPackageDetailView(package: pkg, document: document)) {
SBOMPackageRow(package: pkg)
}
Declaration — Sources/SkipKit/SBOMView.swift:227:
struct SBOMPackageDetailView: View {
let package: SBOMPackage
let document: SBOMDocument
@State private var browserPresented = false
@State private var browserURL: URL = URL(string: "https://spdx.org/licenses/")!
A private stored property makes the synthesized memberwise init private, so init(package:document:_browserPresented:_browserURL:) is not reachable from the call site.
Suggested fix
Drop private from the two @State properties:
@State var browserPresented = false
@State var browserURL: URL = URL(string: "https://spdx.org/licenses/")!
This also matches Skip's own guidance that @State properties should not be private in bridged views.
Scope
Host-only. SBOMView.swift is inside #if !SKIP_BRIDGE, so in our project:
swift build/swift test(macOS host) — failskip android build— passes- iOS
xcodebuild— passes
The practical impact is that the host unit-test lane cannot run at all, which for us is ~827 tests.
Versions
- skip-kit 1.1.1 — also reproduces on 1.1.0 (the only other published 1.x tag)
- Skip 1.9.5
- Swift 6.3.2 (
swift-6.3.2-RELEASE, via swiftly) - Xcode 27.0, macOS 27.0 (arm64)
Possibly relevant
The same project built green with skip-kit 1.1.1 on Xcode 26.6, and started failing after upgrading to Xcode 27.0 with no change to the Swift compiler version (6.3.2 both times) and no change to the resolved skip-kit version. I have not verified this by reverting Xcode, so I'm offering it as a correlation rather than a cause — it may just be that a newer SDK/resource dir changes when this file gets type-checked.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open Sources/SkipKit/SBOMView.swift and compare the SBOMPackageDetailView declaration around line 227 with its call site around line 137. Run swift build or swift test on the macOS host; done means the initializer is accessible and the host build and tests compile successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100