Build Information
Failed to build HealthKitToFhir, reference master (3193ec
), with Swift 6.0 for macOS (SPM) on 28 Nov 2024 00:13:46 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Build Log
========================================
RunAll
========================================
Builder version: 4.58.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/microsoft/healthkit-to-fhir.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/microsoft/healthkit-to-fhir
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 3193ec9 Fixed issue with OS Version (#6)
Cloned https://github.com/microsoft/healthkit-to-fhir.git
Revision (git rev-parse @):
3193ec9772d21a0e7df3a917b8a7ed1d541ea20f
SUCCESS checkout https://github.com/microsoft/healthkit-to-fhir.git at master
Fetching https://github.com/smart-on-fhir/Swift-FHIR
[1/18089] Fetching swift-fhir
Fetched https://github.com/smart-on-fhir/Swift-FHIR from cache (1.76s)
Computing version for https://github.com/smart-on-fhir/Swift-FHIR
Computed https://github.com/smart-on-fhir/Swift-FHIR at 4.2.0 (0.55s)
Creating working copy for https://github.com/smart-on-fhir/Swift-FHIR
Working copy of https://github.com/smart-on-fhir/Swift-FHIR resolved at 4.2.0
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "healthkit-to-fhir",
"name": "HealthKitToFhir",
"url": "https://github.com/microsoft/healthkit-to-fhir.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/healthkit-to-fhir",
"dependencies": [
{
"identity": "swift-fhir",
"name": "FHIR",
"url": "https://github.com/smart-on-fhir/Swift-FHIR",
"version": "4.2.1",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Swift-FHIR",
"dependencies": [
]
}
]
}
]
}
Fetching https://github.com/microsoft/healthkit-to-fhir.git
[1/170] Fetching healthkit-to-fhir
Fetched https://github.com/microsoft/healthkit-to-fhir.git from cache (0.70s)
Fetching https://github.com/smart-on-fhir/Swift-FHIR from cache
Fetched https://github.com/smart-on-fhir/Swift-FHIR from cache (0.50s)
Computing version for https://github.com/smart-on-fhir/Swift-FHIR
Computed https://github.com/smart-on-fhir/Swift-FHIR at 4.2.1 (0.04s)
Creating working copy for https://github.com/microsoft/healthkit-to-fhir.git
Working copy of https://github.com/microsoft/healthkit-to-fhir.git resolved at master (3193ec9)
Creating working copy for https://github.com/smart-on-fhir/Swift-FHIR
Working copy of https://github.com/smart-on-fhir/Swift-FHIR resolved at 4.2.1
warning: '.resolve-product-dependencies': dependency 'healthkit-to-fhir' is not used by any target
Found 1 product dependencies
- FHIR
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/microsoft/healthkit-to-fhir.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/5] Write sources
[4/5] Write swift-version--7754E27361AE5C74.txt
[6/197] Compiling Models FHIRRequest.swift
[7/197] Compiling Models FHIRRequestHandler.swift
[8/197] Compiling Models FHIRServer.swift
[9/197] Compiling Models FHIRServerResponse.swift
[10/197] Compiling Models FHIRString.swift
[11/197] Compiling Models FHIRType.swift
[12/197] Compiling Models FHIRURL.swift
[13/197] Compiling Models FHIRValidationError.swift
[14/197] Compiling Models FamilyMemberHistory.swift
[15/197] Compiling Models Flag.swift
[16/197] Compiling Models Goal.swift
[17/197] Compiling Models GraphDefinition.swift
[18/197] Compiling Models Group.swift
[19/197] Compiling Models GuidanceResponse.swift
[20/197] Compiling Models HealthcareService.swift
[21/197] Compiling Models HumanName.swift
[22/197] Compiling Models Identifier.swift
[23/197] Compiling Models ImagingStudy.swift
[24/197] Compiling Models Immunization.swift
[25/197] Compiling Models ImmunizationEvaluation.swift
[26/197] Compiling Models ImmunizationRecommendation.swift
[27/197] Compiling Models MedicinalProductIngredient.swift
[28/197] Compiling Models MedicinalProductInteraction.swift
[29/197] Compiling Models MedicinalProductManufactured.swift
[30/197] Compiling Models MedicinalProductPackaged.swift
[31/197] Compiling Models MedicinalProductPharmaceutical.swift
[32/197] Compiling Models MedicinalProductUndesirableEffect.swift
[33/197] Compiling Models MessageDefinition.swift
[34/197] Compiling Models MessageHeader.swift
[35/197] Compiling Models Meta.swift
[36/197] Compiling Models MetadataResource.swift
[37/197] Compiling Models MolecularSequence.swift
[38/197] Compiling Models Money.swift
[39/197] Compiling Models NamingSystem.swift
[40/197] Compiling Models Narrative.swift
[41/197] Compiling Models NutritionOrder.swift
[42/197] Compiling Models Observation.swift
[43/197] Compiling Models ObservationDefinition.swift
[44/197] Compiling Models OperationDefinition.swift
[45/197] Compiling Models OperationOutcome.swift
[46/197] Compiling Models Organization.swift
[47/197] Compiling Models OrganizationAffiliation.swift
[48/218] Compiling Models ParameterDefinition.swift
[49/218] Compiling Models Parameters.swift
[50/218] Compiling Models Patient.swift
[51/218] Compiling Models PaymentNotice.swift
[52/218] Compiling Models PaymentReconciliation.swift
[53/218] Compiling Models Period.swift
[54/218] Compiling Models Person.swift
[55/218] Compiling Models PlanDefinition.swift
[56/218] Compiling Models Population.swift
[57/218] Compiling Models Practitioner.swift
[58/218] Compiling Models PractitionerRole.swift
[59/218] Compiling Models Procedure.swift
[60/218] Compiling Models ProdCharacteristic.swift
[61/218] Compiling Models ProductShelfLife.swift
[62/218] Compiling Models Provenance.swift
[63/218] Compiling Models Quantity.swift
[64/218] Compiling Models Questionnaire.swift
[65/218] Compiling Models QuestionnaireResponse.swift
[66/218] Compiling Models Range.swift
[67/218] Compiling Models Ratio.swift
[68/218] Compiling Models Reference.swift
[69/218] Compiling Models RelatedArtifact.swift
[70/218] Compiling Models RelatedPerson.swift
[71/218] Compiling Models RequestGroup.swift
[72/218] Compiling Models ResearchDefinition.swift
[73/218] Compiling Models ResearchElementDefinition.swift
[74/218] Compiling Models ResearchStudy.swift
[75/218] Compiling Models ResearchSubject.swift
[76/218] Compiling Models Resource+Meta.swift
[77/218] Compiling Models Resource.swift
[78/218] Compiling Models RiskAssessment.swift
[79/218] Compiling Models RiskEvidenceSynthesis.swift
[80/218] Compiling Models SampledData.swift
[81/218] Compiling Models Schedule.swift
[82/218] Compiling Models SearchParameter.swift
[83/218] Compiling Models ServiceRequest.swift
[84/218] Compiling Models Signature.swift
[85/218] Compiling Models Slot.swift
[86/218] Compiling Models Specimen.swift
[87/218] Compiling Models SpecimenDefinition.swift
[88/218] Compiling Models StructureDefinition.swift
[89/218] Compiling Models StructureMap.swift
[90/218] Compiling Models Endpoint.swift
[91/218] Compiling Models EnrollmentRequest.swift
[92/218] Compiling Models EnrollmentResponse.swift
[93/218] Compiling Models EpisodeOfCare.swift
[94/218] Compiling Models EventDefinition.swift
[95/218] Compiling Models Evidence.swift
[96/218] Compiling Models EvidenceVariable.swift
[97/218] Compiling Models ExampleScenario.swift
[98/218] Compiling Models ExplanationOfBenefit.swift
[99/218] Compiling Models Expression.swift
[100/218] Compiling Models Extension.swift
[101/218] Compiling Models FHIRAbstractBase+Factory.swift
[102/218] Compiling Models FHIRAbstractBase.swift
[103/218] Compiling Models FHIRAbstractResource.swift
[104/218] Compiling Models FHIRBool.swift
[105/218] Compiling Models FHIRCanonical.swift
[106/218] Compiling Models FHIRDecimal.swift
[107/218] Compiling Models FHIREnum.swift
[108/218] Compiling Models FHIRError.swift
[109/218] Compiling Models FHIRInteger.swift
[110/218] Compiling Models FHIRPrimitive.swift
[111/218] Compiling Models CoverageEligibilityRequest.swift
[112/218] Compiling Models CoverageEligibilityResponse.swift
[113/218] Compiling Models DataRequirement.swift
[114/218] Compiling Models DateAndTime.swift
[115/218] Compiling Models DetectedIssue.swift
[116/218] Compiling Models Device.swift
[117/218] Compiling Models DeviceDefinition.swift
[118/218] Compiling Models DeviceMetric.swift
[119/218] Compiling Models DeviceRequest.swift
[120/218] Compiling Models DeviceUseStatement.swift
[121/218] Compiling Models DiagnosticReport.swift
[122/218] Compiling Models Distance.swift
[123/218] Compiling Models DocumentManifest.swift
[124/218] Compiling Models DocumentReference.swift
[125/218] Compiling Models DomainResource.swift
[126/218] Compiling Models Dosage.swift
[127/218] Compiling Models Duration.swift
[128/218] Compiling Models EffectEvidenceSynthesis.swift
[129/218] Compiling Models Element.swift
[130/218] Compiling Models ElementDefinition.swift
[131/218] Compiling Models Encounter.swift
[132/218] Compiling Models Account.swift
[133/218] Compiling Models ActivityDefinition.swift
[134/218] Compiling Models Address.swift
[135/218] Compiling Models AdverseEvent.swift
[136/218] Compiling Models Age.swift
[137/218] Compiling Models AllergyIntolerance.swift
[138/218] Compiling Models Annotation.swift
[139/218] Compiling Models Appointment.swift
[140/218] Compiling Models AppointmentResponse.swift
[141/218] Compiling Models Attachment.swift
[142/218] Compiling Models AuditEvent.swift
[143/218] Compiling Models BackboneElement.swift
[144/218] Compiling Models Base64Binary.swift
[145/218] Compiling Models Basic.swift
[146/218] Compiling Models Binary.swift
[147/218] Compiling Models BiologicallyDerivedProduct.swift
[148/218] Compiling Models BodyStructure.swift
[149/218] Compiling Models Bundle.swift
[150/218] Compiling Models CapabilityStatement.swift
[151/218] Compiling Models CarePlan.swift
[152/218] Compiling Models CareTeam.swift
[153/218] Compiling Models CatalogEntry.swift
[154/218] Compiling Models ChargeItem.swift
[155/218] Compiling Models ChargeItemDefinition.swift
[156/218] Compiling Models Claim.swift
[157/218] Compiling Models ClaimResponse.swift
[158/218] Compiling Models ClinicalImpression.swift
[159/218] Compiling Models CodeSystem.swift
[160/218] Compiling Models CodeSystems.swift
[161/218] Compiling Models CodeableConcept.swift
[162/218] Compiling Models Coding.swift
[163/218] Compiling Models Communication.swift
[164/218] Compiling Models CommunicationRequest.swift
[165/218] Compiling Models CompartmentDefinition.swift
[166/218] Compiling Models Composition.swift
[167/218] Compiling Models ConceptMap.swift
[168/218] Compiling Models Condition.swift
[169/218] Compiling Models Consent.swift
[170/218] Compiling Models ContactDetail.swift
[171/218] Compiling Models ContactPoint.swift
[172/218] Compiling Models Contract.swift
[173/218] Compiling Models Contributor.swift
[174/218] Compiling Models Count.swift
[175/218] Compiling Models Coverage.swift
[176/218] Compiling Models Subscription.swift
[177/218] Compiling Models Substance.swift
[178/218] Compiling Models SubstanceAmount.swift
[179/218] Compiling Models SubstanceNucleicAcid.swift
[180/218] Compiling Models SubstancePolymer.swift
[181/218] Compiling Models SubstanceProtein.swift
[182/218] Compiling Models SubstanceReferenceInformation.swift
[183/218] Compiling Models SubstanceSourceMaterial.swift
[184/218] Compiling Models SubstanceSpecification.swift
[185/218] Compiling Models SupplyDelivery.swift
[186/218] Compiling Models SupplyRequest.swift
[187/218] Compiling Models Task.swift
[188/218] Compiling Models TerminologyCapabilities.swift
[189/218] Compiling Models TestReport.swift
[190/218] Compiling Models TestScript.swift
[191/218] Compiling Models Timing.swift
[192/218] Compiling Models TriggerDefinition.swift
[193/218] Compiling Models UsageContext.swift
[194/218] Compiling Models ValueSet.swift
[195/218] Compiling Models VerificationResult.swift
[196/218] Compiling Models VisionPrescription.swift
[197/218] Compiling Models ImplementationGuide.swift
[198/218] Compiling Models InsurancePlan.swift
[199/218] Compiling Models Invoice.swift
[200/218] Compiling Models Library.swift
[201/218] Compiling Models Linkage.swift
[202/218] Compiling Models List.swift
[203/218] Compiling Models Location.swift
[204/218] Compiling Models MarketingStatus.swift
[205/218] Compiling Models Measure.swift
[206/218] Compiling Models MeasureReport.swift
[207/218] Compiling Models Media.swift
[208/218] Compiling Models Medication.swift
[209/218] Compiling Models MedicationAdministration.swift
[210/218] Compiling Models MedicationDispense.swift
[211/218] Compiling Models MedicationKnowledge.swift
[212/218] Compiling Models MedicationRequest.swift
[213/218] Compiling Models MedicationStatement.swift
[214/218] Compiling Models MedicinalProduct.swift
[215/218] Compiling Models MedicinalProductAuthorization.swift
[216/218] Compiling Models MedicinalProductContraindication.swift
[217/218] Compiling Models MedicinalProductIndication.swift
[218/218] Emitting module Models
[219/235] Compiling Client Resource+REST.swift
[220/235] Compiling Client Reference+Resolving.swift
[221/235] Compiling Client Resource+Instantiation.swift
[222/235] Compiling Client Resource+Operation.swift
[223/236] Compiling Client ValueSet+Localization.swift
[224/236] Compiling Client FHIRString+Localization.swift
[225/236] Compiling Client Patient+SMART.swift
[226/236] Compiling Client FHIROpenServer.swift
[227/236] Compiling Client FHIROperation.swift
[228/236] Compiling Client FHIRBaseRequestHandler.swift
[229/236] Compiling Client FHIRBaseServer.swift
[230/236] Compiling Client FHIRCanonical+Resolving.swift
[231/236] Compiling Client FHIRMinimalServer.swift
[232/236] Emitting module Client
[233/236] Compiling Client DomainResource+Containment.swift
[234/236] Compiling Client Element+Extensions.swift
[235/236] Compiling Client FHIRSearch.swift
[236/236] Compiling Client FHIRServerDataResponse.swift
[237/238] Compiling FHIR SwiftFHIR.swift
[238/238] Emitting module FHIR
[239/247] Compiling HealthKitToFhir DeviceFactory.swift
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:15:42: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
16 | guard T.self is Device.Type else {
17 | throw ConversionError.incorrectTypeForFactory
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:23:35: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
21 | }
22 |
23 | open func device(from object: HKObject) throws -> Device {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
24 | let device = Device()
25 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:63:62: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
61 | /// - device: The Device object that the UDI should be added to.
62 | /// - object: The HKObject.
63 | open func addUdiDeviceIdentifier(device: Device, object: HKObject) {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
64 | var udiCarrier = device.udiCarrier ?? [DeviceUdiCarrier]()
65 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:81:51: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:116:48: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
114 | /// - device: The Device object that the name information should be added to.
115 | /// - object: The HKObject.
116 | open func addNames(device: Device, object: HKObject) {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
117 | var deviceNames = device.deviceName ?? [DeviceDeviceName]()
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:27:109: error: 'sourceRevision' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
21 | }
22 |
23 | open func device(from object: HKObject) throws -> Device {
| `- note: add @available attribute to enclosing instance method
24 | let device = Device()
25 |
26 | // Add the sourceRevision.source.bundleIdentifier as the Device identifier.
27 | device.identifier = [try identifier(system: FactoryBase.healthKitIdentifierSystemKey, value: object.sourceRevision.source.bundleIdentifier)]
| |- error: 'sourceRevision' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
28 |
29 | // Add the local identifier to the device
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:30:40: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
21 | }
22 |
23 | open func device(from object: HKObject) throws -> Device {
| `- note: add @available attribute to enclosing instance method
24 | let device = Device()
25 |
:
28 |
29 | // Add the local identifier to the device
30 | if let localIdentifer = object.device?.localIdentifier {
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
31 | let codeableConcept = CodeableConcept()
32 | codeableConcept.coding = [try coding(system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.localIdentifier).keyPath)]
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:32:130: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
21 | }
22 |
23 | open func device(from object: HKObject) throws -> Device {
| `- note: add @available attribute to enclosing instance method
24 | let device = Device()
25 |
:
30 | if let localIdentifer = object.device?.localIdentifier {
31 | let codeableConcept = CodeableConcept()
32 | codeableConcept.coding = [try coding(system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.localIdentifier).keyPath)]
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
33 | device.identifier?.append(identifier(type: codeableConcept, value: localIdentifer))
34 | }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:37:38: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
21 | }
22 |
23 | open func device(from object: HKObject) throws -> Device {
| `- note: add @available attribute to enclosing instance method
24 | let device = Device()
25 |
:
35 |
36 | // Add the manufacturer.
37 | if let manufacturer = object.device?.manufacturer {
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
38 | device.manufacturer = FHIRString(manufacturer)
39 | }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:42:31: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
21 | }
22 |
23 | open func device(from object: HKObject) throws -> Device {
| `- note: add @available attribute to enclosing instance method
24 | let device = Device()
25 |
:
40 |
41 | // Add the model.
42 | if let model = object.device?.model {
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
43 | device.modelNumber = FHIRString(model)
44 | }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:66:45: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
61 | /// - device: The Device object that the UDI should be added to.
62 | /// - object: The HKObject.
63 | open func addUdiDeviceIdentifier(device: Device, object: HKObject) {
| `- note: add @available attribute to enclosing instance method
64 | var udiCarrier = device.udiCarrier ?? [DeviceUdiCarrier]()
65 |
66 | if let udiDeviceIdentifier = object.device?.udiDeviceIdentifier {
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
67 | let udiDeviceCarrier = DeviceUdiCarrier()
68 | udiDeviceCarrier.entryType = .selfReported
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:85:32: error: 'sourceRevision' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
84 | // Add the operatingSystemVersion from the sourceRevision
85 | let osVersion = object.sourceRevision.operatingSystemVersion
| |- error: 'sourceRevision' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
86 | deviceVersions.append(try deviceVersion(version: "\(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)", system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.operatingSystemVersion).keyPath))
87 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:85:47: error: 'operatingSystemVersion' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
84 | // Add the operatingSystemVersion from the sourceRevision
85 | let osVersion = object.sourceRevision.operatingSystemVersion
| |- error: 'operatingSystemVersion' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
86 | deviceVersions.append(try deviceVersion(version: "\(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)", system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.operatingSystemVersion).keyPath))
87 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:86:219: error: 'sourceRevision' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
84 | // Add the operatingSystemVersion from the sourceRevision
85 | let osVersion = object.sourceRevision.operatingSystemVersion
86 | deviceVersions.append(try deviceVersion(version: "\(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)", system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.operatingSystemVersion).keyPath))
| |- error: 'sourceRevision' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
87 |
88 | // Add the version from the sourceRevision
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:86:234: error: 'operatingSystemVersion' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
84 | // Add the operatingSystemVersion from the sourceRevision
85 | let osVersion = object.sourceRevision.operatingSystemVersion
86 | deviceVersions.append(try deviceVersion(version: "\(osVersion.majorVersion).\(osVersion.minorVersion).\(osVersion.patchVersion)", system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.operatingSystemVersion).keyPath))
| |- error: 'operatingSystemVersion' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
87 |
88 | // Add the version from the sourceRevision
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:89:33: error: 'sourceRevision' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
:
87 |
88 | // Add the version from the sourceRevision
89 | if let version = object.sourceRevision.version {
| |- error: 'sourceRevision' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
90 | deviceVersions.append(try deviceVersion(version: version, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.version).keyPath))
91 | }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:90:151: error: 'sourceRevision' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
:
88 | // Add the version from the sourceRevision
89 | if let version = object.sourceRevision.version {
90 | deviceVersions.append(try deviceVersion(version: version, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.sourceRevision.version).keyPath))
| |- error: 'sourceRevision' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
91 | }
92 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:94:41: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
:
92 |
93 | // Add the firmware version from the device.
94 | if let firmwareVersion = object.device?.firmwareVersion {
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
95 | deviceVersions.append(try deviceVersion(version: firmwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.firmwareVersion).keyPath))
96 | }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:95:159: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
:
93 | // Add the firmware version from the device.
94 | if let firmwareVersion = object.device?.firmwareVersion {
95 | deviceVersions.append(try deviceVersion(version: firmwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.firmwareVersion).keyPath))
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
96 | }
97 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:99:41: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
:
97 |
98 | // Add the hardware version from the device.
99 | if let hardwareVersion = object.device?.hardwareVersion {
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
100 | deviceVersions.append(try deviceVersion(version: hardwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.hardwareVersion).keyPath))
101 | }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:100:159: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
:
98 | // Add the hardware version from the device.
99 | if let hardwareVersion = object.device?.hardwareVersion {
100 | deviceVersions.append(try deviceVersion(version: hardwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.hardwareVersion).keyPath))
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
101 | }
102 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:104:41: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
:
102 |
103 | // Add the software version from the device.
104 | if let softwareVersion = object.device?.softwareVersion {
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
105 | deviceVersions.append(try deviceVersion(version: softwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.softwareVersion).keyPath))
106 | }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:105:159: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
:
103 | // Add the software version from the device.
104 | if let softwareVersion = object.device?.softwareVersion {
105 | deviceVersions.append(try deviceVersion(version: softwareVersion, system: Constants.hkObjectSystemValue, code: NSExpression(forKeyPath: \HKObject.device?.softwareVersion).keyPath))
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
106 | }
107 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:120:69: error: 'sourceRevision' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
114 | /// - device: The Device object that the name information should be added to.
115 | /// - object: The HKObject.
116 | open func addNames(device: Device, object: HKObject) {
| `- note: add @available attribute to enclosing instance method
117 | var deviceNames = device.deviceName ?? [DeviceDeviceName]()
118 |
119 | // Add the name from the source.
120 | deviceNames.append(DeviceDeviceName(name: FHIRString(object.sourceRevision.source.name), type: .userFriendlyName))
| |- error: 'sourceRevision' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
121 |
122 | // Add the name from the device.
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:123:30: error: 'device' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
114 | /// - device: The Device object that the name information should be added to.
115 | /// - object: The HKObject.
116 | open func addNames(device: Device, object: HKObject) {
| `- note: add @available attribute to enclosing instance method
117 | var deviceNames = device.deviceName ?? [DeviceDeviceName]()
118 |
:
121 |
122 | // Add the name from the device.
123 | if let name = object.device?.name {
| |- error: 'device' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
124 | deviceNames.append(DeviceDeviceName(name: FHIRString(name), type: .modelName))
125 | }
[240/247] Compiling HealthKitToFhir Constants.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[241/247] Compiling HealthKitToFhir FactoryBase.swift
[242/247] Compiling HealthKitToFhir ConfigurationError.swift
[243/247] Compiling HealthKitToFhir ConversionError.swift
[244/247] Compiling HealthKitToFhir Configurations.swift
[245/247] Compiling HealthKitToFhir ResourceFactoryProtocol.swift
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ResourceFactoryProtocol.swift:24:35: error: 'HKObject' is only available in macOS 13.0 or newer
10 | import FHIR
11 |
12 | public protocol ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing protocol
13 |
14 | /// The Apple Health App bundle id used as the identifier system key when creating resources
:
22 | /// - ConversionError: Will throw if a required value is not mapped properly in the config, the type is not supported, or the factory cannot handle the given resource.
23 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
24 | func resource<T>(from object: HKObject) throws -> T
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
25 | }
26 |
[246/247] Emitting module HealthKitToFhir
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:15:42: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
16 | guard T.self is Device.Type else {
17 | throw ConversionError.incorrectTypeForFactory
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:23:35: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
21 | }
22 |
23 | open func device(from object: HKObject) throws -> Device {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
24 | let device = Device()
25 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:63:62: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
61 | /// - device: The Device object that the UDI should be added to.
62 | /// - object: The HKObject.
63 | open func addUdiDeviceIdentifier(device: Device, object: HKObject) {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
64 | var udiCarrier = device.udiCarrier ?? [DeviceUdiCarrier]()
65 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:81:51: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
79 | /// - device: The Device object that the version information should be added to.
80 | /// - object: The HKObject.
81 | open func addVersions(device: Device, object: HKObject) throws {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
82 | var deviceVersions = device.version ?? [DeviceVersion]()
83 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/DeviceFactory.swift:116:48: error: 'HKObject' is only available in macOS 13.0 or newer
11 |
12 | /// Class that handles the conversion of Apple HealthKit HKSourceRevision objects to FHIR.Device types
13 | open class DeviceFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
14 |
15 | public func resource<T>(from object: HKObject) throws -> T {
:
114 | /// - device: The Device object that the name information should be added to.
115 | /// - object: The HKObject.
116 | open func addNames(device: Device, object: HKObject) {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
117 | var deviceNames = device.deviceName ?? [DeviceDeviceName]()
118 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:29:42: error: 'HKObject' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
27 | }
28 |
29 | public func resource<T>(from object: HKObject) throws -> T {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
30 | guard T.self is Observation.Type else {
31 | throw ConversionError.incorrectTypeForFactory
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:44:40: error: 'HKObject' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
42 | /// - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
43 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
44 | open func observation(from object: HKObject) throws -> Observation {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
45 | guard let sample = object as? HKSample else {
46 | // The given type is not currently supported.
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:87:43: error: 'HKObjectType' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
85 | /// - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
86 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
87 | open func codeableConcept(objectType: HKObjectType) throws -> CodeableConcept {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
88 | guard let conversionValues = conversionMap[objectType.identifier] else {
89 | throw ConversionError.conversionNotDefinedForType(identifier: objectType.identifier)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:106:45: error: 'HKQuantitySample' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
104 | /// - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
105 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
106 | open func valueQuantity(quantitySample: HKQuantitySample) throws -> Quantity {
| | `- error: 'HKQuantitySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
107 | guard let conversionValues = conversionMap[quantitySample.quantityType.identifier] else {
108 | throw ConversionError.conversionNotDefinedForType(identifier: quantitySample.quantityType.identifier)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:130:38: error: 'HKCorrelation' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
128 | /// - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
129 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
130 | open func component(correlation: HKCorrelation ) throws -> [ObservationComponent] {
| | `- error: 'HKCorrelation' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
131 | var components: [ObservationComponent] = []
132 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:155:33: error: 'HKSample' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
153 | /// - Throws:
154 | /// - ConversionError: Will throw if the Date cannot be converted to either a FHIR.DateTime or a FHIR.Period
155 | open func effective(sample: HKSample) throws -> Any {
| | `- error: 'HKSample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
156 | let timeZoneString = sample.metadata?[HKMetadataKeyTimeZone] as? String
157 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ResourceFactoryProtocol.swift:24:35: error: 'HKObject' is only available in macOS 13.0 or newer
10 | import FHIR
11 |
12 | public protocol ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing protocol
13 |
14 | /// The Apple Health App bundle id used as the identifier system key when creating resources
:
22 | /// - ConversionError: Will throw if a required value is not mapped properly in the config, the type is not supported, or the factory cannot handle the given resource.
23 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
24 | func resource<T>(from object: HKObject) throws -> T
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
25 | }
26 |
[247/247] Compiling HealthKitToFhir ObservationFactory.swift
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:29:42: error: 'HKObject' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
27 | }
28 |
29 | public func resource<T>(from object: HKObject) throws -> T {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
30 | guard T.self is Observation.Type else {
31 | throw ConversionError.incorrectTypeForFactory
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:44:40: error: 'HKObject' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
42 | /// - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
43 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
44 | open func observation(from object: HKObject) throws -> Observation {
| | `- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
45 | guard let sample = object as? HKSample else {
46 | // The given type is not currently supported.
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:87:43: error: 'HKObjectType' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
85 | /// - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
86 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
87 | open func codeableConcept(objectType: HKObjectType) throws -> CodeableConcept {
| | `- error: 'HKObjectType' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
88 | guard let conversionValues = conversionMap[objectType.identifier] else {
89 | throw ConversionError.conversionNotDefinedForType(identifier: objectType.identifier)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:106:45: error: 'HKQuantitySample' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
104 | /// - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
105 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
106 | open func valueQuantity(quantitySample: HKQuantitySample) throws -> Quantity {
| | `- error: 'HKQuantitySample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
107 | guard let conversionValues = conversionMap[quantitySample.quantityType.identifier] else {
108 | throw ConversionError.conversionNotDefinedForType(identifier: quantitySample.quantityType.identifier)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:130:38: error: 'HKCorrelation' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
128 | /// - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
129 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
130 | open func component(correlation: HKCorrelation ) throws -> [ObservationComponent] {
| | `- error: 'HKCorrelation' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
131 | var components: [ObservationComponent] = []
132 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:155:33: error: 'HKSample' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
153 | /// - Throws:
154 | /// - ConversionError: Will throw if the Date cannot be converted to either a FHIR.DateTime or a FHIR.Period
155 | open func effective(sample: HKSample) throws -> Any {
| | `- error: 'HKSample' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
156 | let timeZoneString = sample.metadata?[HKMetadataKeyTimeZone] as? String
157 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:45:39: error: 'HKSample' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
42 | /// - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
43 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
44 | open func observation(from object: HKObject) throws -> Observation {
| `- note: add @available attribute to enclosing instance method
45 | guard let sample = object as? HKSample else {
| |- error: 'HKSample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
46 | // The given type is not currently supported.
47 | throw ConversionError.unsupportedType(identifier: String(describing: HKObject.self))
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:47:82: error: 'HKObject' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
42 | /// - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
43 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
44 | open func observation(from object: HKObject) throws -> Observation {
| `- note: add @available attribute to enclosing instance method
45 | guard let sample = object as? HKSample else {
46 | // The given type is not currently supported.
47 | throw ConversionError.unsupportedType(identifier: String(describing: HKObject.self))
| |- error: 'HKObject' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
48 | }
49 |
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:52:44: error: 'HKQuantitySample' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
42 | /// - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
43 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
44 | open func observation(from object: HKObject) throws -> Observation {
| `- note: add @available attribute to enclosing instance method
45 | guard let sample = object as? HKSample else {
46 | // The given type is not currently supported.
:
50 | let observation = Observation()
51 |
52 | if let quantitySample = sample as? HKQuantitySample {
| |- error: 'HKQuantitySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
53 | // The sample is a quantity sample - create a valueQuantity (conversion data provided in the Config).
54 | observation.valueQuantity = try self.valueQuantity(quantitySample: quantitySample)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:56:46: error: 'HKCorrelation' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
42 | /// - ConversionError: Will throw if a required value is not mapped properly in the config or the sample type is not supported.
43 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
44 | open func observation(from object: HKObject) throws -> Observation {
| `- note: add @available attribute to enclosing instance method
45 | guard let sample = object as? HKSample else {
46 | // The given type is not currently supported.
:
54 | observation.valueQuantity = try self.valueQuantity(quantitySample: quantitySample)
55 | }
56 | else if let correlation = sample as? HKCorrelation {
| |- error: 'HKCorrelation' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
57 | // The sample is a correlation - create components with the appropriate values (conversion data provided in the Config).
58 | observation.component = try self.component(correlation: correlation)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:119:77: error: 'HKUnit' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
104 | /// - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
105 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
106 | open func valueQuantity(quantitySample: HKQuantitySample) throws -> Quantity {
| `- note: add @available attribute to enclosing instance method
107 | guard let conversionValues = conversionMap[quantitySample.quantityType.identifier] else {
108 | throw ConversionError.conversionNotDefinedForType(identifier: quantitySample.quantityType.identifier)
:
117 | }
118 |
119 | json[Constants.valueKey] = quantitySample.quantity.doubleValue(for: HKUnit.init(from: unitString))
| |- error: 'HKUnit' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
120 | return try Quantity(json: json)
121 | }
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:134:48: error: 'HKQuantitySample' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
128 | /// - ConversionError: Will throw if the Config does not contain conversion information for the given type or a required value is not provided.
129 | /// - FHIRValidationError: Will throw if the conversion process yeilds an invalid FHIR object.
130 | open func component(correlation: HKCorrelation ) throws -> [ObservationComponent] {
| `- note: add @available attribute to enclosing instance method
131 | var components: [ObservationComponent] = []
132 |
133 | for sample in correlation.objects {
134 | if let quantitySample = sample as? HKQuantitySample {
| |- error: 'HKQuantitySample' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
135 | let codeableConcept = try self.codeableConcept(objectType: quantitySample.sampleType)
136 | let component = ObservationComponent(code: codeableConcept)
/Users/admin/builder/spi-builder-workspace/Sources/Factories/ObservationFactory.swift:156:47: error: 'HKMetadataKeyTimeZone' is only available in macOS 13.0 or newer
12 |
13 | /// Class that handles the conversion of Apple HealthKit objects to FHIR.Observation types
14 | open class ObservationFactory : FactoryBase, ResourceFactoryProtocol {
| `- note: add @available attribute to enclosing class
15 |
16 | /// Initializes a new ObservationFactory object.
:
153 | /// - Throws:
154 | /// - ConversionError: Will throw if the Date cannot be converted to either a FHIR.DateTime or a FHIR.Period
155 | open func effective(sample: HKSample) throws -> Any {
| `- note: add @available attribute to enclosing instance method
156 | let timeZoneString = sample.metadata?[HKMetadataKeyTimeZone] as? String
| |- error: 'HKMetadataKeyTimeZone' is only available in macOS 13.0 or newer
| `- note: add 'if #available' version check
157 |
158 | if (sample.startDate == sample.endDate),
BUILD FAILURE 6.0 macosSpm