Hi all,
I’m seeing what looks like a mismatch specifically when running tests via SwiftPM CLI (swift test), and I’m not sure whether this should be tracked as SwiftPM, Swift Testing, or RealityKit.
I made a minimal repro repo:
https://github.com/mesqueeb/swiftpm-realitykit-custom-component-repro
It’s intentionally tiny:
- one custom RealityKit component (
ReproComponent) - one tiny local USDA file with that custom component attached
- one test that loads the entity and checks raw-vs-typed component access
Repro command:
swift test --filter componentsPresentButNotDecodableInSwiftTest
Observed:
entity.components.has(ReproComponent.self) == trueentity.components[ReproComponent.self] == nil- test reports
raw=1,decoded=0
Expected:
- if
has(...)is true for that registered custom component, typed lookup should decode and return non-nil.
In my main project, this difference affects E2E behavior, and running via xcodebuild test appears to behave differently from swift test.
Question:
- Is this best reported/triaged from the SwiftPM side, or should I file/move this directly as a RealityKit issue (Feedback Assistant)?
- Any known constraints around custom component decoding in SwiftPM test runtime?
Thanks for any guidance.