SBOMView: SBOMPackageDetailView memberwise init is private (@State private var) — breaks host swift build
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 88/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- swift
- Ambito
- build-system
Direzione di ricerca
Apri Sources/SkipKit/SBOMView.swift e confronta la dichiarazione di SBOMPackageDetailView intorno alla riga 227 con il suo punto di chiamata intorno alla riga 137. Esegui swift build o swift test sull’host macOS; il lavoro è completato quando l’initializer è accessibile e la compilazione dell’host e i test vengono compilati correttamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Swift
- Stelle
- 11
- Fork
- 11
- Merge medio
- 10h 17m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di skiptools/skip-kit
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di skiptools/skip-kit
Issue simili
-
AndroidAssetManager(env:peer:) in AssetURLProtocol.swift doesn't compile for Android on the Swift nightlyForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
erkamyaman/unslop-anything#579 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
erkamyaman/rust-anything#1311 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug priority:low status:queued
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno