MapboxGeocoder.swift icon indicating copy to clipboard operation
MapboxGeocoder.swift copied to clipboard

Compile Error

Open mhs2342 opened this issue 5 years ago • 2 comments

I am using Bitrise for my CI/CD pipeline and during the xcode test step I get the following errors:

❌  /Users/vagrant/git/Pods/MapboxGeocoder.swift/MapboxGeocoder/MBRectangularRegion.swift:44:40: instance method 'decode(_:forKey:)' requires that 'CLLocationCoordinate2D' conform to 'Decodable'
        self.southWest = try container.decode(CLLocationCoordinate2D.self, forKey: .southWest)
                                       ^
❌  /Users/vagrant/git/Pods/MapboxGeocoder.swift/MapboxGeocoder/MBRectangularRegion.swift:45:40: instance method 'decode(_:forKey:)' requires that 'CLLocationCoordinate2D' conform to 'Decodable'
        self.northEast = try container.decode(CLLocationCoordinate2D.self, forKey: .northEast)
                ^
❌  /Users/vagrant/git/Pods/MapboxGeocoder.swift/MapboxGeocoder/MBRectangularRegion.swift:51:30: argument type 'CLLocationCoordinate2D' does not conform to expected type 'Encodable'
        try container.encode(southWest, forKey: .southWest)
                ^
❌  /Users/vagrant/git/Pods/MapboxGeocoder.swift/MapboxGeocoder/MBRectangularRegion.swift:52:30: argument type 'CLLocationCoordinate2D' does not conform to expected type 'Encodable'
        try container.encode(northEast, forKey: .northEast)
                             ^
▸ Linking MapboxMobileEvents
▸ Generating 'MapboxMobileEvents.framework.dSYM'
▸ Compiling GoogleUtilities_vers.c
▸ Compiling GoogleUtilities-dummy.m
▸ Compiling GULUserDefaults.m
▸ Compiling GULSwizzler.m
▸ Compiling GULReachabilityChecker.m
▸ Compiling Polyline.swift
▸ Compiling Solar.swift
▸ Processing nanopb-Info.plist
▸ Processing WillowTreeScrollingTabController-Info.plist
▸ Generating 'nanopb.framework.dSYM'
▸ Processing Turf-Info.plist
▸ Processing Solar-Info.plist
▸ Generating 'Turf.framework.dSYM'
▸ Copying /Users/vagrant/git/Pods/MapboxMobileEvents/MapboxMobileEvents/Resources/logger.html
▸ Compiling Solar_vers.c
▸ Compiling Solar-dummy.m
▸ Compiling Polyline_vers.c
▸ Compiling Polyline-dummy.m
▸ Linking Solar
▸ Generating 'Solar.framework.dSYM'
▸ Linking Polyline
▸ Generating 'Polyline.framework.dSYM'
▸ Processing MapboxGeocoder.swift-Info.plist
❌  /Users/vagrant/git/Pods/MapboxGeocoder.swift/MapboxGeocoder/MBRectangularRegion.swift:44:40: instance method 'decode(_:forKey:)' requires that 'CLLocationCoordinate2D' conform to 'Decodable'
        self.southWest = try container.decode(CLLocationCoordinate2D.self, forKey: .southWest)
                                                                                                                                                                 ^
❌  /Users/vagrant/git/Pods/MapboxGeocoder.swift/MapboxGeocoder/MBRectangularRegion.swift:45:40: instance method 'decode(_:forKey:)' requires that 'CLLocationCoordinate2D' conform to 'Decodable'
        self.northEast = try container.decode(CLLocationCoordinate2D.self, forKey: .northEast)
                ^
❌  /Users/vagrant/git/Pods/MapboxGeocoder.swift/MapboxGeocoder/MBRectangularRegion.swift:51:30: argument type 'CLLocationCoordinate2D' does not conform to expected type 'Encodable'
        try container.encode(southWest, forKey: .southWest)
                ^
❌  /Users/vagrant/git/Pods/MapboxGeocoder.swift/MapboxGeocoder/MBRectangularRegion.swift:52:30: argument type 'CLLocationCoordinate2D' does not conform to expected type 'Encodable'
        try container.encode(northEast, forKey: .northEast)
                             ^

Here is a link to information about the machine running the xcode build tools: https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-xcode-10.2.x.log.

I can't recreate this problem on my local machine. Any ideas?

mhs2342 avatar Apr 23 '19 18:04 mhs2342

Would you mind sharing the xcodebuild command that Bitrise generates based on the Xcode Test step? Do you have any script on your CI that modifies a file named CoreLocation.swift where the Codable conformance resides?

frederoni avatar Apr 23 '19 19:04 frederoni

Sure

$ set -o pipefail && env "NSUnbufferedIO=YES" xcodebuild "-workspace" "D.A.P.xcworkspace" "-scheme" "Development" "build" "test" "-destination" "id=290D8EE7-A4AB-4004-B07C-5EF784DE30E9" | xcpretty "--color" "--report" "html" "--output" "/Users/vagrant/deploy/xcode-test-results-Development.html"

I don't have any scripts that modify that file

mhs2342 avatar Apr 23 '19 19:04 mhs2342