Build Information
Failed to build Evil, reference master (91ff2f
), with Swift 6.0 for macOS (SPM) on 31 Oct 2024 12:23:52 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Build Log
========================================
RunAll
========================================
Builder version: 4.56.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/evilgix/Evil.git
Reference: master
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/evilgix/Evil
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
HEAD is now at 91ff2fc fix code style.
Cloned https://github.com/evilgix/Evil.git
Revision (git rev-parse @):
91ff2fc58113231af91033cedd0486a7a7ac01df
SUCCESS checkout https://github.com/evilgix/Evil.git at master
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "evil",
"name": "Evil",
"url": "https://github.com/evilgix/Evil.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/Evil",
"dependencies": [
]
}
]
}
Fetching https://github.com/evilgix/Evil.git
[1/378] Fetching evil
Fetched https://github.com/evilgix/Evil.git from cache (1.20s)
Creating working copy for https://github.com/evilgix/Evil.git
Working copy of https://github.com/evilgix/Evil.git resolved at master (91ff2fc)
warning: '.resolve-product-dependencies': dependency 'evil' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.0
Building package at path: $PWD
https://github.com/evilgix/Evil.git
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.1.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version--7754E27361AE5C74.txt
[3/12] Compiling Evil_macOS UIImage.swift
[4/12] Compiling Evil_macOS SmoothThresholdFilter.swift
[5/12] Compiling Evil_macOS Utils.swift
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:14:5: warning: 'public' modifier is redundant for instance method declared in a public extension
12 |
13 | public extension CGRect {
14 | public func scaled(to size: CGSize) -> CGRect {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
15 | return CGRect(
16 | x: self.origin.x * size.width,
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:23:5: warning: 'public' modifier is redundant for property declared in a public extension
21 | }
22 |
23 | public var area: CGFloat {
| `- warning: 'public' modifier is redundant for property declared in a public extension
24 | return size.width * size.height
25 | }
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:29:5: warning: 'public' modifier is redundant for instance method declared in a public extension
27 |
28 | public extension CGPoint {
29 | public func scaled(to size: CGSize) -> CGPoint {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
30 | return CGPoint(x: self.x * size.width, y: self.y * size.height)
31 | }
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:36:5: warning: 'public' modifier is redundant for instance method declared in a public extension
34 | public extension CIImage {
35 |
36 | public func resize(_ size: CGSize) -> CIImage {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
37 | var outputImage = self
38 | if extent.width > size.width || extent.height > size.height {
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:53:5: warning: 'public' modifier is redundant for instance method declared in a public extension
51 | public extension CGImage {
52 |
53 | public func pixelBuffer(_ colorspace: CGColorSpace = CGColorSpaceCreateDeviceRGB()) -> CVPixelBuffer? {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
54 | var pb: CVPixelBuffer? = nil
55 |
[6/12] Compiling Evil_macOS Recognizer.swift
/Users/admin/builder/spi-builder-workspace/Source/Recognizer.swift:144:5: warning: 'public' modifier is redundant for instance method declared in a public extension
142 |
143 | public extension Valueable where T == Value {
144 | public func cropChineseIDCardNumberArea() -> Result<Value> {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
145 | guard let image = value?.image else {
146 | return .failure(.notFound)
/Users/admin/builder/spi-builder-workspace/Source/Recognizer.swift:153:5: warning: 'public' modifier is redundant for instance method declared in a public extension
151 |
152 | public extension CIImage {
153 | public func cropChineseIDCardNumberArea() -> Value {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
154 | // 截取 数字区
155 | // 按照真实比例截取,身份证号码区
/Users/admin/builder/spi-builder-workspace/Source/Recognizer.swift:21:16: error: cannot find 'preprocessor' in scope
19 | extension CIImage: Recognizable {
20 | public var croppedMaxRectangle: CorpMaxRectangleResult {
21 | return preprocessor.croppedMaxRectangle()
| `- error: cannot find 'preprocessor' in scope
22 | }
23 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:13:30: error: cannot find type 'CIImage' in scope
11 |
12 | /// debugger 输出每一步的处理结果
13 | public typealias Debugger = (CIImage) -> ()
| `- error: cannot find type 'CIImage' in scope
14 |
15 | /// 配置预处理器
/Users/admin/builder/spi-builder-workspace/Source/Recognizer.swift:136:56: error: value of type 'CIImage' has no member 'preprocessor'
134 |
135 | public func recognize(_ object: Recognizable, placeholder: String = "?") -> String? {
136 | if let images = recognizer.processor?(object)?.preprocessor.divideText().value?.map({ $0.image }) {
| `- error: value of type 'CIImage' has no member 'preprocessor'
137 | return try? prediction(images).map { $0 ?? placeholder }.joined()
138 | }
/Users/admin/builder/spi-builder-workspace/Source/Evil.swift:44:39: error: cannot find type 'CIImage' in scope
42 | /// - parameter images: 将要识别的图片数组
43 | ///
44 | public func prediction(_ images: [CIImage]) throws -> [String?] {
| `- error: cannot find type 'CIImage' in scope
45 | let coreModel = try VNCoreMLModel(for: model)
46 | let request = VNCoreMLRequest(model: coreModel)
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:47:23: error: cannot find type 'CIImage' in scope
45 |
46 | public struct Value {
47 | public let image: CIImage
| `- error: cannot find type 'CIImage' in scope
48 | public let bounds: CGRect
49 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:50:27: error: cannot find type 'CIImage' in scope
48 | public let bounds: CGRect
49 |
50 | public init (_ image: CIImage, _ bounds: CGRect) {
| `- error: cannot find type 'CIImage' in scope
51 | self.image = image
52 | self.bounds = bounds
[7/12] Compiling Evil_macOS NSImage.swift
/Users/admin/builder/spi-builder-workspace/Source/NSImage.swift:13:9: warning: 'public' modifier is redundant for initializer declared in a public extension
11 |
12 | public extension CIImage {
13 | public convenience init?(image: NSImage) {
| `- warning: 'public' modifier is redundant for initializer declared in a public extension
14 | guard let tiffData = image.tiffRepresentation else { return nil }
15 | self.init(data: tiffData)
/Users/admin/builder/spi-builder-workspace/Source/NSImage.swift:20:9: warning: 'public' modifier is redundant for property declared in a public extension
18 |
19 | public extension NSImage {
20 | public var cgImage: CGImage? {
| `- warning: 'public' modifier is redundant for property declared in a public extension
21 | var rect = CGRect(origin: CGPoint.zero, size: size)
22 | return cgImage(forProposedRect: &rect, context: nil, hints: nil)
[8/12] Compiling Evil_macOS Preprocessor.swift
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:13:30: error: cannot find type 'CIImage' in scope
11 |
12 | /// debugger 输出每一步的处理结果
13 | public typealias Debugger = (CIImage) -> ()
| `- error: cannot find type 'CIImage' in scope
14 |
15 | /// 配置预处理器
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:20:49: error: cannot find type 'CIColor' in scope
18 | public static var `default`: Configuration { return Configuration() }
19 |
20 | public var colorMonochromeFilterInputColor: CIColor? // CIColorMonochrome kCIInputColorKey 参数
| `- error: cannot find type 'CIColor' in scope
21 | public var colorControls: (CGFloat, CGFloat, CGFloat) // CIColorControls Saturation, Brightness, Contrast
22 | public var exposureAdjustEV: CGFloat // CIExposureAdjust IInputEVKey
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:47:23: error: cannot find type 'CIImage' in scope
45 |
46 | public struct Value {
47 | public let image: CIImage
| `- error: cannot find type 'CIImage' in scope
48 | public let bounds: CGRect
49 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:50:27: error: cannot find type 'CIImage' in scope
48 | public let bounds: CGRect
49 |
50 | public init (_ image: CIImage, _ bounds: CGRect) {
| `- error: cannot find type 'CIImage' in scope
51 | self.image = image
52 | self.bounds = bounds
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:98:11: error: cannot find type 'CIImage' in scope
96 | }
97 |
98 | extension CIImage: Preprocessable {}
| `- error: cannot find type 'CIImage' in scope
99 |
100 | @available(OSX 10.13, iOS 11.0, *)
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:102:43: error: cannot find type 'CIImage' in scope
100 | @available(OSX 10.13, iOS 11.0, *)
101 | extension CGImage: Preprocessable {
102 | public var preprocessor: Preprocessor<CIImage> {
| `- error: cannot find type 'CIImage' in scope
103 | return CIImage(cgImage: self).preprocessor
104 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:108:43: error: cannot find type 'CIImage' in scope
106 |
107 | extension Value: Preprocessable {
108 | public var preprocessor: Preprocessor<CIImage> {
| `- error: cannot find type 'CIImage' in scope
109 | return image.preprocessor
110 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:114:5: warning: 'public' modifier is redundant for instance method declared in a public extension
112 |
113 | public extension Valueable where T == Value {
114 | public func process(conf: Configuration = Configuration.`default`, debugger: Debugger? = nil) -> ProcessedResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
115 | return value?.preprocessor.process(conf: conf, debugger: debugger) ?? .failure(.notFound)
116 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:118:5: warning: 'public' modifier is redundant for instance method declared in a public extension
116 | }
117 |
118 | public func divideText(result resize: CGSize? = nil, adjustment: Bool = false, debugger: Debugger? = nil) -> DivideResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
119 | return value?.preprocessor.divideText(result: resize, adjustment: adjustment, debugger: debugger) ?? .failure(.notFound)
120 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:122:5: warning: 'public' modifier is redundant for instance method declared in a public extension
120 | }
121 |
122 | public func correctionByFace() -> FaceCorrectionResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
123 | return value?.preprocessor.correctionByFace() ?? .failure(.notFound)
124 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:128:40: error: cannot find type 'CIImage' in scope
126 |
127 | @available(OSX 10.13, iOS 11.0, *)
128 | public extension Preprocessor where T: CIImage {
| `- error: cannot find type 'CIImage' in scope
129 |
130 | /// 返回处理后的CIImage对象
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:138:5: warning: 'public' modifier is redundant for instance method declared in a public extension
136 | /// - returns: retrun processed iamge.
137 | ///
138 | public func process(conf: Configuration = Configuration.`default`, debugger: Debugger? = nil) -> ProcessedResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
139 |
140 | var inputImage: CIImage = self.image
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:188:5: warning: 'public' modifier is redundant for instance method declared in a public extension
186 | /// - returns: 返回分割结果
187 | ///
188 | public func divideText(result resize: CGSize? = nil, adjustment: Bool = true, debugger: Debugger? = nil) -> DivideResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
189 |
190 | let detectTextRequest = VNDetectTextRectanglesRequest()
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:233:5: warning: 'public' modifier is redundant for instance method declared in a public extension
231 | ///
232 | ///
233 | public func croppedMaxRectangle() -> CorpMaxRectangleResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
234 |
235 | let request = VNDetectRectanglesRequest()
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:264:5: warning: 'public' modifier is redundant for instance method declared in a public extension
262 | ///
263 | ///
264 | public func correctionByFace() -> FaceCorrectionResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
265 |
266 | let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow])!
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:313:5: warning: 'public' modifier is redundant for instance method declared in a public extension
311 |
312 | // 矩形透视矫正
313 | public func perspectiveCorrection(boundingBox box: CGRect, topLeft: CGPoint, topRight: CGPoint, bottomLeft: CGPoint, bottomRight: CGPoint) -> PerspectiveCorrectionResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
314 |
315 | let size = image.extent.size
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:31:43: error: cannot find 'CIColor' in scope
29 |
30 | init() {
31 | colorMonochromeFilterInputColor = CIColor(red: 0.75, green: 0.75, blue: 0.75)
| `- error: cannot find 'CIColor' in scope
32 | colorControls = (0.4, 0.2, 1.1)
33 | exposureAdjustEV = 0.7
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:140:25: error: cannot find type 'CIImage' in scope
138 | public func process(conf: Configuration = Configuration.`default`, debugger: Debugger? = nil) -> ProcessedResult {
139 |
140 | var inputImage: CIImage = self.image
| `- error: cannot find type 'CIImage' in scope
141 |
142 | // 只有在主动设置的时候才丢弃颜色信息
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:145:86: error: cannot find 'kCIInputColorKey' in scope
143 | if let color = conf.colorMonochromeFilterInputColor {
144 | // 0x00. 灰度图 --> 主要用来做文字识别所以直接去掉色彩信息
145 | inputImage = inputImage.applyingFilter("CIColorMonochrome", parameters: [kCIInputColorKey: color])
| `- error: cannot find 'kCIInputColorKey' in scope
146 | debugger?(inputImage)
147 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:151:13: error: cannot find 'kCIInputSaturationKey' in scope
149 | // 0x01. 提升亮度 --> 会损失一部分背景纹理 饱和度不能太高
150 | inputImage = inputImage.applyingFilter("CIColorControls", parameters: [
151 | kCIInputSaturationKey: conf.colorControls.0,
| `- error: cannot find 'kCIInputSaturationKey' in scope
152 | kCIInputBrightnessKey: conf.colorControls.1,
153 | kCIInputContrastKey: conf.colorControls.2])
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:152:13: error: cannot find 'kCIInputBrightnessKey' in scope
150 | inputImage = inputImage.applyingFilter("CIColorControls", parameters: [
151 | kCIInputSaturationKey: conf.colorControls.0,
152 | kCIInputBrightnessKey: conf.colorControls.1,
| `- error: cannot find 'kCIInputBrightnessKey' in scope
153 | kCIInputContrastKey: conf.colorControls.2])
154 | debugger?(inputImage)
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:153:13: error: cannot find 'kCIInputContrastKey' in scope
151 | kCIInputSaturationKey: conf.colorControls.0,
152 | kCIInputBrightnessKey: conf.colorControls.1,
153 | kCIInputContrastKey: conf.colorControls.2])
| `- error: cannot find 'kCIInputContrastKey' in scope
154 | debugger?(inputImage)
155 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:157:81: error: cannot find 'kCIInputEVKey' in scope
155 |
156 | // 0x02 曝光调节
157 | inputImage = inputImage.applyingFilter("CIExposureAdjust", parameters: [kCIInputEVKey: conf.exposureAdjustEV])
| `- error: cannot find 'kCIInputEVKey' in scope
158 | debugger?(inputImage)
159 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:174:61: error: cannot find 'kCIInputRadiusKey' in scope
172 | // 0x05 增强文字轮廓
173 | inputImage = inputImage.applyingFilter("CIUnsharpMask",
174 | parameters: [kCIInputRadiusKey: conf.unsharpMask.0, kCIInputIntensityKey: conf.unsharpMask.1])
| `- error: cannot find 'kCIInputRadiusKey' in scope
175 | debugger?(inputImage)
176 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:174:100: error: cannot find 'kCIInputIntensityKey' in scope
172 | // 0x05 增强文字轮廓
173 | inputImage = inputImage.applyingFilter("CIUnsharpMask",
174 | parameters: [kCIInputRadiusKey: conf.unsharpMask.0, kCIInputIntensityKey: conf.unsharpMask.1])
| `- error: cannot find 'kCIInputIntensityKey' in scope
175 | debugger?(inputImage)
176 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:193:54: error: cannot convert value of type 'T' to expected argument type 'CIImage'
191 | detectTextRequest.reportCharacterBoxes = true
192 |
193 | let handler = VNImageRequestHandler(ciImage: image, options: [:])
| `- error: cannot convert value of type 'T' to expected argument type 'CIImage'
194 | try? handler.perform([detectTextRequest])
195 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:196:64: warning: conditional downcast from '[VNTextObservation]?' to '[VNTextObservation]' does nothing
194 | try? handler.perform([detectTextRequest])
195 |
196 | guard let textObservations = detectTextRequest.results as? [VNTextObservation] else {
| `- warning: conditional downcast from '[VNTextObservation]?' to '[VNTextObservation]' does nothing
197 | return .failure(.notFound)
198 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:208:61: error: value of type 'T' has no member 'extent'
206 | for c in cs {
207 |
208 | let rect = c.boundingBox.scaled(to: ciImage.extent.size)
| `- error: value of type 'T' has no member 'extent'
209 |
210 | var image = ciImage.cropped(to: CGRect(x: rect.origin.x - 3, y: rect.origin.y - 3, width: rect.width + 6, height: rect.height + 6))
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:210:37: error: value of type 'T' has no member 'cropped'
208 | let rect = c.boundingBox.scaled(to: ciImage.extent.size)
209 |
210 | var image = ciImage.cropped(to: CGRect(x: rect.origin.x - 3, y: rect.origin.y - 3, width: rect.width + 6, height: rect.height + 6))
| `- error: value of type 'T' has no member 'cropped'
211 | .transformed(by: CGAffineTransform(translationX: -rect.origin.x, y: -rect.origin.y))
212 | if let size = resize {
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:236:54: error: cannot convert value of type 'T' to expected argument type 'CIImage'
234 |
235 | let request = VNDetectRectanglesRequest()
236 | let handler = VNImageRequestHandler(ciImage: image, options: [:])
| `- error: cannot convert value of type 'T' to expected argument type 'CIImage'
237 |
238 | do {
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:244:50: warning: conditional downcast from '[VNRectangleObservation]?' to '[VNRectangleObservation]' does nothing
242 | }
243 |
244 | guard let observations = request.results as? [VNRectangleObservation] else {
| `- warning: conditional downcast from '[VNRectangleObservation]?' to '[VNRectangleObservation]' does nothing
245 | return .failure(.notFound)
246 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:254:22: error: value of type 'T' has no member 'preprocessor'
252 | }
253 |
254 | return image.preprocessor.perspectiveCorrection(boundingBox: maxObservation.boundingBox,
| `- error: value of type 'T' has no member 'preprocessor'
255 | topLeft: maxObservation.topLeft,
256 | topRight: maxObservation.topRight,
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:266:24: error: cannot find 'CIDetector' in scope
264 | public func correctionByFace() -> FaceCorrectionResult {
265 |
266 | let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow])!
| `- error: cannot find 'CIDetector' in scope
267 |
268 | var orientation: CGImagePropertyOrientation = image.extent.width > image.extent.height ? .up : .right
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:266:43: error: cannot find 'CIDetectorTypeFace' in scope
264 | public func correctionByFace() -> FaceCorrectionResult {
265 |
266 | let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow])!
| `- error: cannot find 'CIDetectorTypeFace' in scope
267 |
268 | var orientation: CGImagePropertyOrientation = image.extent.width > image.extent.height ? .up : .right
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:266:87: error: cannot find 'CIDetectorAccuracy' in scope
264 | public func correctionByFace() -> FaceCorrectionResult {
265 |
266 | let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow])!
| `- error: cannot find 'CIDetectorAccuracy' in scope
267 |
268 | var orientation: CGImagePropertyOrientation = image.extent.width > image.extent.height ? .up : .right
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:266:107: error: cannot find 'CIDetectorAccuracyLow' in scope
264 | public func correctionByFace() -> FaceCorrectionResult {
265 |
266 | let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow])!
| `- error: cannot find 'CIDetectorAccuracyLow' in scope
267 |
268 | var orientation: CGImagePropertyOrientation = image.extent.width > image.extent.height ? .up : .right
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:266:72: error: 'nil' requires a contextual type
264 | public func correctionByFace() -> FaceCorrectionResult {
265 |
266 | let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow])!
| `- error: 'nil' requires a contextual type
267 |
268 | var orientation: CGImagePropertyOrientation = image.extent.width > image.extent.height ? .up : .right
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:268:61: error: value of type 'T' has no member 'extent'
266 | let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow])!
267 |
268 | var orientation: CGImagePropertyOrientation = image.extent.width > image.extent.height ? .up : .right
| `- error: value of type 'T' has no member 'extent'
269 |
270 | var faceFeatures = detector.features(in: image, options: [CIDetectorImageOrientation: orientation.rawValue])
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:268:82: error: value of type 'T' has no member 'extent'
266 | let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow])!
267 |
268 | var orientation: CGImagePropertyOrientation = image.extent.width > image.extent.height ? .up : .right
| `- error: value of type 'T' has no member 'extent'
269 |
270 | var faceFeatures = detector.features(in: image, options: [CIDetectorImageOrientation: orientation.rawValue])
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:270:67: error: cannot find 'CIDetectorImageOrientation' in scope
268 | var orientation: CGImagePropertyOrientation = image.extent.width > image.extent.height ? .up : .right
269 |
270 | var faceFeatures = detector.features(in: image, options: [CIDetectorImageOrientation: orientation.rawValue])
| `- error: cannot find 'CIDetectorImageOrientation' in scope
271 |
272 | if orientation == .right {
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:273:70: error: cannot find 'CIDetectorImageOrientation' in scope
271 |
272 | if orientation == .right {
273 | let newFeatures = detector.features(in: image, options: [CIDetectorImageOrientation: CGImagePropertyOrientation.left.rawValue])
| `- error: cannot find 'CIDetectorImageOrientation' in scope
274 | if newFeatures.count != 0 {
275 | if faceFeatures.count == 0 {
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:287:67: error: cannot find 'CIDetectorImageOrientation' in scope
285 | } else if orientation == .up && faceFeatures.count == 0 {
286 | orientation = .down
287 | faceFeatures = detector.features(in: image, options: [CIDetectorImageOrientation: orientation.rawValue])
| `- error: cannot find 'CIDetectorImageOrientation' in scope
288 | }
289 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:290:56: error: cannot find type 'CIFaceFeature' in scope
288 | }
289 |
290 | guard var faceFeature = faceFeatures.first as? CIFaceFeature,
| `- error: cannot find type 'CIFaceFeature' in scope
291 | faceFeature.hasLeftEyePosition &&
292 | faceFeature.hasRightEyePosition &&
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:300:68: error: value of type 'T' has no member 'extent'
298 | }
299 |
300 | if orientation == .up && faceFeature.bounds.height > image.extent.height * 0.4 {
| `- error: value of type 'T' has no member 'extent'
301 | if let newF = detector.features(in: image, options: [CIDetectorImageOrientation: CGImagePropertyOrientation.down.rawValue]).first as? CIFaceFeature {
302 | orientation = .down
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:301:66: error: cannot find 'CIDetectorImageOrientation' in scope
299 |
300 | if orientation == .up && faceFeature.bounds.height > image.extent.height * 0.4 {
301 | if let newF = detector.features(in: image, options: [CIDetectorImageOrientation: CGImagePropertyOrientation.down.rawValue]).first as? CIFaceFeature {
| `- error: cannot find 'CIDetectorImageOrientation' in scope
302 | orientation = .down
303 | faceFeature = newF
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:301:147: error: cannot find type 'CIFaceFeature' in scope
299 |
300 | if orientation == .up && faceFeature.bounds.height > image.extent.height * 0.4 {
301 | if let newF = detector.features(in: image, options: [CIDetectorImageOrientation: CGImagePropertyOrientation.down.rawValue]).first as? CIFaceFeature {
| `- error: cannot find type 'CIFaceFeature' in scope
302 | orientation = .down
303 | faceFeature = newF
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:307:56: error: value of type 'T' has no member 'orientationTransform'
305 | }
306 |
307 | let bounds = faceFeature.bounds.applying(image.orientationTransform(for: orientation))
| `- error: value of type 'T' has no member 'orientationTransform'
308 |
309 | return .success(Value(image.oriented(orientation), bounds))
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:309:37: error: value of type 'T' has no member 'oriented'
307 | let bounds = faceFeature.bounds.applying(image.orientationTransform(for: orientation))
308 |
309 | return .success(Value(image.oriented(orientation), bounds))
| `- error: value of type 'T' has no member 'oriented'
310 | }
311 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:315:26: error: value of type 'T' has no member 'extent'
313 | public func perspectiveCorrection(boundingBox box: CGRect, topLeft: CGPoint, topRight: CGPoint, bottomLeft: CGPoint, bottomRight: CGPoint) -> PerspectiveCorrectionResult {
314 |
315 | let size = image.extent.size
| `- error: value of type 'T' has no member 'extent'
316 | let boundingBox = box.scaled(to: size)
317 | if image.extent.contains(boundingBox) {
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:317:18: error: value of type 'T' has no member 'extent'
315 | let size = image.extent.size
316 | let boundingBox = box.scaled(to: size)
317 | if image.extent.contains(boundingBox) {
| `- error: value of type 'T' has no member 'extent'
318 | // Rectify the detected image and reduce it to inverted grayscale for applying model.
319 | let topLeft = topLeft.scaled(to: size)
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:325:37: error: cannot find 'CIVector' in scope
323 | let outputImage = image.cropped(to: boundingBox)
324 | .applyingFilter("CIPerspectiveCorrection", parameters: [
325 | "inputTopLeft": CIVector(cgPoint: topLeft),
| `- error: cannot find 'CIVector' in scope
326 | "inputTopRight": CIVector(cgPoint: topRight),
327 | "inputBottomLeft": CIVector(cgPoint: bottomLeft),
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:326:38: error: cannot find 'CIVector' in scope
324 | .applyingFilter("CIPerspectiveCorrection", parameters: [
325 | "inputTopLeft": CIVector(cgPoint: topLeft),
326 | "inputTopRight": CIVector(cgPoint: topRight),
| `- error: cannot find 'CIVector' in scope
327 | "inputBottomLeft": CIVector(cgPoint: bottomLeft),
328 | "inputBottomRight": CIVector(cgPoint: bottomRight)
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:327:40: error: cannot find 'CIVector' in scope
325 | "inputTopLeft": CIVector(cgPoint: topLeft),
326 | "inputTopRight": CIVector(cgPoint: topRight),
327 | "inputBottomLeft": CIVector(cgPoint: bottomLeft),
| `- error: cannot find 'CIVector' in scope
328 | "inputBottomRight": CIVector(cgPoint: bottomRight)
329 | ])
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:328:41: error: cannot find 'CIVector' in scope
326 | "inputTopRight": CIVector(cgPoint: topRight),
327 | "inputBottomLeft": CIVector(cgPoint: bottomLeft),
328 | "inputBottomRight": CIVector(cgPoint: bottomRight)
| `- error: cannot find 'CIVector' in scope
329 | ])
330 | return .success(Value(outputImage, boundingBox))
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:323:37: error: value of type 'T' has no member 'cropped'
321 | let bottomLeft = bottomLeft.scaled(to: size)
322 | let bottomRight = bottomRight.scaled(to: size)
323 | let outputImage = image.cropped(to: boundingBox)
| `- error: value of type 'T' has no member 'cropped'
324 | .applyingFilter("CIPerspectiveCorrection", parameters: [
325 | "inputTopLeft": CIVector(cgPoint: topLeft),
error: emit-module command failed with exit code 1 (use -v to see invocation)
[9/12] Compiling Evil_macOS AdaptiveThresholdFilter.swift
[10/12] Compiling Evil_macOS Error.swift
[11/12] Emitting module Evil_macOS
/Users/admin/builder/spi-builder-workspace/Source/Evil.swift:44:39: error: cannot find type 'CIImage' in scope
42 | /// - parameter images: 将要识别的图片数组
43 | ///
44 | public func prediction(_ images: [CIImage]) throws -> [String?] {
| `- error: cannot find type 'CIImage' in scope
45 | let coreModel = try VNCoreMLModel(for: model)
46 | let request = VNCoreMLRequest(model: coreModel)
/Users/admin/builder/spi-builder-workspace/Source/Evil.swift:44:5: warning: 'public' modifier is redundant for instance method declared in a public extension
42 | /// - parameter images: 将要识别的图片数组
43 | ///
44 | public func prediction(_ images: [CIImage]) throws -> [String?] {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
45 | let coreModel = try VNCoreMLModel(for: model)
46 | let request = VNCoreMLRequest(model: coreModel)
/Users/admin/builder/spi-builder-workspace/Source/NSImage.swift:13:9: warning: 'public' modifier is redundant for initializer declared in a public extension
11 |
12 | public extension CIImage {
13 | public convenience init?(image: NSImage) {
| `- warning: 'public' modifier is redundant for initializer declared in a public extension
14 | guard let tiffData = image.tiffRepresentation else { return nil }
15 | self.init(data: tiffData)
/Users/admin/builder/spi-builder-workspace/Source/NSImage.swift:20:9: warning: 'public' modifier is redundant for property declared in a public extension
18 |
19 | public extension NSImage {
20 | public var cgImage: CGImage? {
| `- warning: 'public' modifier is redundant for property declared in a public extension
21 | var rect = CGRect(origin: CGPoint.zero, size: size)
22 | return cgImage(forProposedRect: &rect, context: nil, hints: nil)
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:13:30: error: cannot find type 'CIImage' in scope
11 |
12 | /// debugger 输出每一步的处理结果
13 | public typealias Debugger = (CIImage) -> ()
| `- error: cannot find type 'CIImage' in scope
14 |
15 | /// 配置预处理器
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:20:49: error: cannot find type 'CIColor' in scope
18 | public static var `default`: Configuration { return Configuration() }
19 |
20 | public var colorMonochromeFilterInputColor: CIColor? // CIColorMonochrome kCIInputColorKey 参数
| `- error: cannot find type 'CIColor' in scope
21 | public var colorControls: (CGFloat, CGFloat, CGFloat) // CIColorControls Saturation, Brightness, Contrast
22 | public var exposureAdjustEV: CGFloat // CIExposureAdjust IInputEVKey
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:47:23: error: cannot find type 'CIImage' in scope
45 |
46 | public struct Value {
47 | public let image: CIImage
| `- error: cannot find type 'CIImage' in scope
48 | public let bounds: CGRect
49 |
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:50:27: error: cannot find type 'CIImage' in scope
48 | public let bounds: CGRect
49 |
50 | public init (_ image: CIImage, _ bounds: CGRect) {
| `- error: cannot find type 'CIImage' in scope
51 | self.image = image
52 | self.bounds = bounds
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:98:11: error: cannot find type 'CIImage' in scope
96 | }
97 |
98 | extension CIImage: Preprocessable {}
| `- error: cannot find type 'CIImage' in scope
99 |
100 | @available(OSX 10.13, iOS 11.0, *)
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:102:43: error: cannot find type 'CIImage' in scope
100 | @available(OSX 10.13, iOS 11.0, *)
101 | extension CGImage: Preprocessable {
102 | public var preprocessor: Preprocessor<CIImage> {
| `- error: cannot find type 'CIImage' in scope
103 | return CIImage(cgImage: self).preprocessor
104 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:108:43: error: cannot find type 'CIImage' in scope
106 |
107 | extension Value: Preprocessable {
108 | public var preprocessor: Preprocessor<CIImage> {
| `- error: cannot find type 'CIImage' in scope
109 | return image.preprocessor
110 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:114:5: warning: 'public' modifier is redundant for instance method declared in a public extension
112 |
113 | public extension Valueable where T == Value {
114 | public func process(conf: Configuration = Configuration.`default`, debugger: Debugger? = nil) -> ProcessedResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
115 | return value?.preprocessor.process(conf: conf, debugger: debugger) ?? .failure(.notFound)
116 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:118:5: warning: 'public' modifier is redundant for instance method declared in a public extension
116 | }
117 |
118 | public func divideText(result resize: CGSize? = nil, adjustment: Bool = false, debugger: Debugger? = nil) -> DivideResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
119 | return value?.preprocessor.divideText(result: resize, adjustment: adjustment, debugger: debugger) ?? .failure(.notFound)
120 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:122:5: warning: 'public' modifier is redundant for instance method declared in a public extension
120 | }
121 |
122 | public func correctionByFace() -> FaceCorrectionResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
123 | return value?.preprocessor.correctionByFace() ?? .failure(.notFound)
124 | }
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:128:40: error: cannot find type 'CIImage' in scope
126 |
127 | @available(OSX 10.13, iOS 11.0, *)
128 | public extension Preprocessor where T: CIImage {
| `- error: cannot find type 'CIImage' in scope
129 |
130 | /// 返回处理后的CIImage对象
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:138:5: warning: 'public' modifier is redundant for instance method declared in a public extension
136 | /// - returns: retrun processed iamge.
137 | ///
138 | public func process(conf: Configuration = Configuration.`default`, debugger: Debugger? = nil) -> ProcessedResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
139 |
140 | var inputImage: CIImage = self.image
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:188:5: warning: 'public' modifier is redundant for instance method declared in a public extension
186 | /// - returns: 返回分割结果
187 | ///
188 | public func divideText(result resize: CGSize? = nil, adjustment: Bool = true, debugger: Debugger? = nil) -> DivideResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
189 |
190 | let detectTextRequest = VNDetectTextRectanglesRequest()
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:233:5: warning: 'public' modifier is redundant for instance method declared in a public extension
231 | ///
232 | ///
233 | public func croppedMaxRectangle() -> CorpMaxRectangleResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
234 |
235 | let request = VNDetectRectanglesRequest()
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:264:5: warning: 'public' modifier is redundant for instance method declared in a public extension
262 | ///
263 | ///
264 | public func correctionByFace() -> FaceCorrectionResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
265 |
266 | let detector = CIDetector(ofType: CIDetectorTypeFace, context: nil, options: [CIDetectorAccuracy: CIDetectorAccuracyLow])!
/Users/admin/builder/spi-builder-workspace/Source/Preprocessor.swift:313:5: warning: 'public' modifier is redundant for instance method declared in a public extension
311 |
312 | // 矩形透视矫正
313 | public func perspectiveCorrection(boundingBox box: CGRect, topLeft: CGPoint, topRight: CGPoint, bottomLeft: CGPoint, bottomRight: CGPoint) -> PerspectiveCorrectionResult {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
314 |
315 | let size = image.extent.size
/Users/admin/builder/spi-builder-workspace/Source/Recognizer.swift:144:5: warning: 'public' modifier is redundant for instance method declared in a public extension
142 |
143 | public extension Valueable where T == Value {
144 | public func cropChineseIDCardNumberArea() -> Result<Value> {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
145 | guard let image = value?.image else {
146 | return .failure(.notFound)
/Users/admin/builder/spi-builder-workspace/Source/Recognizer.swift:153:5: warning: 'public' modifier is redundant for instance method declared in a public extension
151 |
152 | public extension CIImage {
153 | public func cropChineseIDCardNumberArea() -> Value {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
154 | // 截取 数字区
155 | // 按照真实比例截取,身份证号码区
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:14:5: warning: 'public' modifier is redundant for instance method declared in a public extension
12 |
13 | public extension CGRect {
14 | public func scaled(to size: CGSize) -> CGRect {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
15 | return CGRect(
16 | x: self.origin.x * size.width,
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:23:5: warning: 'public' modifier is redundant for property declared in a public extension
21 | }
22 |
23 | public var area: CGFloat {
| `- warning: 'public' modifier is redundant for property declared in a public extension
24 | return size.width * size.height
25 | }
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:29:5: warning: 'public' modifier is redundant for instance method declared in a public extension
27 |
28 | public extension CGPoint {
29 | public func scaled(to size: CGSize) -> CGPoint {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
30 | return CGPoint(x: self.x * size.width, y: self.y * size.height)
31 | }
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:36:5: warning: 'public' modifier is redundant for instance method declared in a public extension
34 | public extension CIImage {
35 |
36 | public func resize(_ size: CGSize) -> CIImage {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
37 | var outputImage = self
38 | if extent.width > size.width || extent.height > size.height {
/Users/admin/builder/spi-builder-workspace/Source/Utils.swift:53:5: warning: 'public' modifier is redundant for instance method declared in a public extension
51 | public extension CGImage {
52 |
53 | public func pixelBuffer(_ colorspace: CGColorSpace = CGColorSpaceCreateDeviceRGB()) -> CVPixelBuffer? {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
54 | var pb: CVPixelBuffer? = nil
55 |
[12/12] Compiling Evil_macOS Evil.swift
/Users/admin/builder/spi-builder-workspace/Source/Evil.swift:44:39: error: cannot find type 'CIImage' in scope
42 | /// - parameter images: 将要识别的图片数组
43 | ///
44 | public func prediction(_ images: [CIImage]) throws -> [String?] {
| `- error: cannot find type 'CIImage' in scope
45 | let coreModel = try VNCoreMLModel(for: model)
46 | let request = VNCoreMLRequest(model: coreModel)
/Users/admin/builder/spi-builder-workspace/Source/Evil.swift:44:5: warning: 'public' modifier is redundant for instance method declared in a public extension
42 | /// - parameter images: 将要识别的图片数组
43 | ///
44 | public func prediction(_ images: [CIImage]) throws -> [String?] {
| `- warning: 'public' modifier is redundant for instance method declared in a public extension
45 | let coreModel = try VNCoreMLModel(for: model)
46 | let request = VNCoreMLRequest(model: coreModel)
BUILD FAILURE 6.0 macosSpm