Build Information
Failed to build HostingView, reference main (3259f8), with Swift 6.1 for macOS (SPM) on 17 Nov 2025 07:48:02 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64Build Log
========================================
RunAll
========================================
Builder version: 4.68.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/Jaesung-Jung/HostingView.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/Jaesung-Jung/HostingView
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 3259f81 Fix layout error
Cloned https://github.com/Jaesung-Jung/HostingView.git
Revision (git rev-parse @):
3259f81b50932279a1bae2d9f6d5bcae9d4c21db
SUCCESS checkout https://github.com/Jaesung-Jung/HostingView.git at main
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/Jaesung-Jung/HostingView.git
https://github.com/Jaesung-Jung/HostingView.git
{
"dependencies" : [
],
"manifest_display_name" : "HostingView",
"name" : "HostingView",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "16.0"
},
{
"name" : "maccatalyst",
"version" : "16.0"
},
{
"name" : "tvos",
"version" : "16.0"
},
{
"name" : "visionos",
"version" : "1.0"
}
],
"products" : [
{
"name" : "HostingView",
"targets" : [
"HostingView"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "HostingView",
"module_type" : "SwiftTarget",
"name" : "HostingView",
"path" : "Sources/HostingView",
"product_memberships" : [
"HostingView"
],
"sources" : [
"HostingView.swift",
"StatefulHostingView.swift"
],
"type" : "library"
}
],
"tools_version" : "6.0"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
[3/5] Compiling HostingView StatefulHostingView.swift
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:27:33: error: cannot find type 'UIView' in scope
25 |
26 | public class StatefulHostingView<State>: UIView {
27 | private(set) var contentView: UIView!
| `- error: cannot find type 'UIView' in scope
28 | let stateObject: StateObject
29 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:35:23: error: property does not override any property from its superclass
33 | }
34 |
35 | public override var intrinsicContentSize: CGSize {
| `- error: property does not override any property from its superclass
36 | contentView.intrinsicContentSize
37 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:39:39: error: cannot find type 'UIEdgeInsets' in scope
37 | }
38 |
39 | public override var safeAreaInsets: UIEdgeInsets {
| `- error: cannot find type 'UIEdgeInsets' in scope
40 | get { .zero }
41 | set {}
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:44:24: error: 'View' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
:
42 | }
43 |
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:44:45: error: 'ViewBuilder' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
:
42 | }
43 |
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:68:24: error: method does not override any method from its superclass
66 | }
67 |
68 | public override func layoutSubviews() {
| `- error: method does not override any method from its superclass
69 | super.layoutSubviews()
70 | contentView.frame = bounds
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:26:42: error: cannot find type 'UIView' in scope
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- error: cannot find type 'UIView' in scope
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:78:6: error: 'ObservedObject' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| |- note: add @available attribute to enclosing generic struct
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
| `- error: 'ObservedObject' is only available in macOS 10.15 or newer
79 |
80 | let content: (State) -> Content
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:82:20: error: 'View' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
79 |
80 | let content: (State) -> Content
81 |
82 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
83 | content(stateObject.state)
84 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:77:39: error: 'View' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing generic struct
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
79 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:92:6: error: 'Published' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
| `- error: 'Published' is only available in macOS 10.15 or newer
93 |
94 | init(state: State) {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:91:22: error: 'ObservableObject' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
93 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:103:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
101 |
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:104:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
105 | VStack {
106 | Text("Stateful Hosting View")
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:5: error: 'VStack' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: 'VStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: 'Text' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:10: error: 'font' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:16: error: 'headline' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'headline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:108:10: error: 'fontWeight' is only available in macOS 10.15 or newer
106 | Text("Stateful Hosting View")
107 | .font(.headline)
108 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
109 |
110 | Text("State is \(state)")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: 'Text' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:10: error: 'font' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:16: error: 'subheadline' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'subheadline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:112:10: error: 'fontWeight' is only available in macOS 10.15 or newer
110 | Text("State is \(state)")
111 | .font(.subheadline)
112 | .fontWeight(.medium)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
113 | .foregroundStyle(.secondary)
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:10: error: 'foregroundStyle' is only available in macOS 14.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:27: error: 'secondary' is only available in macOS 12.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'secondary' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:128:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
126 |
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
130 | Text("Hosting View")
131 | .font(.largeTitle)
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: 'Text' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:8: error: 'font' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:14: error: 'largeTitle' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'largeTitle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:132:8: error: 'fontWeight' is only available in macOS 10.15 or newer
130 | Text("Hosting View")
131 | .font(.largeTitle)
132 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
133 | .foregroundStyle(
134 | .linearGradient(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:133:8: error: 'foregroundStyle' is only available in macOS 14.0 or newer
131 | .font(.largeTitle)
132 | .fontWeight(.black)
133 | .foregroundStyle(
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:134:10: error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
132 | .fontWeight(.black)
133 | .foregroundStyle(
134 | .linearGradient(
| |- error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
136 | startPoint: .topLeading,
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:21: error: 'cyan' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'cyan' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:28: error: 'indigo' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'indigo' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:37: error: 'pink' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'pink' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:44: error: 'orange' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'orange' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:53: error: 'yellow' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'yellow' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:15: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:32:11: error: setter for 'state' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
29 |
30 | public var state: State {
| `- note: add @available attribute to enclosing property
31 | get { stateObject.state }
32 | set { stateObject.state = newValue }
| |- error: setter for 'state' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
33 | }
34 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:46:5: error: 'super' cannot be used in class 'StatefulHostingView' because it has no superclass
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
| `- error: 'super' cannot be used in class 'StatefulHostingView' because it has no superclass
47 | let invalidateSize: @MainActor () -> Void = { [weak self] in
48 | self?.invalidateIntrinsicContentSize()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:46:24: error: cannot infer contextual base in reference to member 'zero'
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
| `- error: cannot infer contextual base in reference to member 'zero'
47 | let invalidateSize: @MainActor () -> Void = { [weak self] in
48 | self?.invalidateIntrinsicContentSize()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:48:13: error: value of type 'StatefulHostingView<State>' has no member 'invalidateIntrinsicContentSize'
46 | super.init(frame: .zero)
47 | let invalidateSize: @MainActor () -> Void = { [weak self] in
48 | self?.invalidateIntrinsicContentSize()
| `- error: value of type 'StatefulHostingView<State>' has no member 'invalidateIntrinsicContentSize'
49 | }
50 | contentView = UIHostingConfiguration {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:50:19: error: cannot find 'UIHostingConfiguration' in scope
48 | self?.invalidateIntrinsicContentSize()
49 | }
50 | contentView = UIHostingConfiguration {
| `- error: cannot find 'UIHostingConfiguration' in scope
51 | HostingView.HostingLayout(invalidateSize) {
52 | StatefulContentView(stateObject: stateObject, content: content)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:57:15: error: cannot infer contextual base in reference to member 'all'
55 | .ignoresSafeArea()
56 | }
57 | .margins(.all, 0)
| `- error: cannot infer contextual base in reference to member 'all'
58 | .makeContentView()
59 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:60:5: error: cannot find 'addSubview' in scope
58 | .makeContentView()
59 |
60 | addSubview(contentView)
| `- error: cannot find 'addSubview' in scope
61 | }
62 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:69:5: error: 'super' cannot be used in class 'StatefulHostingView' because it has no superclass
67 |
68 | public override func layoutSubviews() {
69 | super.layoutSubviews()
| `- error: 'super' cannot be used in class 'StatefulHostingView' because it has no superclass
70 | contentView.frame = bounds
71 | }
<unknown>:0: error: cannot convert value of type 'any KeyPath<StatefulHostingView<State>.StateObject, State> & Sendable' to expected argument type 'ReferenceWritableKeyPath<StatefulHostingView<State>.StateObject, State>'
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:70:25: error: cannot find 'bounds' in scope
68 | public override func layoutSubviews() {
69 | super.layoutSubviews()
70 | contentView.frame = bounds
| `- error: cannot find 'bounds' in scope
71 | }
72 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:95:7: error: setter for 'state' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
93 |
94 | init(state: State) {
| `- note: add @available attribute to enclosing initializer
95 | self.state = state
| |- error: setter for 'state' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
96 | }
97 | }
macro expansion #Preview:20:19: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
`- /Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:116:2: note: expanded code originates here
114 | }
115 | }
116 | }
+--- macro expansion #Preview --------------------------------------
|18 | }
|19 | return __b_buildView {
|20 | StatefulHostingView(state: Int.random(in: 0 ..< 9)) { state in
| | `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
|21 | VStack {
|22 | Text("Stateful Hosting View")
+-------------------------------------------------------------------
117 |
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
error: emit-module command failed with exit code 1 (use -v to see invocation)
[4/5] Emitting module HostingView
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:27:33: error: cannot find type 'UIView' in scope
25 |
26 | public class HostingView: UIView {
27 | private(set) var contentView: UIView!
| `- error: cannot find type 'UIView' in scope
28 |
29 | public override var intrinsicContentSize: CGSize {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:29:23: error: property does not override any property from its superclass
27 | private(set) var contentView: UIView!
28 |
29 | public override var intrinsicContentSize: CGSize {
| `- error: property does not override any property from its superclass
30 | contentView.intrinsicContentSize
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:33:39: error: cannot find type 'UIEdgeInsets' in scope
31 | }
32 |
33 | public override var safeAreaInsets: UIEdgeInsets {
| `- error: cannot find type 'UIEdgeInsets' in scope
34 | get { .zero }
35 | set {}
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:38:24: error: 'View' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- note: add @available attribute to enclosing class
27 | private(set) var contentView: UIView!
28 |
:
36 | }
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
39 | super.init(frame: .zero)
40 | let content = content()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:38:31: error: 'ViewBuilder' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- note: add @available attribute to enclosing class
27 | private(set) var contentView: UIView!
28 |
:
36 | }
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
39 | super.init(frame: .zero)
40 | let content = content()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:62:24: error: method does not override any method from its superclass
60 | }
61 |
62 | public override func layoutSubviews() {
| `- error: method does not override any method from its superclass
63 | super.layoutSubviews()
64 | contentView.frame = bounds
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:26:27: error: cannot find type 'UIView' in scope
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- error: cannot find type 'UIView' in scope
27 | private(set) var contentView: UIView!
28 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:82:46: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
80 | }
81 |
82 | @inlinable func hash(_ proposedViewSize: ProposedViewSize) -> Int {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
83 | var hasher = Hasher()
84 | hasher.combine(proposedViewSize.width)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:89:33: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
87 | }
88 |
89 | func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) -> CGSize {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
90 | let key = hash(proposal)
91 | if let cacheSize = cache.sizes[key] {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:99:53: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:128:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
126 |
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
130 | Text("Hosting View")
131 | .font(.largeTitle)
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: 'Text' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:8: error: 'font' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:14: error: 'largeTitle' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'largeTitle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:132:8: error: 'fontWeight' is only available in macOS 10.15 or newer
130 | Text("Hosting View")
131 | .font(.largeTitle)
132 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
133 | .foregroundStyle(
134 | .linearGradient(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:133:8: error: 'foregroundStyle' is only available in macOS 14.0 or newer
131 | .font(.largeTitle)
132 | .fontWeight(.black)
133 | .foregroundStyle(
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:134:10: error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
132 | .fontWeight(.black)
133 | .foregroundStyle(
134 | .linearGradient(
| |- error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
136 | startPoint: .topLeading,
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:21: error: 'cyan' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'cyan' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:28: error: 'indigo' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'indigo' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:37: error: 'pink' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'pink' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:44: error: 'orange' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'orange' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:53: error: 'yellow' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'yellow' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:15: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:103:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
101 |
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:104:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
105 | VStack {
106 | Text("Stateful Hosting View")
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:5: error: 'VStack' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: 'VStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: 'Text' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:10: error: 'font' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:16: error: 'headline' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'headline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:108:10: error: 'fontWeight' is only available in macOS 10.15 or newer
106 | Text("Stateful Hosting View")
107 | .font(.headline)
108 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
109 |
110 | Text("State is \(state)")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: 'Text' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:10: error: 'font' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:16: error: 'subheadline' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'subheadline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:112:10: error: 'fontWeight' is only available in macOS 10.15 or newer
110 | Text("State is \(state)")
111 | .font(.subheadline)
112 | .fontWeight(.medium)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
113 | .foregroundStyle(.secondary)
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:10: error: 'foregroundStyle' is only available in macOS 14.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:27: error: 'secondary' is only available in macOS 12.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'secondary' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:27:33: error: cannot find type 'UIView' in scope
25 |
26 | public class StatefulHostingView<State>: UIView {
27 | private(set) var contentView: UIView!
| `- error: cannot find type 'UIView' in scope
28 | let stateObject: StateObject
29 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:35:23: error: property does not override any property from its superclass
33 | }
34 |
35 | public override var intrinsicContentSize: CGSize {
| `- error: property does not override any property from its superclass
36 | contentView.intrinsicContentSize
37 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:39:39: error: cannot find type 'UIEdgeInsets' in scope
37 | }
38 |
39 | public override var safeAreaInsets: UIEdgeInsets {
| `- error: cannot find type 'UIEdgeInsets' in scope
40 | get { .zero }
41 | set {}
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:44:24: error: 'View' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
:
42 | }
43 |
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:44:45: error: 'ViewBuilder' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
:
42 | }
43 |
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:68:24: error: method does not override any method from its superclass
66 | }
67 |
68 | public override func layoutSubviews() {
| `- error: method does not override any method from its superclass
69 | super.layoutSubviews()
70 | contentView.frame = bounds
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:26:42: error: cannot find type 'UIView' in scope
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- error: cannot find type 'UIView' in scope
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:78:6: error: 'ObservedObject' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| |- note: add @available attribute to enclosing generic struct
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
| `- error: 'ObservedObject' is only available in macOS 10.15 or newer
79 |
80 | let content: (State) -> Content
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:82:20: error: 'View' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
79 |
80 | let content: (State) -> Content
81 |
82 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
83 | content(stateObject.state)
84 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:77:39: error: 'View' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing generic struct
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
79 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:92:6: error: 'Published' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
| `- error: 'Published' is only available in macOS 10.15 or newer
93 |
94 | init(state: State) {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:91:22: error: 'ObservableObject' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
93 |
[5/5] Compiling HostingView HostingView.swift
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:27:33: error: cannot find type 'UIView' in scope
25 |
26 | public class HostingView: UIView {
27 | private(set) var contentView: UIView!
| `- error: cannot find type 'UIView' in scope
28 |
29 | public override var intrinsicContentSize: CGSize {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:29:23: error: property does not override any property from its superclass
27 | private(set) var contentView: UIView!
28 |
29 | public override var intrinsicContentSize: CGSize {
| `- error: property does not override any property from its superclass
30 | contentView.intrinsicContentSize
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:33:39: error: cannot find type 'UIEdgeInsets' in scope
31 | }
32 |
33 | public override var safeAreaInsets: UIEdgeInsets {
| `- error: cannot find type 'UIEdgeInsets' in scope
34 | get { .zero }
35 | set {}
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:38:24: error: 'View' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- note: add @available attribute to enclosing class
27 | private(set) var contentView: UIView!
28 |
:
36 | }
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
39 | super.init(frame: .zero)
40 | let content = content()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:38:31: error: 'ViewBuilder' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- note: add @available attribute to enclosing class
27 | private(set) var contentView: UIView!
28 |
:
36 | }
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
39 | super.init(frame: .zero)
40 | let content = content()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:62:24: error: method does not override any method from its superclass
60 | }
61 |
62 | public override func layoutSubviews() {
| `- error: method does not override any method from its superclass
63 | super.layoutSubviews()
64 | contentView.frame = bounds
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:26:27: error: cannot find type 'UIView' in scope
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- error: cannot find type 'UIView' in scope
27 | private(set) var contentView: UIView!
28 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:82:46: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
80 | }
81 |
82 | @inlinable func hash(_ proposedViewSize: ProposedViewSize) -> Int {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
83 | var hasher = Hasher()
84 | hasher.combine(proposedViewSize.width)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:89:33: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
87 | }
88 |
89 | func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) -> CGSize {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
90 | let key = hash(proposal)
91 | if let cacheSize = cache.sizes[key] {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:99:53: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:128:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
126 |
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
130 | Text("Hosting View")
131 | .font(.largeTitle)
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: 'Text' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:8: error: 'font' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:14: error: 'largeTitle' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'largeTitle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:132:8: error: 'fontWeight' is only available in macOS 10.15 or newer
130 | Text("Hosting View")
131 | .font(.largeTitle)
132 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
133 | .foregroundStyle(
134 | .linearGradient(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:133:8: error: 'foregroundStyle' is only available in macOS 14.0 or newer
131 | .font(.largeTitle)
132 | .fontWeight(.black)
133 | .foregroundStyle(
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:134:10: error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
132 | .fontWeight(.black)
133 | .foregroundStyle(
134 | .linearGradient(
| |- error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
136 | startPoint: .topLeading,
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:21: error: 'cyan' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'cyan' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:28: error: 'indigo' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'indigo' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:37: error: 'pink' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'pink' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:44: error: 'orange' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'orange' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:53: error: 'yellow' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'yellow' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:15: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:103:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
101 |
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:104:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
105 | VStack {
106 | Text("Stateful Hosting View")
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:5: error: 'VStack' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: 'VStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: 'Text' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:10: error: 'font' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:16: error: 'headline' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'headline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:108:10: error: 'fontWeight' is only available in macOS 10.15 or newer
106 | Text("Stateful Hosting View")
107 | .font(.headline)
108 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
109 |
110 | Text("State is \(state)")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: 'Text' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:10: error: 'font' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:16: error: 'subheadline' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'subheadline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:112:10: error: 'fontWeight' is only available in macOS 10.15 or newer
110 | Text("State is \(state)")
111 | .font(.subheadline)
112 | .fontWeight(.medium)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
113 | .foregroundStyle(.secondary)
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:10: error: 'foregroundStyle' is only available in macOS 14.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:27: error: 'secondary' is only available in macOS 12.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'secondary' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:39:5: error: 'super' cannot be used in class 'HostingView' because it has no superclass
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
39 | super.init(frame: .zero)
| `- error: 'super' cannot be used in class 'HostingView' because it has no superclass
40 | let content = content()
41 | let invalidateSize: @MainActor () -> Void = { [weak self] in
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:39:24: error: cannot infer contextual base in reference to member 'zero'
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
39 | super.init(frame: .zero)
| `- error: cannot infer contextual base in reference to member 'zero'
40 | let content = content()
41 | let invalidateSize: @MainActor () -> Void = { [weak self] in
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:42:13: error: value of type 'HostingView' has no member 'invalidateIntrinsicContentSize'
40 | let content = content()
41 | let invalidateSize: @MainActor () -> Void = { [weak self] in
42 | self?.invalidateIntrinsicContentSize()
| `- error: value of type 'HostingView' has no member 'invalidateIntrinsicContentSize'
43 | }
44 | contentView = UIHostingConfiguration {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:44:19: error: cannot find 'UIHostingConfiguration' in scope
42 | self?.invalidateIntrinsicContentSize()
43 | }
44 | contentView = UIHostingConfiguration {
| `- error: cannot find 'UIHostingConfiguration' in scope
45 | HostingLayout(invalidateSize) {
46 | content
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:51:15: error: cannot infer contextual base in reference to member 'all'
49 | .ignoresSafeArea()
50 | }
51 | .margins(.all, 0)
| `- error: cannot infer contextual base in reference to member 'all'
52 | .makeContentView()
53 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:54:5: error: cannot find 'addSubview' in scope
52 | .makeContentView()
53 |
54 | addSubview(contentView)
| `- error: cannot find 'addSubview' in scope
55 | }
56 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:63:5: error: 'super' cannot be used in class 'HostingView' because it has no superclass
61 |
62 | public override func layoutSubviews() {
63 | super.layoutSubviews()
| `- error: 'super' cannot be used in class 'HostingView' because it has no superclass
64 | contentView.frame = bounds
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:64:25: error: cannot find 'bounds' in scope
62 | public override func layoutSubviews() {
63 | super.layoutSubviews()
64 | contentView.frame = bounds
| `- error: cannot find 'bounds' in scope
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:104:7: error: 'Task' is only available in macOS 10.15 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
102 | subview.place(at: position, proposal: proposal)
103 | }
104 | Task {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
105 | await MainActor.run {
106 | invalidateSize()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:104:7: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
102 | subview.place(at: position, proposal: proposal)
103 | }
104 | Task {
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
105 | await MainActor.run {
106 | invalidateSize()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:105:15: error: 'MainActor' is only available in macOS 10.15 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
:
103 | }
104 | Task {
105 | await MainActor.run {
| |- error: 'MainActor' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | invalidateSize()
107 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:105:25: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
:
103 | }
104 | Task {
105 | await MainActor.run {
| |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | invalidateSize()
107 | }
macro expansion #Preview:20:19: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
`- /Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:141:2: note: expanded code originates here
139 | )
140 | }
141 | }
+--- macro expansion #Preview --------------------------------------
|18 | }
|19 | return __b_buildView {
|20 | HostingView {
| | `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
|21 | Text("Hosting View")
|22 | .font(.largeTitle)
+-------------------------------------------------------------------
142 |
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-2F0A5646E1D333AE.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/4] Emitting module HostingView
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:27:33: error: cannot find type 'UIView' in scope
25 |
26 | public class HostingView: UIView {
27 | private(set) var contentView: UIView!
| `- error: cannot find type 'UIView' in scope
28 |
29 | public override var intrinsicContentSize: CGSize {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:29:23: error: property does not override any property from its superclass
27 | private(set) var contentView: UIView!
28 |
29 | public override var intrinsicContentSize: CGSize {
| `- error: property does not override any property from its superclass
30 | contentView.intrinsicContentSize
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:33:39: error: cannot find type 'UIEdgeInsets' in scope
31 | }
32 |
33 | public override var safeAreaInsets: UIEdgeInsets {
| `- error: cannot find type 'UIEdgeInsets' in scope
34 | get { .zero }
35 | set {}
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:38:24: error: 'View' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- note: add @available attribute to enclosing class
27 | private(set) var contentView: UIView!
28 |
:
36 | }
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
39 | super.init(frame: .zero)
40 | let content = content()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:38:31: error: 'ViewBuilder' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- note: add @available attribute to enclosing class
27 | private(set) var contentView: UIView!
28 |
:
36 | }
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
39 | super.init(frame: .zero)
40 | let content = content()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:62:24: error: method does not override any method from its superclass
60 | }
61 |
62 | public override func layoutSubviews() {
| `- error: method does not override any method from its superclass
63 | super.layoutSubviews()
64 | contentView.frame = bounds
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:26:27: error: cannot find type 'UIView' in scope
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- error: cannot find type 'UIView' in scope
27 | private(set) var contentView: UIView!
28 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:82:46: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
80 | }
81 |
82 | @inlinable func hash(_ proposedViewSize: ProposedViewSize) -> Int {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
83 | var hasher = Hasher()
84 | hasher.combine(proposedViewSize.width)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:89:33: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
87 | }
88 |
89 | func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) -> CGSize {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
90 | let key = hash(proposal)
91 | if let cacheSize = cache.sizes[key] {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:99:53: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:128:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
126 |
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
130 | Text("Hosting View")
131 | .font(.largeTitle)
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: 'Text' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:8: error: 'font' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:14: error: 'largeTitle' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'largeTitle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:132:8: error: 'fontWeight' is only available in macOS 10.15 or newer
130 | Text("Hosting View")
131 | .font(.largeTitle)
132 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
133 | .foregroundStyle(
134 | .linearGradient(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:133:8: error: 'foregroundStyle' is only available in macOS 14.0 or newer
131 | .font(.largeTitle)
132 | .fontWeight(.black)
133 | .foregroundStyle(
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:134:10: error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
132 | .fontWeight(.black)
133 | .foregroundStyle(
134 | .linearGradient(
| |- error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
136 | startPoint: .topLeading,
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:21: error: 'cyan' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'cyan' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:28: error: 'indigo' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'indigo' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:37: error: 'pink' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'pink' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:44: error: 'orange' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'orange' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:53: error: 'yellow' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'yellow' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:15: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:103:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
101 |
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:104:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
105 | VStack {
106 | Text("Stateful Hosting View")
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:5: error: 'VStack' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: 'VStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: 'Text' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:10: error: 'font' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:16: error: 'headline' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'headline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:108:10: error: 'fontWeight' is only available in macOS 10.15 or newer
106 | Text("Stateful Hosting View")
107 | .font(.headline)
108 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
109 |
110 | Text("State is \(state)")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: 'Text' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:10: error: 'font' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:16: error: 'subheadline' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'subheadline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:112:10: error: 'fontWeight' is only available in macOS 10.15 or newer
110 | Text("State is \(state)")
111 | .font(.subheadline)
112 | .fontWeight(.medium)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
113 | .foregroundStyle(.secondary)
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:10: error: 'foregroundStyle' is only available in macOS 14.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:27: error: 'secondary' is only available in macOS 12.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'secondary' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:27:33: error: cannot find type 'UIView' in scope
25 |
26 | public class StatefulHostingView<State>: UIView {
27 | private(set) var contentView: UIView!
| `- error: cannot find type 'UIView' in scope
28 | let stateObject: StateObject
29 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:35:23: error: property does not override any property from its superclass
33 | }
34 |
35 | public override var intrinsicContentSize: CGSize {
| `- error: property does not override any property from its superclass
36 | contentView.intrinsicContentSize
37 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:39:39: error: cannot find type 'UIEdgeInsets' in scope
37 | }
38 |
39 | public override var safeAreaInsets: UIEdgeInsets {
| `- error: cannot find type 'UIEdgeInsets' in scope
40 | get { .zero }
41 | set {}
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:44:24: error: 'View' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
:
42 | }
43 |
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:44:45: error: 'ViewBuilder' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
:
42 | }
43 |
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:68:24: error: method does not override any method from its superclass
66 | }
67 |
68 | public override func layoutSubviews() {
| `- error: method does not override any method from its superclass
69 | super.layoutSubviews()
70 | contentView.frame = bounds
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:26:42: error: cannot find type 'UIView' in scope
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- error: cannot find type 'UIView' in scope
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:78:6: error: 'ObservedObject' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| |- note: add @available attribute to enclosing generic struct
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
| `- error: 'ObservedObject' is only available in macOS 10.15 or newer
79 |
80 | let content: (State) -> Content
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:82:20: error: 'View' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
79 |
80 | let content: (State) -> Content
81 |
82 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
83 | content(stateObject.state)
84 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:77:39: error: 'View' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing generic struct
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
79 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:92:6: error: 'Published' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
| `- error: 'Published' is only available in macOS 10.15 or newer
93 |
94 | init(state: State) {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:91:22: error: 'ObservableObject' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
93 |
[3/4] Compiling HostingView HostingView.swift
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:27:33: error: cannot find type 'UIView' in scope
25 |
26 | public class HostingView: UIView {
27 | private(set) var contentView: UIView!
| `- error: cannot find type 'UIView' in scope
28 |
29 | public override var intrinsicContentSize: CGSize {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:29:23: error: property does not override any property from its superclass
27 | private(set) var contentView: UIView!
28 |
29 | public override var intrinsicContentSize: CGSize {
| `- error: property does not override any property from its superclass
30 | contentView.intrinsicContentSize
31 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:33:39: error: cannot find type 'UIEdgeInsets' in scope
31 | }
32 |
33 | public override var safeAreaInsets: UIEdgeInsets {
| `- error: cannot find type 'UIEdgeInsets' in scope
34 | get { .zero }
35 | set {}
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:38:24: error: 'View' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- note: add @available attribute to enclosing class
27 | private(set) var contentView: UIView!
28 |
:
36 | }
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
39 | super.init(frame: .zero)
40 | let content = content()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:38:31: error: 'ViewBuilder' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- note: add @available attribute to enclosing class
27 | private(set) var contentView: UIView!
28 |
:
36 | }
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
39 | super.init(frame: .zero)
40 | let content = content()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:62:24: error: method does not override any method from its superclass
60 | }
61 |
62 | public override func layoutSubviews() {
| `- error: method does not override any method from its superclass
63 | super.layoutSubviews()
64 | contentView.frame = bounds
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:26:27: error: cannot find type 'UIView' in scope
24 | import SwiftUI
25 |
26 | public class HostingView: UIView {
| `- error: cannot find type 'UIView' in scope
27 | private(set) var contentView: UIView!
28 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:82:46: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
80 | }
81 |
82 | @inlinable func hash(_ proposedViewSize: ProposedViewSize) -> Int {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
83 | var hasher = Hasher()
84 | hasher.combine(proposedViewSize.width)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:89:33: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
87 | }
88 |
89 | func sizeThatFits(proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) -> CGSize {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
90 | let key = hash(proposal)
91 | if let cacheSize = cache.sizes[key] {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:99:53: error: 'ProposedViewSize' is only available in macOS 13.0 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| | `- error: 'ProposedViewSize' is only available in macOS 13.0 or newer
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:128:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
126 |
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
130 | Text("Hosting View")
131 | .font(.largeTitle)
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: 'Text' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:8: error: 'font' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:14: error: 'largeTitle' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'largeTitle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:132:8: error: 'fontWeight' is only available in macOS 10.15 or newer
130 | Text("Hosting View")
131 | .font(.largeTitle)
132 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
133 | .foregroundStyle(
134 | .linearGradient(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:133:8: error: 'foregroundStyle' is only available in macOS 14.0 or newer
131 | .font(.largeTitle)
132 | .fontWeight(.black)
133 | .foregroundStyle(
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:134:10: error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
132 | .fontWeight(.black)
133 | .foregroundStyle(
134 | .linearGradient(
| |- error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
136 | startPoint: .topLeading,
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:21: error: 'cyan' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'cyan' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:28: error: 'indigo' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'indigo' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:37: error: 'pink' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'pink' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:44: error: 'orange' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'orange' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:53: error: 'yellow' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'yellow' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:15: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:103:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
101 |
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:104:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
105 | VStack {
106 | Text("Stateful Hosting View")
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:5: error: 'VStack' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: 'VStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: 'Text' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:10: error: 'font' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:16: error: 'headline' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'headline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:108:10: error: 'fontWeight' is only available in macOS 10.15 or newer
106 | Text("Stateful Hosting View")
107 | .font(.headline)
108 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
109 |
110 | Text("State is \(state)")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: 'Text' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:10: error: 'font' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:16: error: 'subheadline' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'subheadline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:112:10: error: 'fontWeight' is only available in macOS 10.15 or newer
110 | Text("State is \(state)")
111 | .font(.subheadline)
112 | .fontWeight(.medium)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
113 | .foregroundStyle(.secondary)
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:10: error: 'foregroundStyle' is only available in macOS 14.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:27: error: 'secondary' is only available in macOS 12.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'secondary' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:39:5: error: 'super' cannot be used in class 'HostingView' because it has no superclass
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
39 | super.init(frame: .zero)
| `- error: 'super' cannot be used in class 'HostingView' because it has no superclass
40 | let content = content()
41 | let invalidateSize: @MainActor () -> Void = { [weak self] in
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:39:24: error: cannot infer contextual base in reference to member 'zero'
37 |
38 | public init<Content: View>(@ViewBuilder content: () -> Content) {
39 | super.init(frame: .zero)
| `- error: cannot infer contextual base in reference to member 'zero'
40 | let content = content()
41 | let invalidateSize: @MainActor () -> Void = { [weak self] in
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:42:13: error: value of type 'HostingView' has no member 'invalidateIntrinsicContentSize'
40 | let content = content()
41 | let invalidateSize: @MainActor () -> Void = { [weak self] in
42 | self?.invalidateIntrinsicContentSize()
| `- error: value of type 'HostingView' has no member 'invalidateIntrinsicContentSize'
43 | }
44 | contentView = UIHostingConfiguration {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:44:19: error: cannot find 'UIHostingConfiguration' in scope
42 | self?.invalidateIntrinsicContentSize()
43 | }
44 | contentView = UIHostingConfiguration {
| `- error: cannot find 'UIHostingConfiguration' in scope
45 | HostingLayout(invalidateSize) {
46 | content
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:51:15: error: cannot infer contextual base in reference to member 'all'
49 | .ignoresSafeArea()
50 | }
51 | .margins(.all, 0)
| `- error: cannot infer contextual base in reference to member 'all'
52 | .makeContentView()
53 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:54:5: error: cannot find 'addSubview' in scope
52 | .makeContentView()
53 |
54 | addSubview(contentView)
| `- error: cannot find 'addSubview' in scope
55 | }
56 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:63:5: error: 'super' cannot be used in class 'HostingView' because it has no superclass
61 |
62 | public override func layoutSubviews() {
63 | super.layoutSubviews()
| `- error: 'super' cannot be used in class 'HostingView' because it has no superclass
64 | contentView.frame = bounds
65 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:64:25: error: cannot find 'bounds' in scope
62 | public override func layoutSubviews() {
63 | super.layoutSubviews()
64 | contentView.frame = bounds
| `- error: cannot find 'bounds' in scope
65 | }
66 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:104:7: error: 'Task' is only available in macOS 10.15 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
102 | subview.place(at: position, proposal: proposal)
103 | }
104 | Task {
| |- error: 'Task' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
105 | await MainActor.run {
106 | invalidateSize()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:104:7: error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
102 | subview.place(at: position, proposal: proposal)
103 | }
104 | Task {
| |- error: 'init(priority:operation:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
105 | await MainActor.run {
106 | invalidateSize()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:105:15: error: 'MainActor' is only available in macOS 10.15 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
:
103 | }
104 | Task {
105 | await MainActor.run {
| |- error: 'MainActor' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | invalidateSize()
107 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:105:25: error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
69 |
70 | extension HostingView {
71 | struct HostingLayout: Layout {
| `- note: add @available attribute to enclosing struct
72 | struct Cache {
73 | var sizes: [Int: CGSize] = [:]
:
97 | }
98 |
99 | func placeSubviews(in bounds: CGRect, proposal: ProposedViewSize, subviews: Subviews, cache: inout Cache) {
| `- note: add @available attribute to enclosing instance method
100 | let position = CGPoint(x: max(0, bounds.origin.x), y: max(0, bounds.origin.y))
101 | for subview in subviews {
:
103 | }
104 | Task {
105 | await MainActor.run {
| |- error: 'run(resultType:body:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | invalidateSize()
107 | }
macro expansion #Preview:20:19: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
`- /Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:141:2: note: expanded code originates here
139 | )
140 | }
141 | }
+--- macro expansion #Preview --------------------------------------
|18 | }
|19 | return __b_buildView {
|20 | HostingView {
| | `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
|21 | Text("Hosting View")
|22 | .font(.largeTitle)
+-------------------------------------------------------------------
142 |
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
[4/4] Compiling HostingView StatefulHostingView.swift
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:27:33: error: cannot find type 'UIView' in scope
25 |
26 | public class StatefulHostingView<State>: UIView {
27 | private(set) var contentView: UIView!
| `- error: cannot find type 'UIView' in scope
28 | let stateObject: StateObject
29 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:35:23: error: property does not override any property from its superclass
33 | }
34 |
35 | public override var intrinsicContentSize: CGSize {
| `- error: property does not override any property from its superclass
36 | contentView.intrinsicContentSize
37 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:39:39: error: cannot find type 'UIEdgeInsets' in scope
37 | }
38 |
39 | public override var safeAreaInsets: UIEdgeInsets {
| `- error: cannot find type 'UIEdgeInsets' in scope
40 | get { .zero }
41 | set {}
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:44:24: error: 'View' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
:
42 | }
43 |
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:44:45: error: 'ViewBuilder' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
:
42 | }
43 |
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
| | `- error: 'ViewBuilder' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing initializer
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:68:24: error: method does not override any method from its superclass
66 | }
67 |
68 | public override func layoutSubviews() {
| `- error: method does not override any method from its superclass
69 | super.layoutSubviews()
70 | contentView.frame = bounds
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:26:42: error: cannot find type 'UIView' in scope
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- error: cannot find type 'UIView' in scope
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:78:6: error: 'ObservedObject' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| |- note: add @available attribute to enclosing generic struct
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
| `- error: 'ObservedObject' is only available in macOS 10.15 or newer
79 |
80 | let content: (State) -> Content
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:82:20: error: 'View' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
79 |
80 | let content: (State) -> Content
81 |
82 | var body: some View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| `- note: add @available attribute to enclosing property
83 | content(stateObject.state)
84 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:77:39: error: 'View' is only available in macOS 10.15 or newer
75 |
76 | extension StatefulHostingView {
77 | struct StatefulContentView<Content: View>: View {
| | `- error: 'View' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing generic struct
| `- note: add @available attribute to enclosing generic struct
78 | @ObservedObject var stateObject: StateObject
79 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:92:6: error: 'Published' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
| `- error: 'Published' is only available in macOS 10.15 or newer
93 |
94 | init(state: State) {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:91:22: error: 'ObservableObject' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| | `- error: 'ObservableObject' is only available in macOS 10.15 or newer
| |- note: add @available attribute to enclosing class
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
93 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:103:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
101 |
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:104:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
102 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
105 | VStack {
106 | Text("Stateful Hosting View")
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:5: error: 'VStack' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: 'VStack' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:106:7: error: 'Text' is only available in macOS 10.15 or newer
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
106 | Text("Stateful Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
107 | .font(.headline)
108 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:10: error: 'font' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:107:16: error: 'headline' is only available in macOS 10.15 or newer
105 | VStack {
106 | Text("Stateful Hosting View")
107 | .font(.headline)
| |- error: 'headline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
108 | .fontWeight(.black)
109 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:108:10: error: 'fontWeight' is only available in macOS 10.15 or newer
106 | Text("Stateful Hosting View")
107 | .font(.headline)
108 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
109 |
110 | Text("State is \(state)")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:110:7: error: 'Text' is only available in macOS 10.15 or newer
108 | .fontWeight(.black)
109 |
110 | Text("State is \(state)")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
111 | .font(.subheadline)
112 | .fontWeight(.medium)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:10: error: 'font' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:111:16: error: 'subheadline' is only available in macOS 10.15 or newer
109 |
110 | Text("State is \(state)")
111 | .font(.subheadline)
| |- error: 'subheadline' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:112:10: error: 'fontWeight' is only available in macOS 10.15 or newer
110 | Text("State is \(state)")
111 | .font(.subheadline)
112 | .fontWeight(.medium)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
113 | .foregroundStyle(.secondary)
114 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:10: error: 'foregroundStyle' is only available in macOS 14.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:113:27: error: 'secondary' is only available in macOS 12.0 or newer
111 | .font(.subheadline)
112 | .fontWeight(.medium)
113 | .foregroundStyle(.secondary)
| |- error: 'secondary' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
114 | }
115 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:105:12: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
103 | #Preview {
104 | StatefulHostingView(state: Int.random(in: 0..<9)) { state in
105 | VStack {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
106 | Text("Stateful Hosting View")
107 | .font(.headline)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:128:2: error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
126 |
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
| `- error: 'Preview(_:body:)' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
130 | Text("Hosting View")
131 | .font(.largeTitle)
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:3: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:130:5: error: 'Text' is only available in macOS 10.15 or newer
128 | #Preview {
129 | HostingView {
130 | Text("Hosting View")
| |- error: 'Text' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
131 | .font(.largeTitle)
132 | .fontWeight(.black)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:8: error: 'font' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'font' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:131:14: error: 'largeTitle' is only available in macOS 10.15 or newer
129 | HostingView {
130 | Text("Hosting View")
131 | .font(.largeTitle)
| |- error: 'largeTitle' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
132 | .fontWeight(.black)
133 | .foregroundStyle(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:132:8: error: 'fontWeight' is only available in macOS 10.15 or newer
130 | Text("Hosting View")
131 | .font(.largeTitle)
132 | .fontWeight(.black)
| |- error: 'fontWeight' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
133 | .foregroundStyle(
134 | .linearGradient(
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:133:8: error: 'foregroundStyle' is only available in macOS 14.0 or newer
131 | .font(.largeTitle)
132 | .fontWeight(.black)
133 | .foregroundStyle(
| |- error: 'foregroundStyle' is only available in macOS 14.0 or newer
| `- note: add 'if #available' version check
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:134:10: error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
132 | .fontWeight(.black)
133 | .foregroundStyle(
134 | .linearGradient(
| |- error: 'linearGradient(colors:startPoint:endPoint:)' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
136 | startPoint: .topLeading,
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:21: error: 'cyan' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'cyan' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:28: error: 'indigo' is only available in macOS 12.0 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'indigo' is only available in macOS 12.0 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:37: error: 'pink' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'pink' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:44: error: 'orange' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'orange' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:135:53: error: 'yellow' is only available in macOS 10.15 or newer
133 | .foregroundStyle(
134 | .linearGradient(
135 | colors: [.cyan, .indigo, .pink, .orange, .yellow],
| |- error: 'yellow' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
136 | startPoint: .topLeading,
137 | endPoint: .bottomTrailing
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/HostingView.swift:129:15: error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
127 | @available(iOS 17.0, macCatalyst 17.0, tvOS 17.0, *)
128 | #Preview {
129 | HostingView {
| |- error: conformance of 'Text' to 'View' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
130 | Text("Hosting View")
131 | .font(.largeTitle)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:32:11: error: setter for 'state' is only available in macOS 10.15 or newer
24 | import SwiftUI
25 |
26 | public class StatefulHostingView<State>: UIView {
| `- note: add @available attribute to enclosing generic class
27 | private(set) var contentView: UIView!
28 | let stateObject: StateObject
29 |
30 | public var state: State {
| `- note: add @available attribute to enclosing property
31 | get { stateObject.state }
32 | set { stateObject.state = newValue }
| |- error: setter for 'state' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
33 | }
34 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:46:5: error: 'super' cannot be used in class 'StatefulHostingView' because it has no superclass
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
| `- error: 'super' cannot be used in class 'StatefulHostingView' because it has no superclass
47 | let invalidateSize: @MainActor () -> Void = { [weak self] in
48 | self?.invalidateIntrinsicContentSize()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:46:24: error: cannot infer contextual base in reference to member 'zero'
44 | public init<Content: View>(state: State, @ViewBuilder content: @escaping (State) -> Content) {
45 | self.stateObject = StateObject(state: state)
46 | super.init(frame: .zero)
| `- error: cannot infer contextual base in reference to member 'zero'
47 | let invalidateSize: @MainActor () -> Void = { [weak self] in
48 | self?.invalidateIntrinsicContentSize()
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:48:13: error: value of type 'StatefulHostingView<State>' has no member 'invalidateIntrinsicContentSize'
46 | super.init(frame: .zero)
47 | let invalidateSize: @MainActor () -> Void = { [weak self] in
48 | self?.invalidateIntrinsicContentSize()
| `- error: value of type 'StatefulHostingView<State>' has no member 'invalidateIntrinsicContentSize'
49 | }
50 | contentView = UIHostingConfiguration {
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:50:19: error: cannot find 'UIHostingConfiguration' in scope
48 | self?.invalidateIntrinsicContentSize()
49 | }
50 | contentView = UIHostingConfiguration {
| `- error: cannot find 'UIHostingConfiguration' in scope
51 | HostingView.HostingLayout(invalidateSize) {
52 | StatefulContentView(stateObject: stateObject, content: content)
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:57:15: error: cannot infer contextual base in reference to member 'all'
55 | .ignoresSafeArea()
56 | }
57 | .margins(.all, 0)
| `- error: cannot infer contextual base in reference to member 'all'
58 | .makeContentView()
59 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:60:5: error: cannot find 'addSubview' in scope
58 | .makeContentView()
59 |
60 | addSubview(contentView)
| `- error: cannot find 'addSubview' in scope
61 | }
62 |
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:69:5: error: 'super' cannot be used in class 'StatefulHostingView' because it has no superclass
67 |
68 | public override func layoutSubviews() {
69 | super.layoutSubviews()
| `- error: 'super' cannot be used in class 'StatefulHostingView' because it has no superclass
70 | contentView.frame = bounds
71 | }
<unknown>:0: error: cannot convert value of type 'any KeyPath<StatefulHostingView<State>.StateObject, State> & Sendable' to expected argument type 'ReferenceWritableKeyPath<StatefulHostingView<State>.StateObject, State>'
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:70:25: error: cannot find 'bounds' in scope
68 | public override func layoutSubviews() {
69 | super.layoutSubviews()
70 | contentView.frame = bounds
| `- error: cannot find 'bounds' in scope
71 | }
72 | }
/Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:95:7: error: setter for 'state' is only available in macOS 10.15 or newer
89 |
90 | extension StatefulHostingView {
91 | class StateObject: ObservableObject {
| `- note: add @available attribute to enclosing class
92 | @Published var state: State
93 |
94 | init(state: State) {
| `- note: add @available attribute to enclosing initializer
95 | self.state = state
| |- error: setter for 'state' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
96 | }
97 | }
macro expansion #Preview:20:19: error: 'buildExpression' is unavailable: this expression does not conform to 'View'
`- /Users/admin/builder/spi-builder-workspace/Sources/HostingView/StatefulHostingView.swift:116:2: note: expanded code originates here
114 | }
115 | }
116 | }
+--- macro expansion #Preview --------------------------------------
|18 | }
|19 | return __b_buildView {
|20 | StatefulHostingView(state: Int.random(in: 0 ..< 9)) { state in
| | `- error: 'buildExpression' is unavailable: this expression does not conform to 'View'
|21 | VStack {
|22 | Text("Stateful Hosting View")
+-------------------------------------------------------------------
117 |
SwiftUICore.ViewBuilder.buildExpression:3:22: note: 'buildExpression' has been explicitly marked unavailable here
1 | struct ViewBuilder {
2 | @available(*, unavailable, message: "this expression does not conform to 'View'")
3 | public static func buildExpression(_ invalid: Any) -> some View
| `- note: 'buildExpression' has been explicitly marked unavailable here
4 | }
5 |
BUILD FAILURE 6.1 macosSpm