Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-7957] SPM errors with time limit only on Linux #5355

Open
swift-ci opened this issue Jun 10, 2018 · 9 comments
Open

[SR-7957] SPM errors with time limit only on Linux #5355

swift-ci opened this issue Jun 10, 2018 · 9 comments
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-7957
Radar rdar://problem/32390056
Original Reporter guidomb (JIRA User)
Type Bug

Attachment: Download

Environment

Swift version 4.1 (swift-4.1-RELEASE) on Linux

Swift version 4.2-dev (LLVM a38ff55b31, Clang 5272858825, Swift 1a8b66e5fc)

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 1a862aa428f1b262210da3f5b1791e38

Issue Description:

When building my project on Linux I get the following error

swift test          
Fetching https://github.com/timburks/SwiftyBase64
Fetching https://github.com/vapor/core.git
Fetching https://github.com/llvm-swift/FileCheck.git
Fetching https://github.com/antitypical/Result.git
Fetching https://github.com/daltoniam/common-crypto-spm
Fetching https://github.com/Quick/Quick.git
Fetching https://github.com/apple/swift-nio-ssl-support.git
Fetching https://github.com/daltoniam/zlib-spm.git
Fetching https://github.com/krzyzanowskim/CryptoSwift.git
Fetching https://github.com/vapor/http.git
Fetching https://github.com/ReactiveCocoa/ReactiveSwift
Fetching https://github.com/apple/swift-nio-ssl.git
Fetching https://github.com/attaswift/SipHash
Fetching https://github.com/attaswift/BigInt
Fetching https://github.com/Quick/Nimble.git
Fetching https://github.com/SlackKit/SKRTMAPI
Fetching https://github.com/SlackKit/SKWebAPI
Fetching https://github.com/SlackKit/SKClient
Fetching https://github.com/SlackKit/SKCore
Fetching https://github.com/daltoniam/Starscream
Fetching https://github.com/apple/swift-nio.git
Fetching https://github.com/apple/swift-nio-zlib-support.git
Fetching https://github.com/typelift/SwiftCheck.git
Fetching https://github.com/vapor/engine
Fetching https://github.com/vapor/crypto.git
Fetching https://github.com/vapor/tls.git
Fetching https://github.com/vapor/sockets.git
Fetching https://github.com/vapor/random.git
error: reachedTimeLimit
'BotEngine' /botengine: error: product dependency 'ReactiveSwift' not found
'BotEngine' /botengine: error: product dependency 'ReactiveSwift' not found
'BotEngine' /botengine: error: product dependency 'SKCore' not found
'BotEngine' /botengine: error: product dependency 'SKClient' not found
'BotEngine' /botengine: error: product dependency 'SKRTMAPI' not found
'BotEngine' /botengine: error: product dependency 'HTTP' not found
'BotEngine' /botengine: error: product dependency 'SwiftCheck' not found
'BotEngine' /botengine: error: product dependency 'CryptoSwift' not found
'BotEngine' /botengine: error: product dependency 'BigInt' not found
'BotEngine' /botengine: error: product dependency 'SwiftyBase64' not found
'BotEngine' /botengine: error: product dependency 'ReactiveSwift' not found

If I run with verbose option

swift test --verbose
which clang
/usr/bin/swiftc --driver-mode=swift -L /usr/lib/swift/pm/4 -lPackageDescription -suppress-warnings -swift-version 4 -I /usr/lib/swift/pm/4 -sdk / /botengine/Package.swift -fileno 5
git -C /botengine/.build/repositories/SwiftCheck.git--2468510835481337502 rev-parse --is-bare-repository
git -C /botengine/.build/repositories/SKWebAPI--1977491024196041163 rev-parse --is-bare-repository
git -C /botengine/.build/repositories/Nimble.git-1795216376529495991 rev-parse --is-bare-repository
git -C /botengine/.build/repositories/common-crypto-spm-6888690048933629311 rev-parse --is-bare-repository
/usr/bin/swiftc --driver-mode=swift -L /usr/lib/swift/pm/4 -lPackageDescription -suppress-warnings -swift-version 4 -I /usr/lib/swift/pm/4 -sdk / /tmp/TemporaryFile.buPteM.swift -fileno 18
Updating https://github.com/typelift/SwiftCheck.git
Updating https://github.com/Quick/Nimble.git
Updating https://github.com/daltoniam/common-crypto-spm
Updating https://github.com/SlackKit/SKWebAPI
git -C /botengine/.build/repositories/SwiftCheck.git--2468510835481337502 remote update -p
git -C /botengine/.build/repositories/common-crypto-spm-6888690048933629311 remote update -pgit -C /botengine/.build/repositories/Nimble.git-1795216376529495991 remote update -pgit -C /botengine/.build/repositories/SKWebAPI--1977491024196041163 remote update -p



git -C /botengine/.build/repositories/Result.git--1069154023768325285 rev-parse --verify 'f460dee9c9de710463c91a505c1b4a566de7621c^{tree}'
git -C /botengine/.build/repositories/Result.git--1069154023768325285 ls-tree 0e6c150a6c39c639ca8b9f8849e8f9e377c1865e
git -C /botengine/.build/repositories/Result.git--1069154023768325285 cat-file -p 30043775e981a8ab7506387b3ba4271ebbe008db
git -C /botengine/.build/repositories/Result.git--1069154023768325285 rev-parse --verify '3.2.2^{commit}'
git -C /botengine/.build/repositories/Result.git--1069154023768325285 rev-parse --verify 'f460dee9c9de710463c91a505c1b4a566de7621c^{tree}'
git -C /botengine/.build/repositories/Result.git--1069154023768325285 ls-tree 0e6c150a6c39c639ca8b9f8849e8f9e377c1865e
git -C /botengine/.build/repositories/Result.git--1069154023768325285 cat-file -p 30043775e981a8ab7506387b3ba4271ebbe008db
git -C /botengine/.build/repositories/Result.git--1069154023768325285 cat-file -p 30043775e981a8ab7506387b3ba4271ebbe008db
/usr/bin/swiftc --driver-mode=swift -L /usr/lib/swift/pm/3 -lPackageDescription -suppress-warnings -swift-version 3 -I /usr/lib/swift/pm/3 -sdk / /tmp/TemporaryFile.dag2sb.swift -fileno 9
git -C /botengine/.build/repositories/Result.git--1069154023768325285 rev-parse --verify '3.2.1^{commit}'
git -C /botengine/.build/repositories/Result.git--1069154023768325285 rev-parse --verify '2af7c146071c8d8fb3953f19924ecebf15c88ea7^{tree}'
git -C /botengine/.build/repositories/Result.git--1069154023768325285 ls-tree 2cb8b543f96ec1d304d5cb8e903e5fc6fd5bbbed
git -C /botengine/.build/repositories/Result.git--1069154023768325285 cat-file -p 30043775e981a8ab7506387b3ba4271ebbe008db
git -C /botengine/.build/repositories/Result.git--1069154023768325285 rev-parse --verify '3.2.1^{commit}'
git -C /botengine/.build/repositories/Result.git--1069154023768325285 rev-parse --verify '2af7c146071c8d8fb3953f19924ecebf15c88ea7^{tree}'
git -C /botengine/.build/repositories/Result.git--1069154023768325285 ls-tree 2cb8b543f96ec1d304d5cb8e903e5fc6fd5bbbed
git -C /botengine/.build/repositories/Result.git--1069154023768325285 cat-file -p 30043775e981a8ab7506387b3ba4271ebbe008db
git -C /botengine/.build/repositories/Result.git--1069154023768325285 cat-file -p 30043775e981a8ab7506387b3ba4271ebbe008db
/usr/bin/swiftc --driver-mode=swift -L /usr/lib/swift/pm/3 -lPackageDescription -suppress-warnings -swift-version 3 -I /usr/lib/swift/pm/3 -sdk / /tmp/TemporaryFile.mKN4n2.swift -fileno 9




error: reachedTimeLimit
'BotEngine' /botengine: error: product dependency 'ReactiveSwift' not found
'BotEngine' /botengine: error: product dependency 'CryptoSwift' not found
'BotEngine' /botengine: error: product dependency 'BigInt' not found
'BotEngine' /botengine: error: product dependency 'SwiftyBase64' not found
'BotEngine' /botengine: error: product dependency 'SwiftCheck' not found
'BotEngine' /botengine: error: product dependency 'ReactiveSwift' not found
'BotEngine' /botengine: error: product dependency 'SKCore' not found
'BotEngine' /botengine: error: product dependency 'SKClient' not found
'BotEngine' /botengine: error: product dependency 'SKRTMAPI' not found
'BotEngine' /botengine: error: product dependency 'HTTP' not found
'BotEngine' /botengine: error: product dependency 'ReactiveSwift' not found

I've attached a project that reproduces the issue. This project includes a docker setup to test with Swift 4.1 and Swift 4.2 on Linux. Just run the docker-build.sh or docker-build-latest.sh scripts.

@swift-ci
Copy link
Contributor Author

Comment by Guido Marucci Blas (JIRA)

Could it be that the SPM hangs here for some reason only on Linux?

@swift-ci
Copy link
Contributor Author

Comment by Guido Marucci Blas (JIRA)

Also Why SPM uses its own Process implementation instead of the one from Foundation?

@swift-ci
Copy link
Contributor Author

Comment by Guido Marucci Blas (JIRA)

This is super weird. I've just commented out some dependencies an run the build script again and it worked. I assume that because I didn't delete the Package.resolved file and because I'm building the project not updating dependencies that is why all the dependencies are being built, even the ones I commented out.

Here is the Package.swift file from the attached project with commented out dependencies

 // swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "Foo",
    products: [
        // Products define the executables and libraries produced by a package, and make them visible to other packages.
        .library(
            name: "Foo",
            targets: ["Foo"]),
    ],
    dependencies: [
      // Dependencies
      .package(url: "https://github.com/ReactiveCocoa/ReactiveSwift", from: "3.1.0"),
      // .package(url: "https://github.com/vapor/http.git", from: "3.0.0"),
      .package(url: "https://github.com/SlackKit/SKCore", .upToNextMinor(from: "4.1.0")),
      .package(url: "https://github.com/SlackKit/SKClient", .upToNextMinor(from: "4.1.0")),
      .package(url: "https://github.com/SlackKit/SKRTMAPI", .upToNextMinor(from: "4.1.0")),
      // .package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "0.8.0"),
      // .package(url: "https://github.com/attaswift/BigInt", from: "3.0.0"),
      // .package(url: "https://github.com/timburks/SwiftyBase64", from: "1.2.0"),

      // Test dependencies
      .package(url: "https://github.com/typelift/SwiftCheck.git", from: "0.8.1")
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
        .target(
            name: "Foo",
            dependencies: [
              "ReactiveSwift",
              "SKCore",
              "SKClient",
              "SKRTMAPI",
              // "HTTP",
              // "CryptoSwift",
              // "BigInt",
              // "SwiftyBase64"
            ]),
        .testTarget(
            name: "FooTests",
            dependencies: ["Foo", "SwiftCheck"]),
    ]
)

When I run the docker-build-latest.sh script I've got the following output

Swift version: Swift version 4.2-dev (LLVM a38ff55b31, Clang 5272858825, Swift 1a8b66e5fc)
Target: x86_64-unknown-linux-gnu
Build path: ./.build-ubuntu/x86_64-unknown-linux/release
Build flags:  --build-path ./.build-ubuntu -c release
Updating https://github.com/apple/swift-nio.git
Updating https://github.com/antitypical/Result.git
Updating https://github.com/SlackKit/SKCore
Updating https://github.com/SlackKit/SKWebAPI
Updating https://github.com/apple/swift-nio-ssl.git
Updating https://github.com/daltoniam/zlib-spm.git
Updating https://github.com/SlackKit/SKRTMAPI
Updating https://github.com/apple/swift-nio-ssl-support.git
Updating https://github.com/krzyzanowskim/CryptoSwift.git
Updating https://github.com/daltoniam/Starscream
Updating https://github.com/attaswift/BigInt
Updating https://github.com/ReactiveCocoa/ReactiveSwift
Updating https://github.com/llvm-swift/FileCheck.git
Updating https://github.com/Quick/Nimble.git
Updating https://github.com/attaswift/SipHash
Updating https://github.com/daltoniam/common-crypto-spm
Updating https://github.com/vapor/core.git
Updating https://github.com/SlackKit/SKClient
Updating https://github.com/vapor/http.git
Updating https://github.com/typelift/SwiftCheck.git
Updating https://github.com/Quick/Quick.git
Updating https://github.com/timburks/SwiftyBase64
Updating https://github.com/apple/swift-nio-zlib-support.git
Updating https://github.com/vapor/engine
Updating https://github.com/vapor/crypto.git
Updating https://github.com/vapor/tls.git
Updating https://github.com/vapor/random.git
Updating https://github.com/vapor/sockets.git
Fetching https://github.com/vapor/ctls.git
Fetching https://github.com/vapor/bits.git
Fetching https://github.com/vapor/debugging.git
Fetching https://github.com/vapor/async.git
Fetching https://github.com/vapor/cepoll.git
Completed resolution in 39.72s
Cloning https://github.com/vapor/crypto.git
Resolving https://github.com/vapor/crypto.git at 2.1.3
Cloning https://github.com/vapor/bits.git
Resolving https://github.com/vapor/bits.git at 1.1.1
Cloning https://github.com/vapor/engine
Resolving https://github.com/vapor/engine at 2.2.5
Cloning https://github.com/SlackKit/SKClient
Resolving https://github.com/SlackKit/SKClient at 4.1.0
Cloning https://github.com/SlackKit/SKCore
Resolving https://github.com/SlackKit/SKCore at 4.1.1
Cloning https://github.com/typelift/SwiftCheck.git
Resolving https://github.com/typelift/SwiftCheck.git at 0.10.0
Cloning https://github.com/vapor/core.git
Resolving https://github.com/vapor/core.git at 2.2.1
Cloning https://github.com/vapor/debugging.git
Resolving https://github.com/vapor/debugging.git at 1.1.1
Cloning https://github.com/antitypical/Result.git
Resolving https://github.com/antitypical/Result.git at 3.2.4
Cloning https://github.com/vapor/tls.git
Resolving https://github.com/vapor/tls.git at 2.1.3
Cloning https://github.com/vapor/ctls.git
Resolving https://github.com/vapor/ctls.git at 1.1.3
Cloning https://github.com/SlackKit/SKWebAPI
Resolving https://github.com/SlackKit/SKWebAPI at 4.1.3
Cloning https://github.com/vapor/random.git
Resolving https://github.com/vapor/random.git at 1.2.0
Cloning https://github.com/vapor/sockets.git
Resolving https://github.com/vapor/sockets.git at 2.2.3
Cloning https://github.com/ReactiveCocoa/ReactiveSwift
Resolving https://github.com/ReactiveCocoa/ReactiveSwift at 3.1.0
Cloning https://github.com/SlackKit/SKRTMAPI
Resolving https://github.com/SlackKit/SKRTMAPI at 4.1.2
Cloning https://github.com/Quick/Nimble.git
Resolving https://github.com/Quick/Nimble.git at 7.1.2
Cloning https://github.com/Quick/Quick.git
Resolving https://github.com/Quick/Quick.git at 1.3.0
Cloning https://github.com/llvm-swift/FileCheck.git
Resolving https://github.com/llvm-swift/FileCheck.git at 0.0.7
'CTLS' /spmbug/.build-ubuntu/checkouts/ctls.git-7442398044840813812: warning: Ignoring declared target(s) 'CTLS' in the system package
Compile Swift Module 'libc' (1 sources)
Compile Swift Module 'Result' (2 sources)
Compile Swift Module 'SKCore' (27 sources)
Compile Swift Module 'SwiftCheck' (15 sources)
Compile Swift Module 'Debugging' (1 sources)
Compile Swift Module 'Bits' (19 sources)
Compile Swift Module 'ReactiveSwift' (21 sources)
Compile CHTTP http_parser.c
Compile Swift Module 'Core' (23 sources)
Compile Swift Module 'Transport' (10 sources)
Compile Swift Module 'Random' (6 sources)
/spmbug/.build-ubuntu/checkouts/SKCore-7598271438740777133/Sources/Attachment.swift:64:86: warning: 'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value
        markdownEnabledFields = (attachment?["mrkdwn_in"] as? [String]).map { Set($0.flatMap(AttachmentTextField.init)) }
                                                                                     ^
/spmbug/.build-ubuntu/checkouts/SKCore-7598271438740777133/Sources/Attachment.swift:64:86: note: use 'compactMap(_:)' instead
        markdownEnabledFields = (attachment?["mrkdwn_in"] as? [String]).map { Set($0.flatMap(AttachmentTextField.init)) }
                                                                                     ^~~~~~~
                                                                                     compactMap
Compile Swift Module 'URI' (6 sources)
Compile Swift Module 'Sockets' (22 sources)
Compile Swift Module 'SKWebAPI' (3 sources)
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/UnidirectionalBinding.swift:25:17: warning: redeclaration of associated type 'Error' from protocol 'SignalProducerConvertible' is better expressed as a 'where' clause on the protocol
        associatedtype Error: Swift.Error
        ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~

/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/SignalProducer.swift:510:17: note: 'Error' declared here
        associatedtype Error: Swift.Error
                       ^
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/UnidirectionalBinding.swift:25:24: warning: redundant conformance constraint 'Self.Error': 'Error'
        associatedtype Error: Swift.Error
                              ^
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/UnidirectionalBinding.swift:20:32: note: conformance constraint 'Self.Error': 'Error' implied here
public protocol BindingSource: SignalProducerConvertible {
                               ^
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/Atomic.swift:199:10: warning: 'deinitialize()' is deprecated: the default argument to deinitialize(count:) has been removed, please specify the count explicitly
                        _lock.deinitialize()
                              ^
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/Atomic.swift:200:10: warning: 'deallocate(capacity:)' is deprecated: Swift currently only supports freeing entire heap blocks, use deallocate() instead
                        _lock.deallocate(capacity: 1)
                              ^
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/Atomic.swift:154:10: warning: 'deinitialize()' is deprecated: the default argument to deinitialize(count:) has been removed, please specify the count explicitly
                                attr.deinitialize()
                                     ^
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/Atomic.swift:155:10: warning: 'deallocate(capacity:)' is deprecated: Swift currently only supports freeing entire heap blocks, use deallocate() instead
                                attr.deallocate(capacity: 1)
                                     ^
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/Disposable.swift:162:25: warning: 'flatMap' is deprecated: Please use compactMap(_:) for the case where closure returns an optional value
                self.init(disposables.flatMap { $0 })
                                      ^
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/Disposable.swift:162:25: note: use 'compactMap(_:)' instead
                self.init(disposables.flatMap { $0 })
                                      ^~~~~~~
                                      compactMap
/spmbug/.build-ubuntu/checkouts/ReactiveSwift-4578952365406083894/Sources/ValidatingProperty.swift:193:21: warning: all paths through this function will call itself
        public convenience init<U, E>(
                           ^
Compile Swift Module 'SKClient' (1 sources)
/spmbug/.build-ubuntu/checkouts/sockets.git--6103919066002726700/Sources/Sockets/Address/Address.swift:124:17: warning: 'deallocate(capacity:)' is deprecated: Swift currently only supports freeing entire heap blocks, use deallocate() instead
        strData.deallocate(capacity: Int(maxLen))
                ^
/spmbug/.build-ubuntu/checkouts/sockets.git--6103919066002726700/Sources/Sockets/Address/Address.swift:142:19: warning: 'deallocate(capacity:)' is deprecated: Swift currently only supports freeing entire heap blocks, use deallocate() instead
        self._raw.deallocate(capacity: 1)
                  ^
/spmbug/.build-ubuntu/checkouts/sockets.git--6103919066002726700/Sources/Sockets/Address/Address.swift:171:18: warning: 'deallocate(capacity:)' is deprecated: Swift currently only supports freeing entire heap blocks, use deallocate() instead
            addr.deallocate(capacity: 1)
                 ^
/spmbug/.build-ubuntu/checkouts/sockets.git--6103919066002726700/Sources/Sockets/Address/Address.swift:184:18: warning: 'deallocate(capacity:)' is deprecated: Swift currently only supports freeing entire heap blocks, use deallocate() instead
            addr.deallocate(capacity: 1)
                 ^
/spmbug/.build-ubuntu/checkouts/sockets.git--6103919066002726700/Sources/Sockets/Socket/Descriptor.swift:95:17: warning: 'deinitialize()' is deprecated: the default argument to deinitialize(count:) has been removed, please specify the count explicitly
            val.deinitialize()
                ^
/spmbug/.build-ubuntu/checkouts/sockets.git--6103919066002726700/Sources/Sockets/Socket/Descriptor.swift:96:17: warning: 'deallocate(capacity:)' is deprecated: Swift currently only supports freeing entire heap blocks, use deallocate() instead
            val.deallocate(capacity: 1)
                ^
/spmbug/.build-ubuntu/checkouts/sockets.git--6103919066002726700/Sources/Sockets/TCP/TCPInternetSocket.swift:106:18: warning: 'deallocate(capacity:)' is deprecated: Swift currently only supports freeing entire heap blocks, use deallocate() instead
            addr.deallocate(capacity: 1)
                 ^
/spmbug/.build-ubuntu/checkouts/sockets.git--6103919066002726700/Sources/Sockets/UDP/UDPSocket.swift:50:18: warning: 'deallocate(capacity:)' is deprecated: Swift currently only supports freeing entire heap blocks, use deallocate() instead
            addr.deallocate(capacity: 1)
                 ^
Compile Swift Module 'Crypto' (13 sources)
/spmbug/.build-ubuntu/checkouts/SwiftCheck.git--337719491866004998/Sources/SwiftCheck/WitnessedArbitrary.swift:127:22: warning: use of 'min' as reference to global function in module 'Swift' will change in future versions of Swift to reference instance method in generic struct 'Range' which comes via a conditional conformance
                                return Gen.pure((min(l, r) ..< max(l, r)))
                                                 ^
/spmbug/.build-ubuntu/checkouts/SwiftCheck.git--337719491866004998/Sources/SwiftCheck/WitnessedArbitrary.swift:127:22: note: use 'Swift.' to continue to reference the global function
                                return Gen.pure((min(l, r) ..< max(l, r)))
                                                 ^
                                                 Swift.
/spmbug/.build-ubuntu/checkouts/SwiftCheck.git--337719491866004998/Sources/SwiftCheck/WitnessedArbitrary.swift:127:36: warning: use of 'max' as reference to global function in module 'Swift' will change in future versions of Swift to reference instance method in generic struct 'Range' which comes via a conditional conformance
                                return Gen.pure((min(l, r) ..< max(l, r)))
                                                               ^
/spmbug/.build-ubuntu/checkouts/SwiftCheck.git--337719491866004998/Sources/SwiftCheck/WitnessedArbitrary.swift:127:36: note: use 'Swift.' to continue to reference the global function
                                return Gen.pure((min(l, r) ..< max(l, r)))
                                                               ^
                                                               Swift.
/spmbug/.build-ubuntu/checkouts/SwiftCheck.git--337719491866004998/Sources/SwiftCheck/WitnessedArbitrary.swift:147:56: warning: all paths through this function will call itself
        public static var arbitrary : Gen<LazySequence<Base>> {
                                                              ^
/spmbug/.build-ubuntu/checkouts/SwiftCheck.git--337719491866004998/Sources/SwiftCheck/WitnessedArbitrary.swift:140:58: warning: all paths through this function will call itself
        public static var arbitrary : Gen<LazyCollection<Base>> {
                                                                ^
Compile Swift Module 'TLS' (12 sources)
Compile Swift Module 'HTTP' (45 sources)
Compile Swift Module 'WebSockets' (14 sources)
Compile Swift Module 'SKRTMAPI' (3 sources)
Compile Swift Module 'Foo' (1 sources)
./.build-ubuntu/x86_64-unknown-linux/release/Foo

Uncommenting back and running the script produces the same error.

@swift-ci
Copy link
Contributor Author

Comment by Guido Marucci Blas (JIRA)

OK doing some binary search I found that the offender is .package(url: "https://github.com/vapor/http.git", from: "3.0.0"). Commenting out that line and building project fixes the issue (if a Package.resolved exists).

So a possible work around is to generate the Package.resolved file on macOS, then commenting vapor out and the building on linux.

@swift-ci
Copy link
Contributor Author

Comment by Guido Marucci Blas (JIRA)

Another update. Commenting all dependencies out except for vapor also works. So I guess there is some conflict with all this dependencies put together. I think both vapor and other packages depend on BigInt, CryptoSwift or SwiftyBase64 and maybe there is an issue there.

@swift-ci
Copy link
Contributor Author

Comment by Guido Marucci Blas (JIRA)

OK I think I found the real issue. One of my dependencies, SKRTMAPI also depends on Vapor but on a previous mayor version. SPM seems to fail to detect the version issue and fails.

https://github.com/SlackKit/SKRTMAPI/blob/master/Package.swift#L23

@swift-ci
Copy link
Contributor Author

Comment by Guido Marucci Blas (JIRA)

I'm pretty sure this is not a Linux only issue. I could only reproduce it on linux because SKRTMAPI is including that dependency only on Linux.

var dependency: Package.Dependency var target: Target 
#if os(macOS) || os(iOS) || os(tvOS) 
target = .target(name: "SKRTMAPI", dependencies: ["SKCore", "SKWebAPI", "Starscream"]) dependency = .package(url: "https://github.com/daltoniam/Starscream", .upToNextMajor(from: "3.0.0")) 
#else 
target = .target(name: "SKRTMAPI", dependencies: ["SKCore", "SKWebAPI", "WebSockets", "HTTP", "URI"]) 
dependency = .package(url: "https://github.com/vapor/engine", .upToNextMajor(from: "2.2.2")) 
#endif

@ankitspd
Copy link
Member

There you go 🙂. Awesome job of debugging the problem! We need to improve the dependency resolver diagnostics.

@swift-ci
Copy link
Contributor Author

swift-ci commented Dec 5, 2018

Comment by Gábor Sebestyén (JIRA)

Hi,

Just ran into this issue while trying to build a basic Kitura app on Arch Linux with a decent trunk version

Swift Version

[segabor@csihuhu HelloKitura]$ swift -version
Swift version 5.0-dev (LLVM 06a544889f, Clang 4710b9d3d7, Swift e4d1841424)
Target: x86_64-unknown-linux-gnu 

Issue

[segabor@csihuhu HelloKitura]$ swift build
Updating https://github.com/IBM-Swift/Kitura.git
Updating https://github.com/IBM-Swift/HeliumLogger.git
Updating https://github.com/RuntimeTools/SwiftMetrics.git
Updating https://github.com/IBM-Swift/Health.git
Updating https://github.com/IBM-Swift/CloudEnvironment.git
Updating https://github.com/IBM-Swift/Kitura-net.git
Updating https://github.com/IBM-Swift/TypeDecoder.git
Updating https://github.com/IBM-Swift/KituraContracts.git
Updating https://github.com/IBM-Swift/Kitura-TemplateEngine.git
Updating https://github.com/IBM-Swift/BlueSocket.git
Updating https://github.com/IBM-Swift/LoggerAPI.git
Updating https://github.com/IBM-Swift/BlueSSLService.git
Updating https://github.com/IBM-Swift/BlueSignals.git
Updating https://github.com/IBM-Swift/OpenSSL.git
Updating https://github.com/IBM-Swift/Swift-cfenv.git
Updating https://github.com/IBM-Swift/Configuration.git
Updating https://github.com/IBM-Swift/FileKit.git
Updating https://github.com/IBM-Swift/CEpoll.git
Updating https://github.com/IBM-Swift/CCurl.git
error: reachedTimeLimit
'Generator-Swiftserver-Projects' /home/segabor/Workspace/HelloKitura: error: could not find source files for target(s): Generator-Swiftserver-Projects; use the 'path' property in the Swift 4 manifest to set a custom target path

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants