Closed oprisk closed 4 years ago
If you update to the latest package versions does this error go away?
Sorry for the delay. I updated to version 4.0.0-rc and error went away: from: .package(url: "https://github.com/vapor/fluent-mysql-driver.git", from: "4.0.0") to: .package(url: "https://github.com/vapor/fluent-sqlite-driver.git", from: "4.0.0-rc")
Presumably, "-rc" is the latest beta?
Are you switching to SQLite? There aren't any betas any more for the Fluent stuff so just 4.0.0 should work after a package update (swift package update
from the command line)
The issue is with MySQL driver, (disregard SQLite, it works just fine using "-rc" release, but not 4.0.0.)
I tested both MySQLdriver 4.0.0 and 4.0.0-rc, with the same error: /Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/fluent-mysql-driver/Sources/FluentMySQLDriver/FluentMySQLConfiguration.swift:130:34: error: extra argument 'requestTimeout' in call requestTimeout: self.connectionPoolTimeout,
I'm able to comment the extra parameter in the call, provided the project is opened via Xcode project, unable to change package opening the project in Xcode opening the package.swift (as they are dynamically linked packages)
Can you provide your package.resolved?
McBkPaolo.local /Users/paolo/_MtgDEV/_Server/MtgServer % swift package resolve
Fetching https://github.com/apple/swift-nio.git
Fetching https://github.com/vapor/fluent-sqlite-driver.git
Fetching https://github.com/vapor/routing-kit.git
Fetching https://github.com/apple/swift-nio-ssl.git
Fetching https://github.com/apple/swift-metrics.git
Fetching https://github.com/apple/swift-nio-extras.git
Fetching https://github.com/apple/swift-log.git
Fetching https://github.com/apple/swift-crypto.git
Fetching https://github.com/vapor/leaf-kit.git
Fetching https://github.com/vapor/fluent-kit.git
Fetching https://github.com/vapor/sqlite-nio.git
Fetching https://github.com/swift-server/swift-backtrace.git
Fetching https://github.com/vapor/websocket-kit.git
Fetching https://github.com/swift-server/async-http-client.git
Fetching https://github.com/vapor/vapor.git
Fetching https://github.com/vapor/async-kit.git
Fetching https://github.com/vapor/console-kit.git
Fetching https://github.com/vapor/fluent.git
Fetching https://github.com/vapor/leaf.git
Fetching https://github.com/apple/swift-nio-http2.git
Fetching https://github.com/vapor/sql-kit.git
Fetching https://github.com/vapor/sqlite-kit.git
Fetching https://github.com/vapor/fluent-mysql-driver.git
Fetching https://github.com/vapor/mysql-kit.git
Fetching https://github.com/vapor/mysql-nio.git
Cloning https://github.com/vapor/mysql-kit.git
Resolving https://github.com/vapor/mysql-kit.git at 4.1.0
Cloning https://github.com/vapor/mysql-nio.git
Resolving https://github.com/vapor/mysql-nio.git at 1.3.2
Cloning https://github.com/vapor/routing-kit.git
Resolving https://github.com/vapor/routing-kit.git at 4.1.0
Cloning https://github.com/apple/swift-crypto.git
Resolving https://github.com/apple/swift-crypto.git at 1.0.2
Cloning https://github.com/vapor/websocket-kit.git
Resolving https://github.com/vapor/websocket-kit.git at 2.1.0
Cloning https://github.com/vapor/fluent-mysql-driver.git
Resolving https://github.com/vapor/fluent-mysql-driver.git at 4.0.0-rc.2.2
Cloning https://github.com/apple/swift-nio-ssl.git
Resolving https://github.com/apple/swift-nio-ssl.git at 2.7.5
Cloning https://github.com/vapor/console-kit.git
Resolving https://github.com/vapor/console-kit.git at 4.1.1
Cloning https://github.com/vapor/fluent-kit.git
Resolving https://github.com/vapor/fluent-kit.git at 1.0.2
Cloning https://github.com/swift-server/swift-backtrace.git
Resolving https://github.com/swift-server/swift-backtrace.git at 1.2.0
Cloning https://github.com/vapor/vapor.git
Resolving https://github.com/vapor/vapor.git at 4.14.0
Cloning https://github.com/apple/swift-nio-extras.git
Resolving https://github.com/apple/swift-nio-extras.git at 1.5.1
Cloning https://github.com/apple/swift-log.git
Resolving https://github.com/apple/swift-log.git at 1.2.0
Cloning https://github.com/vapor/leaf-kit.git
Resolving https://github.com/vapor/leaf-kit.git at 1.0.0-rc.1.13
Cloning https://github.com/vapor/fluent.git
Resolving https://github.com/vapor/fluent.git at 4.0.0
Cloning https://github.com/apple/swift-nio.git
Resolving https://github.com/apple/swift-nio.git at 2.18.0
Cloning https://github.com/vapor/async-kit.git
Resolving https://github.com/vapor/async-kit.git at 1.1.1
Cloning https://github.com/apple/swift-nio-http2.git
Resolving https://github.com/apple/swift-nio-http2.git at 1.12.2
Cloning https://github.com/vapor/leaf.git
Resolving https://github.com/vapor/leaf.git at 4.0.0-rc.1.3
Cloning https://github.com/apple/swift-metrics.git
Resolving https://github.com/apple/swift-metrics.git at 2.0.0
Cloning https://github.com/swift-server/async-http-client.git
Resolving https://github.com/swift-server/async-http-client.git at 1.1.1
Cloning https://github.com/vapor/sql-kit.git
Resolving https://github.com/vapor/sql-kit.git at 3.5.0
McBkPaolo.local /Users/paolo/_MtgDEV/_Server/MtgServer % swift build
zsh: correct 'build' to '.build' [nyae]? n
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/fluent-mysql-driver/Sources/FluentMySQLDriver/FluentMySQLConfiguration.swift:130:34: error: extra argument 'requestTimeout' in call
requestTimeout: self.connectionPoolTimeout,
~~~~~^~~~~~~~~~~~~~~~~~~~~
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/fluent-mysql-driver/Sources/FluentMySQLDriver/FluentMySQLConfiguration.swift:130:34: error: extra argument 'requestTimeout' in call
requestTimeout: self.connectionPoolTimeout,
~~~~~^~~~~~~~~~~~~~~~~~~~~
[1524/1617] Compiling FluentMySQLDriver FluentMySQLDatabase.swift
disregard, out of sync with Xcode compile, re-running again
Run swift package update
- you're pulling in an old version of Fluent MySQL Driver, you want 4.0.0 https://github.com/vapor/fluent-mysql-driver/releases/tag/4.0.0
I ran swift package reset, swift package resolve, swift build I will redo with swift package update
without package update:
McBkPaolo.local /Users/paolo/_MtgDEV/_Server/MtgServer % swift package reset
McBkPaolo.local /Users/paolo/_MtgDEV/_Server/MtgServer % swift package resolve
Fetching https://github.com/vapor/leaf.git
Fetching https://github.com/vapor/vapor.git
Fetching https://github.com/apple/swift-nio-ssl.git
Fetching https://github.com/apple/swift-metrics.git
Fetching https://github.com/apple/swift-nio-http2.git
Fetching https://github.com/vapor/leaf-kit.git
Fetching https://github.com/vapor/fluent-mysql-driver.git
Fetching https://github.com/vapor/mysql-kit.git
Fetching https://github.com/vapor/console-kit.git
Fetching https://github.com/vapor/mysql-nio.git
Fetching https://github.com/vapor/sql-kit.git
Fetching https://github.com/vapor/fluent.git
Fetching https://github.com/apple/swift-crypto.git
Fetching https://github.com/swift-server/swift-backtrace.git
Fetching https://github.com/apple/swift-log.git
Fetching https://github.com/vapor/websocket-kit.git
Fetching https://github.com/apple/swift-nio.git
Fetching https://github.com/vapor/routing-kit.git
Fetching https://github.com/apple/swift-nio-extras.git
Fetching https://github.com/vapor/async-kit.git
Fetching https://github.com/swift-server/async-http-client.git
Fetching https://github.com/vapor/fluent-kit.git
Cloning https://github.com/swift-server/async-http-client.git
Resolving https://github.com/swift-server/async-http-client.git at 1.1.1
Cloning https://github.com/vapor/leaf.git
Resolving https://github.com/vapor/leaf.git at 4.0.0-rc.1.3
Cloning https://github.com/apple/swift-crypto.git
Resolving https://github.com/apple/swift-crypto.git at 1.0.2
Cloning https://github.com/vapor/console-kit.git
Resolving https://github.com/vapor/console-kit.git at 4.1.1
Cloning https://github.com/vapor/sql-kit.git
Resolving https://github.com/vapor/sql-kit.git at 3.5.0
Cloning https://github.com/vapor/fluent.git
Resolving https://github.com/vapor/fluent.git at 4.0.0
Cloning https://github.com/vapor/mysql-nio.git
Resolving https://github.com/vapor/mysql-nio.git at 1.3.2
Cloning https://github.com/apple/swift-nio-extras.git
Resolving https://github.com/apple/swift-nio-extras.git at 1.5.1
Cloning https://github.com/vapor/vapor.git
Resolving https://github.com/vapor/vapor.git at 4.14.0
Cloning https://github.com/apple/swift-nio.git
Resolving https://github.com/apple/swift-nio.git at 2.18.0
Cloning https://github.com/vapor/websocket-kit.git
Resolving https://github.com/vapor/websocket-kit.git at 2.1.0
Cloning https://github.com/vapor/routing-kit.git
Resolving https://github.com/vapor/routing-kit.git at 4.1.0
Cloning https://github.com/apple/swift-metrics.git
Resolving https://github.com/apple/swift-metrics.git at 2.0.0
Cloning https://github.com/swift-server/swift-backtrace.git
Resolving https://github.com/swift-server/swift-backtrace.git at 1.2.0
Cloning https://github.com/vapor/leaf-kit.git
Resolving https://github.com/vapor/leaf-kit.git at 1.0.0-rc.1.13
Cloning https://github.com/vapor/fluent-mysql-driver.git
Resolving https://github.com/vapor/fluent-mysql-driver.git at 4.0.0
Cloning https://github.com/vapor/mysql-kit.git
Resolving https://github.com/vapor/mysql-kit.git at 4.1.0
Cloning https://github.com/vapor/async-kit.git
Resolving https://github.com/vapor/async-kit.git at 1.1.1
Cloning https://github.com/vapor/fluent-kit.git
Resolving https://github.com/vapor/fluent-kit.git at 1.7.3
Cloning https://github.com/apple/swift-nio-ssl.git
Resolving https://github.com/apple/swift-nio-ssl.git at 2.7.5
Cloning https://github.com/apple/swift-nio-http2.git
Resolving https://github.com/apple/swift-nio-http2.git at 1.12.2
Cloning https://github.com/apple/swift-log.git
Resolving https://github.com/apple/swift-log.git at 1.2.0
McBkPaolo.local /Users/paolo/_MtgDEV/_Server/MtgServer % swift build
zsh: correct 'build' to '.build' [nyae]? n
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/swift-crypto/Sources/Crypto/Util/BoringSSL/ArbitraryPrecisionInteger_boring.swift:196:13: warning: variable 'bnCtx' was never mutated; consider changing to 'let' constant
var bnCtx = CCryptoBoringSSL_BN_CTX_new()!
~~~ ^
let
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/fluent-mysql-driver/Sources/FluentMySQLDriver/FluentMySQLConfiguration.swift:130:34: error: extra argument 'requestTimeout' in call
requestTimeout: self.connectionPoolTimeout,
~~~~~^~~~~~~~~~~~~~~~~~~~~
/Users/paolo/_MtgDEV/_Server/MtgServer/.build/checkouts/fluent-mysql-driver/Sources/FluentMySQLDriver/FluentMySQLConfiguration.swift:130:34: error: extra argument 'requestTimeout' in call
requestTimeout: self.connectionPoolTimeout,
~~~~~^~~~~~~~~~~~~~~~~~~~~
[1549/1619] Compiling Vapor JSONCoder+Custom.swift
McBkPaolo.local /Users/paolo/_MtgDEV/_Server/MtgServer %
The swift package update compiles correctly, without error Not sure what originally caused the issue, instance of package manager bug?
this is the package.swift:
// swift-tools-version:5.2 import PackageDescription
let package = Package( name: "MtgServer", platforms: [ .macOS(.v10_15) ], dependencies: [ // 💧 A server-side Swift web framework. .package(url: "https://github.com/vapor/vapor.git", from: "4.14.0"), .package(url: "https://github.com/vapor/leaf.git", from: "4.0.0-rc"), .package(url: "https://github.com/vapor/fluent.git", from: "4.0.0"), .package(url: "https://github.com/vapor/fluent-mysql-driver.git", from: "4.0.0") ], targets: [ .target(name: "App", dependencies: [ .product(name: "Leaf", package: "leaf"), .product(name: "Fluent", package: "fluent"), .product(name: "FluentMySQLDriver", package: "fluent-mysql-driver"), .product(name: "Vapor", package: "vapor"), ]), .target(name: "Run", dependencies: ["App"]), .testTarget(name: "AppTests", dependencies: [ .target(name: "App"), .product(name: "XCTVapor", package: "vapor"), ]) ] )
Thank-you for the assistance
The bug was caused by an update somewhere that FluentMySQL didn't specify when it should have done. Until you run a package update it will stick with the versions in the resolved file (which in your case were out of date). Glad it's working!
I'm a little troubled by the fact that your swift-nio
(thus swift-nio-ssl
and swift-nio-http2
as well) are still months out of date.
how can I force to pull the latest, if swift package update is not doing this?
It really should be (and that's a problem) I think... but I'd try blowing away the build and DerivedData directories, and manually changing NIO to from: "2.23.0"
in vapor/Package.swift
.
using MacBook, running on Big Sur latest beta deleted project build folder cleaned ~/Library/Developer/Xcode/DerivedData ran package reset, update
-- it did pull NIO 2.23.0, see below:
McBkPaolo.local /Users/paolo/_MtgDEV/_Server/MtgServer % swift package reset McBkPaolo.local /Users/paolo/_MtgDEV/_Server/MtgServer % swift package update Fetching https://github.com/vapor/fluent.git Fetching https://github.com/vapor/fluent-mysql-driver.git Fetching https://github.com/vapor/leaf.git Fetching https://github.com/vapor/vapor.git Fetching https://github.com/apple/swift-log.git Fetching https://github.com/vapor/fluent-kit.git Fetching https://github.com/vapor/mysql-kit.git Fetching https://github.com/apple/swift-crypto.git Fetching https://github.com/vapor/async-kit.git Fetching https://github.com/vapor/sql-kit.git Fetching https://github.com/vapor/mysql-nio.git Fetching https://github.com/vapor/leaf-kit.git Fetching https://github.com/apple/swift-nio.git Fetching https://github.com/apple/swift-nio-ssl.git Fetching https://github.com/apple/swift-metrics.git Fetching https://github.com/swift-server/swift-backtrace.git Fetching https://github.com/apple/swift-nio-extras.git Fetching https://github.com/apple/swift-nio-http2.git Fetching https://github.com/vapor/console-kit.git Fetching https://github.com/swift-server/async-http-client.git Fetching https://github.com/vapor/websocket-kit.git Fetching https://github.com/vapor/routing-kit.git Fetching https://github.com/apple/swift-nio-transport-services.git Cloning https://github.com/vapor/sql-kit.git Resolving https://github.com/vapor/sql-kit.git at 3.7.0 Cloning https://github.com/vapor/fluent.git Resolving https://github.com/vapor/fluent.git at 4.0.0 Cloning https://github.com/apple/swift-nio.git Resolving https://github.com/apple/swift-nio.git at 2.23.0 Cloning https://github.com/apple/swift-nio-transport-services.git Resolving https://github.com/apple/swift-nio-transport-services.git at 1.9.0 Cloning https://github.com/vapor/console-kit.git Resolving https://github.com/vapor/console-kit.git at 4.2.3 Cloning https://github.com/vapor/leaf-kit.git Resolving https://github.com/vapor/leaf-kit.git at 1.0.0-rc.1.17 Cloning https://github.com/swift-server/swift-backtrace.git Resolving https://github.com/swift-server/swift-backtrace.git at 1.2.0 Cloning https://github.com/vapor/fluent-mysql-driver.git Resolving https://github.com/vapor/fluent-mysql-driver.git at 4.0.0 Cloning https://github.com/apple/swift-nio-http2.git Resolving https://github.com/apple/swift-nio-http2.git at 1.15.0 Cloning https://github.com/apple/swift-nio-ssl.git Resolving https://github.com/apple/swift-nio-ssl.git at 2.9.2 Cloning https://github.com/apple/swift-crypto.git Resolving https://github.com/apple/swift-crypto.git at 1.1.2 Cloning https://github.com/vapor/mysql-nio.git Resolving https://github.com/vapor/mysql-nio.git at 1.3.2 Cloning https://github.com/swift-server/async-http-client.git Resolving https://github.com/swift-server/async-http-client.git at 1.2.1 Cloning https://github.com/vapor/routing-kit.git Resolving https://github.com/vapor/routing-kit.git at 4.2.0 Cloning https://github.com/vapor/fluent-kit.git Resolving https://github.com/vapor/fluent-kit.git at 1.7.3 Cloning https://github.com/vapor/leaf.git Resolving https://github.com/vapor/leaf.git at 4.0.0-rc.1.4 Cloning https://github.com/vapor/websocket-kit.git Resolving https://github.com/vapor/websocket-kit.git at 2.1.1 Cloning https://github.com/apple/swift-nio-extras.git Resolving https://github.com/apple/swift-nio-extras.git at 1.7.0 Cloning https://github.com/vapor/vapor.git Resolving https://github.com/vapor/vapor.git at 4.32.0 Cloning https://github.com/vapor/async-kit.git Resolving https://github.com/vapor/async-kit.git at 1.2.0 Cloning https://github.com/apple/swift-log.git Resolving https://github.com/apple/swift-log.git at 1.4.0 Cloning https://github.com/vapor/mysql-kit.git Resolving https://github.com/vapor/mysql-kit.git at 4.1.0 Cloning https://github.com/apple/swift-metrics.git Resolving https://github.com/apple/swift-metrics.git at 2.0.0
Invalid Call: /Users/paolo/mtgDEV/_Server/test/TestServer/myProject/.build/checkouts/fluent-mysql-driver/Sources/FluentMySQLDriver/FluentMySQLConfiguration.swift:130:34: error: extra argument 'requestTimeout' in call requestTimeout: self.connectionPoolTimeout,