Closed ezisxl closed 5 years ago
also even after package update I'm still having Auth 2.0.2
@ezisxl this should be fixed by 2.0.3 but basically you need to update the core Vapor framework. If swift package update
doesn't work, what does your Package.swift look like?
Package.swift .package(url: "https://github.com/vapor/auth.git", from: "2.0.0")
Package.resolved { "package": "Auth", "repositoryURL": "https://github.com/vapor/auth.git", "state": { "branch": null, "revision": "9c71c8a6c021601d981305987e8e95fd36fd0c56", "version": "2.0.2" }
@ezisxl did you run swift package update
and try building the project again?
same :/ - it pulls 2.0.2
Can you post your full Package.swift?
import PackageDescription
let package = Package( name: "authtst", dependencies: [ // 💧 A server-side Swift web framework. .package(url: "https://github.com/vapor/vapor.git", .upToNextMinor(from: "3.1.0")), .package(url: "https://github.com/vapor/fluent-sqlite.git", .upToNextMinor(from: "3.0.0")), .package(url: "https://github.com/vapor/leaf.git", .upToNextMinor(from: "3.0.0")), .package(url: "https://github.com/vapor/auth.git", from: "2.0.2") ], targets: [ .target(name: "App", dependencies: ["Vapor", "FluentSQLite", "Leaf", "Authentication"]), .target(name: "Run", dependencies: ["App"]), .testTarget(name: "AppTests", dependencies: ["App"]), ] )
Change your .upToNextMinor
to .upToNextMajor
thx! that solved it
did "swift package update" swift 5, vapor toolbox 3.1.10
getting:
/private/tmp/.../.build/checkouts/auth/Sources/Authentication/Persist/SessionAuthenticatable.swift:44:19: error: value of type 'Request' has no member 'hasSession'; did you mean 'session'? guard try self.hasSession() else { ^~~~ ~~~~~~~~~~ session Vapor.Request:2:17: note: 'session' declared here public func session() throws -> Vapor.Session